Post · 63 min read· pp. 261–317

Mechanistic Anomaly Detection Research Update

In December 2023, the Eleuther team published Eliciting Latent Knowledge from Quirky Language Models. We finetuned language models to behave in a “quirky” manner on a collection of question and answer datasets. When a prompt began with “Alice:”, these models were trained to answer as accurately as possible, but when it instead began with “Bob:”, they would answer according to an unreliable heuristic (Bob would not always be wrong, but would consistently use the same fallible method to answer questions). One problem we investigated was detecting when the model was behaving in an “Alice”-like way vs when it was behaving in a “Bob”-like way in an unsupervised manner. This is an instance of the Mechanistic Anomaly Detection (MAD) problem introduced by Paul Christiano. We obtained strong results with a simple anomaly detection technique: an average area under the receiver operating characteristic curve (AUROC) of 0.95 across all quirky datasets, and close to 0.99 for those datasets where the models learned to be strongly quirky.

The version of the “quirky” mechanistic anomaly detection problem we investigated had an additional challenge: we trained only on easy examples, and tested the detector’s accuracy on hard examples. We do this because we want to detect how well detectors work under a distribution shift.

Recently, we have been experimenting with a slightly more difficult version of this MAD task. In the original task, the detector can achieve perfect accuracy by simply detecting when the token “Alice” or “Bob” is present in the prompt. But the triggers for anomalous behaviour in realistic scenarios are likely to be much more subtle. To make the problem harder, we created a diverse set of “Alice-like” names and another set of “Bob-like” names, ensuring that there is no overlap between the Alice-like names in the trusted data (which we use to characterise normal behaviour) and the Alice-like names in the test data where we try to detect anomalous examples.

We find that enriching the set of names in this manner makes the problem harder for some datasets. We have been experimenting with several approaches to anomaly detection. We’ve tested a collection of different detectors to detect anomalies based on model activations. We have also been experimenting with detectors that use attribution patching instead of model activations to distinguish Alice-like from Bob-like operation. We have found:

  1. For some datasets, hard examples yielded a significantly different distribution of activations to easy examples, so we were successful in inducing a distribution shift between training and test examples.
  2. Adding additional names makes the problem harder.
  3. We can achieve very high classification accuracy on some datasets if we have access to test set statistics (AUROC >0.999) and moderately high accuracy without them (AUC >0.95).
  4. For some datasets high accuracy depends on hyperparameters that may be difficult to tune and on others we do not achieve high accuracy at all.
  5. Achieving uniformly high classification accuracy is difficult.
  6. We compared methods based on model activations and attribution patching. Activation based methods offered the highest classification accuracy, though some methods based on attribution patching were less sensitive to layer choice.
  7. Combining activations and effects estimated from attribution patching did not significantly improve detection accuracy.
  8. Visualisations suggest that attribution patching may benefit from more sophisticated scoring methods.
  9. Activation based anomaly detection can also detect adversarial examples in non-robust vision models but not in robust models.
  10. Attribution based anomaly detection can detect adversarial examples in robust image models at a rate slightly above chance.

Experimental setup

We fine tuned Mistral 7B v0.1 on 12 quirky datasets with low-rank adaptation (LoRA), early stopped on overall validation loss computed on both Alice and Bob examples. The number of epochs used is listed in the table below. The datasets were formatted using the templatize_quirky_dataset function from the quirky-language-models repo with the options standardize_templates=True, method=random, random_names=True and seed=0.

DatasetMax EpochsNotes
capitals120.0
hemisphere15.0
population30.0
sciq30.0Alternate version provided by Eric Jenner with additional examples and no examples missing support
sentiment60.0
nli60.0
authors60.0
addition15.0
subtraction15.0
multiplication15.0
modularaddition30.0
squaring15.0

We also fine tuned Llama 3 and 3.1 8B on these datasets, and we are planning to use these models as held-out test models for our anomaly detection methods.

For the authors and capitals datasets, we were unable to elicit a satisfactory level of quirky behaviour. Both models began to overfit before they learned significantly different behaviour on “Bob-like” names. We therefore exclude them from our analysis.

Each dataset was partitioned four ways:

  • Trusted: Datapoints with Alice behaviour and difficulty below the 25th percentile of the whole dataset. One of the first four “Alice names” was used in the prompts for these datapoints
  • Alice Untrusted: A dataset with identical parameters to trusted but different examples
  • Bob Untrusted: Datapoints with Bob behaviour and difficulty below the 25th percentile of the whole dataset. One of the first four “Bob names” was used in the prompts
  • Test: Datapoints with Alice or Bob behaviour above the 75th percentile difficulty. The last twelve “Alice names” or “Bob names” (unseen in trusted or untrusted data) were used for the prompts

For “online” anomaly detection, detectors were trained on the trusted split and had to assess points from the test split zero shot. For “offline” anomaly detection, detectors had access to both the trusted and test set and labels indicating whether points were in the trusted or test set, but not labels indicating whether any points were anomalous.

Code implementing all of the detectors discussed is available here, but it may presently be difficult to use.

Additional names make the problem harder

In Eliciting Latent Knowledge, we had a two-step process for mechanistic anomaly detection:

  1. We trained a collection of probes on the activations of each layer to predict the model output given only Alice’s easy examples
  2. We used the set of output predictions of the probes as features for an anomaly scoring algorithm

We might expect this to be relatively unaffected by additional random names, as intuitively a good probe ought to ignore the specific name that appears in the prompt. However, in practice we find significantly worse performance on the randomised name dataset, as shown by Figure 1.

Comparison of MAD AUC with randomised and nonrandomised names
Figure 1: Comparison of MAD AUC with randomised and nonrandomised names

We wanted higher anomaly detection accuracy than was offered by this method, so we tried some alternatives.

Methods

There are two different settings where we could imagine employing MAD:

  • An “online” setting, where we want to detect anomalous behaviour as soon as it occurs and take appropriate action
  • An “offline” setting, where we are able to collect many examples of untrusted behaviour and use the collection to identify anomalies

If a system has a small number of anomalous modes of operation, then the offline problem could be easier, because we could get many examples for each mode. Intuitively, this might not be true if the number of modes of anomalous operation is larger than the number of examples of anomalous behaviour – in this case, each anomaly could be of a new type. In our quirky datasets, Bob has a single unusual answering strategy, which plausibly corresponds to a single anomalous mode of operation, so the offline problem may be easier.

We tried anomaly detection methods suited to each setting. We experimented with different scoring rules and different sets of features from which to compute scores. The feature sets we tried included:

  • Activations: We take “activations” from the residual stream at various internal layers of the model
    • MLP activations: For a subset of scores, we experimented with taking activations from the multilayer perceptron (MLP) outputs rather than the residual stream
  • Attribution: We measure the approximate effect of ablating the model’s activations on the final difference in logits between “Yes” and “No” tokens using attribution patching. In each case, we estimated a separate effect (or collection of effects) by patching each attention head in each layer. We experiment with several different ablations:
    • Mean: We replace the activations of each of the attention heads in a given layer with the mean activation of that attention head
    • Principal components: We replace the activations of each of the attention heads with the activations given by subtracting the difference between the activation’s projection on each of the top 10 principal components and the mean of activations projected on the same principal component
    • Grad norm: We take the norm of the gradient for each attention head in a layer as a collection of features
  • Probe shift: Using attribution patching, we take the difference between the estimated effect of an intervention on the network’s output, and the estimated effect on the output of a linear probe trained to predict the network’s output on an intermediate layer. All of the above ablations are also applicable to this method. For a probe at layer ii, we consider the effect of all interventions in layers prior to ii.
  • Misconception contrast probing: We trained a supervised probe to distinguish model activations on an automatically generated set of misconceptions and correct statements, then used this probe’s score to distinguish Alice from Bob modes of operation (inspired by Anthropic’s generic contrast probing).
  • Activation + attribution: We concatenate the activations and approximate effects computed from attribution patching
  • Confidence probing via iterative prompt rephrasing: We examined how sensitive the model results were to few shot rephrasing. Specifically, we automatically generated rephrasings of the form “{Question} one answer is No. {Repeat question}”, and measured how much the model’s answers shifted with rephrasings like this. The method was inspired by DeepMind’s approach to uncertainty quantification.

More details on attribution patching are given further down. We also tried combining attribution patching and activations in two ways:

  • Merge: We concatenate the features before computing anomaly scores
  • Ensemble: We compute anomaly scores for each set of features and then average the scores

Finally, we experimented with cross layer concatenation of effects estimated from attribution patching:

  • Concatenate: Features from each layer are concatenated before score is calculated

Given these features, we experimented with a number of different scoring methods, some of them “online” (that don’t require batch statistics for the test set) and “offline” (which do). Online scores we experimented with:

  • Raw average: Relevant to contrast probing and prompt rephrasing: we simply average the confidence the probe assigns to the example being misleading
  • Mahalanobis distance: We computed the mean and covariance of the activations in each layer for the trusted training set. We used this to compute the Mahalanobis distance of test point activations from the trusted data mean.
    • Mahalanobis-PCA: We also tried a variant of the Mahalanobis distance that computed the distance only along the top principal components.
  • Local outlier factor: We saved the activations in each layer for the trusted training set, and computed a local outlier factor score for the activations of each test point.
  • Isolation forest: We fit an isolation forest outlier detector (n_estimators = 20) to the activations in each layer for the trusted training set.

For the offline setting, we experimented with:

  • Quantum entropy: Based on the SPECTRE paper, we calculated a “quantum entropy” score that interpolates between the Mahalanobis distance and the distance along the largest principal component of the test data covariance matrix, which we calculate after the test data has been whitened using the covariance matrix of the trusted data (credit to Eric Jenner for this method).
  • Likelihood ratio: We calculated the ratio of the likelihood of the test data under a Gaussian fit to the trusted data only to the likelihood of the test data under a Gaussian fit to the test data. Due to small dataset sizes compared to the data dimension, we first projected the data down to the nonzero basis of the trusted data covariance matrix and then calculated the likelihood ratio.
  • Gaussian mixture model: As an extension of the likelihood ratio method, we iteratively fit a pair of Gaussians, initially to the trusted and test data respectively, and then iteratively compute soft class assignments of the test data to each class and update the Gaussian parameters to convergence.

In addition, we visualised activations and estimated effects per layer using Uniform Manifold Approximation and Projection (UMAP) and principal component analysis (PCA) plots for the top four principal components.

Results

Among online scores, the highest average AUROC (0.87) when scores were aggregated across layers was achieved by using the Mahalanobis score with activation features. Among offline scores, the highest average AUROC (0.94) was achieved by using the quantum entropy score together with activation features.

Averages mask substantial structure in scores:

  • All methods struggled to consistently distinguish Alice from Bob on the sciq and sentiment datasets
  • Activation based methods performed well on all datasets except nli
  • Where activation based methods performed well, they typically performed very well. Activations-quantum entropy achieved an AUROC of ~1 on the remaining datasets, while the lowest AUROC for activations-Mahalanobis distance on the remaining datasets was 0.988 on hemisphere
  • Attribution based methods typically achieved AUROC of around 0.9 on “easy” datasets, but performed notably better than activation based methods on nli
  • Probe-shift based methods were particularly insensitive to the choice of layer

The sciq dataset exhibited extreme label imbalance in the training and test sets. Among the easy examples used for training, over 95% of the ground truth labels were “true”, while among the hard test examples, over 95% of the ground truth labels were “false”. This likely makes it a very challenging dataset to train an anomaly detector for.

We did not have success with contrast probing.

Online detectors

Aggregated AUROC by online score and features: all datasets

featuresscoreaggregated_mean_auc_rocaggregated_mean_auc_roc_agreeaggregated_mean_auc_roc_disagree
activationslof0.8460.8410.807
activationsmahalanobis0.8710.8660.856
activationspca mahalanobis0.7960.7990.800
attributionisoforest mean0.7560.7820.780
attributionlof mean0.8490.8410.841
attributionlof pcs0.8520.8460.839
attributionmahalanobis concat mean0.7550.7620.777
attributionmahalanobis mean0.8050.7970.798
attributionmahalanobis pcs0.6610.6460.687
attribution activationsmahalanobis mean0.8500.8530.869
attribution activationsmahalanobis mean ensemble0.8430.8390.837
iterative rephrase0.5060.4820.478
misconception contrast0.6420.6290.639
probelof concat mean0.8400.8570.810
probelof concat pcs0.8090.8200.788
probelof mean0.8530.8550.845
probemahalanobis concat mean0.8370.8450.821
probemahalanobis mean0.8480.8470.842
probe activationsmahalanobis mean ensemble0.8540.8540.847

Aggregated AUROC by online score and features: by dataset

Comparison of online anomaly detectors - layer aggregated
Figure 2: Performance of different online detectors where scores are aggregated across layers

Layerwise AUROC by online score and features: by dataset

Comparison of online anomaly detectors - by layer
Figure 3: Performance of different online detectors by layer

Offline detectors

Aggregated AUROC by offline score and features: all datasets

featuresscoreaggregated_mean_auc_rocaggregated_mean_auc_roc_agreeaggregated_mean_auc_roc_disagree
activationsque0.9360.9260.964
attributionque concat mean0.7910.7850.837
attributionque grad norm0.6880.7130.714
attributionque pcs0.8400.8370.856
probeque concat mean0.8640.8860.858
probeque mean0.8600.8780.854
probeque pcs0.8600.8660.872

Aggregated AUROC by offline score and features: by dataset

Comparison of offline anomaly detectors - layer aggregated
Figure 4: Performance of different offline detectors where scores are aggregated across layers

Layerwise AUROC by offline score and features: by dataset

Comparison of offline anomaly detectors - by layer
Figure 5: Performance of different offline detectors by layer

Adversarial image detection

We conducted an exploratory experiment applying the same detectors to the task of detecting adversarial images for image classifiers. We focused on the Mahalanobis distance, because it worked well in comparison to other detectors for the quirky models task and because it is quite simple. We found that an activation-mahalanobis detector was able to detect adversarial images with an AUC of around 0.8 (layer-dependent) in a standard image classifier. It could not perform above chance for a robust classifier, however. Using attribution patching to approximate mean ablation along top principal components, on the other hand, had highly layer-dependent accuracy for a standard classifier. Interestingly, exactly the same approach performed marginally better than chance in a relatively layer independent manner for the tested robust detector. We did not test how robust the detectors themselves were to adversarial attack.

Comparison of adversarial image detectors by layer
Figure 6: Performance of different adversarial image detectors by layer and image model. Standard is a non-robust classifier, while Carmon2019Unlabeled is a robust model

Visualising features

In addition to testing various anomaly detectors, we also visualised per-layer activations and activation patching based effect estimates using UMAP and principal component plots. For “easy” dataset feature combinations (such as activations on the population dataset), we saw clear separation between normal and anomalous points among the top principal components in middle to late layers. We often (though not always) saw similar cluster separations in both principal component and UMAP plots.

Population

Activations

Layer 1

At layer 1, activations show a strong clustering pattern in both PCA and UMAP plots that does not correspond to any of the classes we have distinguished (true/false, trusted/test, normal/anomalous, agree/disagree).

PCA plot of population activations, layer 1
Figure 7: PCA plot of population activations, layer 1

UMAP plot of population activations, layer 1
Figure 8: UMAP plot of population activations, layer 1

Layer 16

In the layer 16 activations, the PCA plots show clear separation of anomalous and normal examples in the direction of the top principal component. In the direction of the second principal component, there is substantial separation between the trusted data used to train the detector and the normal test examples, showing that there is a distribution shift between the easy and hard examples. The population dataset consists of questions like input: "Does {character} think that {city} has a population greater than {population}?", and the difficulty metric is -log(population), so it is possible that the second principal component tracks log population.

While the PCA plots for layer 16 activations show different directions that seem to correspond to normal/anomalous, easy/hard and true/false, the UMAP plot separates all of these classes at once.

PCA plot of population activations, layer 16
Figure 9: PCA plot of population activations, layer 16

UMAP plot of population activations, layer 16
Figure 10: UMAP plot of population activations, layer 16

Layer 28

By layer 28, clusters visible at layer 16 appear to have separated further. We also see the emergence of further structure that does not correspond to any of the classes we distinguish by colour.

PCA plot of population activations, layer 28
Figure 11: PCA plot of population activations, layer 28

UMAP plot of population activations, layer 28
Figure 12: UMAP plot of population activations, layer 28

Attention head mean ablations

Layer 1

For estimated mean ablation effects at layer 1, we see that anomalous examples are far more variable along the top principal component than normal examples, though they do not separate into different classes along any of the top principal components.

The UMAP plot, on the other hand, clearly distinguishes normal from anomalous examples. The anomalous examples have an interesting “double spike” shape. This might reflect the fact that interventions in the first layer might ablate the “Bob” label, and perhaps the spiky shapes reflect the sizes of the errors Bob made (we haven’t checked this). Given this structure, it is surprising that the local outlier factor score with attribution based features does not perform better for the population dataset in layer 1, given that both local outlier factor and UMAP depend on the neighbourhoods of points.

PCA plot of population mean ablations, layer 1
Figure 13: PCA plot of population mean ablations, layer 1

UMAP plot of population mean ablations, layer 1
Figure 14: UMAP plot of population mean ablations, layer 1

Layer 16

While clustering by the classes we have coloured is evident in layer 16 mean ablation effect estimates, it is far less defined than the clustering evident in layer 16 activations.

PCA plot of population mean ablations, layer 16
Figure 15: PCA plot of population mean ablations, layer 16

UMAP plot of population mean ablations, layer 16
Figure 16: UMAP plot of population mean ablations, layer 16

Layer 28

By layer 28, clusters visible at layer 16 appear to have separated further. We also see the emergence of further structure that does not correspond to any of the classes we distinguish by colour.

PCA plot of population mean ablations, layer 28
Figure 17: PCA plot of population mean ablations, layer 28

UMAP plot of population mean ablations, layer 28
Figure 18: UMAP plot of population mean ablations, layer 28

Probe shift

The probe shift method preserves the structure visible in layer 4 of the mean ablation UMAP plot throughout every layer of the network. This may be attributable to the possibility that there is an intervention in layer 1 that ablates the “Bob” label, and this has a significant effect on the accuracy of probes throughout the network.

Layer 4

PCA plot of population probe shift, layer 4
Figure 19: PCA plot of population probe shift features, layer 4

UMAP plot of population probe shift, layer 4
Figure 20: UMAP plot of population probe shift features, layer 4

Layer 16

PCA plot of population probe shift, layer 16
Figure 21: PCA plot of population probe shift features, layer 16

UMAP plot of population probe shift, layer 16
Figure 22: UMAP plot of population probe shift features, layer 16

Layer 28

PCA plot of population probe shift, layer 28
Figure 23: PCA plot of population probe shift features, layer 28

UMAP plot of population probe shift, layer 28
Figure 24: UMAP plot of population probe shift features, layer 28

Sentiment

While population is a relatively easy dataset, sentiment is more challenging. Attribution based methods performed worse than chance on it, while activation based detectors could not reliably distinguish normal from anomalous examples.

Activations

Layer 1

Like the activations for population, layer 1 activations for sentiment form clusters unrelated to our labelling. We do not see much separation between trusted and test examples.

PCA plot of activations for sentiment, layer 1
Figure 25: PCA plot of activations for sentiment, layer 1

UMAP plot of activations for sentiment, layer 1
Figure 26: UMAP plot of activations for sentiment, layer 1

Layer 16

At layer 16, we see separation between true and false examples, as well as imperfect separation between examples where Alice and Bob agree and where Alice and Bob disagree. We do not see separation in either PCA or UMAP plots between normal and anomalous examples, nor between trusted and test examples.

PCA plot of activations, layer 16
Figure 27: PCA plot of activations for sentiment, layer 16

UMAP plot of activations for sentiment, layer 16
Figure 28: UMAP plot of activations for sentiment, layer 16

Layer 28

By layer 28, we see a little separation between normal and anomalous examples, particularly examples where Alice and Bob agree and the label is true. We see further separation between true and false examples, as well as between examples where Alice and Bob agree and disagree.

PCA plot of activations for sentiment, layer 28
Figure 29: PCA plot of activations for sentiment, layer 28

UMAP plot of activations for sentiment, layer 28
Figure 30: UMAP plot of activations for sentiment, layer 28

Attention head mean ablations

Layer 1

For early to mid layer PCA plots of attention head mean ablations, we see little structure, though we can see disagree anomalous true examples distinguished from others in the direction of PC1. In UMAP plots, we see the familiar distinction between true and false and agree and disagree examples, though without visible clustering.

PCA plot of attention head mean ablations for sentiment, layer 1
Figure 31: PCA plot of attention head mean ablations for sentiment, layer 1

UMAP plot of attention head mean ablations for sentiment, layer 1
Figure 32: UMAP plot of attention head mean ablations for sentiment, layer 1

Layer 16

Our remarks for layer 1 remain largely applicable to layer 16.

PCA plot of attention head mean ablations for sentiment, layer 16
Figure 33: PCA plot of attention head mean ablations for sentiment, layer 16

UMAP plot of attention head mean ablations for sentiment, layer 16
Figure 34: UMAP plot of attention head mean ablations, layer 16

Layer 28

In layer 28 we see some separation of normal from anomalous examples, particularly in the UMAP plot. This corresponds to our observation that later layers were associated with better scores for the attribution-LOF detector.

PCA plot of attention head mean ablations for sentiment, layer 28
Figure 35: PCA plot of attention head mean ablations for sentiment, layer 28

UMAP plot of attention head mean ablations for sentiment, layer 28
Figure 36: UMAP plot of attention head mean ablations for sentiment, layer 28

Probe shift

Layer 4

Like attention head mean ablation, probe shift features show separation between true and false and agree and disagree, but generally not separation from trusted data overall, though there is a small cluster of anomalous data that is separated from the trusted data present in all layers.

In the UMAP visualisation, anomalous examples are strongly clustered and separated from

PCA plot of probe shift for sentiment, layer 4
Figure 37: PCA plot of probe shift features for sentiment, layer 4

UMAP plot of probe shift for sentiment, layer 4
Figure 38: UMAP plot of probe shift features for sentiment, layer 4

Layer 16

PCA plot of probe shift for sentiment, layer 16
Figure 39: PCA plot of probe shift features for sentiment, layer 16

UMAP plot of probe shift for sentiment, layer 16
Figure 40: UMAP plot of probe shift features for sentiment, layer 16

Layer 28

PCA plot of probe shift for sentiment, layer 28
Figure 41: PCA plot of probe shift features for sentiment, layer 28

UMAP plot of probe shift for sentiment, layer 28
Figure 42: UMAP plot of probe shift features for sentiment, layer 28

Discovering functional elements of the network with edge attribution patching

We also experimented with edge attribution patching, a method of automated circuit discovery. In comparison with mean ablation of attention heads, this approach

  • Used “edge patching” for a finer grained set of effects to study
  • Examined interventions on MLPs as well as attention heads
  • Patched activations from each “Alice” prompt with those from an identical “Bob” prompt

Edge patching computes the effects of replacing the activations at the output of some unit (e.g. an attention head or MLP layer) mediated by a downstream unit. That is, the approximate effect of intervening on an edge from unit A to unit B on a score SS is given by

ΔS=(oA−oA′)T∂S∂iB\Delta S = (o_A - o_A')^T \frac{\partial S}{\partial i_B}

That is, we approximate the change in score with the inner product between the change in the output of A (oAo_A) and the gradient of the loss with respect to the input of B (∂S∂iB\frac{\partial S}{\partial i_B}).

Patching activations by surgically swapping Alice and Bob requires access to known examples of anomalous behaviour and is not suitable for an anomaly detector, but it does serve as a kind of test for our hypothesis about being able to find a part of the network implicated in switching between Alice and Bob behaviour. In fact, from testing on a few datasets, we find an edge from MLP 30 to MLP 31 that appears to play a large role in behaviour switching for multiple datasets (Figure 43). Because this edge is between two MLP layers, we could not have discovered it using attention head patching.

Top 10 edges for nli, population and hemisphere datasets
Figure 43: Top 10 edges for nli, population and hemisphere datasets

We are planning to experiment with sparse autoencoders

We have mentioned that one of the key challenges is finding a good activation or effect basis to compute anomaly scores. We have experimented with the eigenbasis of the covariance matrices of the activations in each layer, and are looking to try “edge interventions” as defined in the previous section. We have no strong reason to expect either of these is a great basis for anomaly detection.

Sparse autoencoders (SAEs) are another approach to defining a basis for investigating model behaviour. A sparse autoencoder learns a sparse codebook of features which can be used to reconstruct the activations. Given an example, we expect the active features in the codebook are the most important features for explaining the model’s behaviour. It is plausible that Alice and Bob behaviour is distinguished by differing distributions of codebook features, corresponding to different concepts invoked by the different modes of operation. Alternatively, perhaps the model computes both Alice and Bob answers for each prompt and then chooses one at the end. In this case, we may or may not see different feature activations, but we would expect to see different effects of intervening on Alice features if the prompt contains “Alice” or “Bob”.

Outlook

We have strong MAD results for many datasets, but we would ideally like AUCs uniformly very close to 1 which we have not achieved. For some datasets (NLI, sentiment and sciq), model performance appears weaker and layer dependent even for the strongest MAD approaches. We have not yet found a compelling way to use attribution patching to improve our results. We are looking to experiment with sparse autoencoders for MAD soon, as we think it is plausible MAD in a basis where features are disentangled may be easier.

Appendix: Tables of Results

For reference, here are detailed AUROC scores for a large collection of detectors for each dataset. The “best” layer is chosen as the layer that maximises the average AUROC across all datasets.

Online methods

Addition results: online methods

scorefeaturesmean_auc_rocaggregated_auc_rocbest_auc_rocmean_auc_roc_agreeaggregated_auc_roc_agreebest_auc_roc_agreemean_auc_roc_disagreeaggregated_auc_roc_disagreebest_auc_roc_disagreebest_layer
iterative rephrase0.5440.5440.5440.3560.3560.3560.5240.5240.524aggregate
misconception contrast0.4470.4080.4080.4450.4010.4010.4370.3830.383aggregate
isoforestactivations0.796nan0.9960.792nan0.9950.803nan0.99713
isoforest meanattribution0.8660.8660.8660.9950.9950.9950.9420.9420.942aggregate
isoforest pcsattribution0.765nan0.9720.851nan0.9990.874nan0.98428
lofactivations0.8550.9990.9990.8530.9990.9990.8570.9990.999aggregate
lof concat meanprobe0.9990.9990.9990.9970.9970.9971.0001.0001.000aggregate
lof concat pcsprobe1.0001.0001.0001.0001.0001.0001.0001.0001.000aggregate
lof meanattribution0.9460.9970.9970.9771.0001.0000.9791.0001.000aggregate
lof meanprobe0.9471.0001.0000.9471.0001.0000.9651.0001.000aggregate
lof pcsattribution0.9740.9950.9970.9871.0000.9990.9981.0001.00025
lof pcsprobe0.930nan1.0000.946nan1.0000.962nan1.00028
mahalanobisactivations0.9001.0001.0000.8981.0001.0000.9021.0001.000aggregate
mahalanobis concat meanattribution0.8530.8530.8530.9500.9500.9500.9920.9920.992aggregate
mahalanobis concat meanprobe1.0001.0001.0001.0001.0001.0001.0001.0001.000aggregate
mahalanobis grad normattribution0.509nan0.9390.410nan0.9800.652nan0.94431
mahalanobis grad normattribution activations0.799nan0.9990.871nan1.0000.853nan1.00031
mahalanobis meanattribution0.8560.9930.9930.8981.0001.0000.9231.0001.000aggregate
mahalanobis meanattribution activations0.8591.0001.0000.8991.0001.0000.9231.0001.000aggregate
mahalanobis meanprobe0.9401.0001.0000.9431.0001.0000.9521.0001.00028
mahalanobis meanprobe activations0.243nan0.4880.243nan0.4930.244nan0.4811
mahalanobis mean ensembleattribution activations0.9930.9930.9931.0001.0001.0001.0001.0001.000aggregate
mahalanobis mean ensembleprobe activations0.9031.0001.0000.9051.0001.0000.9141.0001.000aggregate
mahalanobis pcsattribution0.8300.7630.9980.9280.9611.0000.9490.8881.00028
mahalanobis pcsprobe0.665nan0.9730.591nan0.9630.778nan0.98428
pca mahalanobisactivations0.9900.9900.9900.9850.9850.9850.9960.9960.996aggregate

Hemisphere results: online methods

scorefeaturesmean_auc_rocaggregated_auc_rocbest_auc_rocmean_auc_roc_agreeaggregated_auc_roc_agreebest_auc_roc_agreemean_auc_roc_disagreeaggregated_auc_roc_disagreebest_auc_roc_disagreebest_layer
iterative rephrase0.4260.4260.4260.5190.5190.5190.2940.2940.294aggregate
misconception contrast0.7430.8420.8420.7480.8560.8560.7800.9210.921aggregate
isoforestactivations0.666nan0.7390.627nan0.6740.719nan0.83013
isoforest meanattribution0.8460.8460.8460.8380.8380.8380.9500.9500.950aggregate
isoforest pcsattribution0.722nan0.7650.696nan0.7820.795nan0.78328
lofactivations0.7320.8460.8460.7190.8280.8280.7510.8740.874aggregate
lof concat meanprobe0.9040.9040.9040.8990.8990.8990.9080.9080.908aggregate
lof concat pcsprobe0.7330.7330.7330.7180.7180.7180.7560.7560.756aggregate
lof meanattribution0.7890.8530.8530.7800.8480.8480.8520.9400.940aggregate
lof meanprobe0.8840.9410.9410.8640.9340.9340.9300.9610.961aggregate
lof pcsattribution0.7750.8250.8040.7760.8160.8060.8080.8990.83125
mahalanobisactivations0.8210.9880.9880.8010.9880.9880.8550.9910.991aggregate
mahalanobis concat meanattribution0.8500.8500.8500.8570.8570.8570.9530.9530.953aggregate
mahalanobis concat meanprobe0.9200.9200.9200.9140.9140.9140.9260.9260.926aggregate
mahalanobis grad normattribution0.694nan0.8310.661nan0.8080.764nan0.87031
mahalanobis grad normattribution activations0.709nan0.5840.693nan0.5590.782nan0.66631
mahalanobis meanattribution0.7590.6660.6660.7360.6240.6240.8270.7280.728aggregate
mahalanobis meanattribution activations0.8010.9970.9970.7920.9990.9990.8610.9990.999aggregate
mahalanobis meanprobe0.9070.9520.9100.8840.9410.8760.9540.9760.95828
mahalanobis meanprobe activations0.479nan0.4660.469nan0.4510.495nan0.4861
mahalanobis mean ensembleattribution activations0.8510.8510.8510.8550.8550.8550.9510.9510.951aggregate
mahalanobis mean ensembleprobe activations0.8700.9540.9540.8530.9440.9440.9060.9760.976aggregate
mahalanobis pcsattribution0.8000.8250.8030.7940.8110.8440.8560.9050.82328
mahalanobis pcsprobe0.828nan0.8220.795nan0.7810.888nan0.89228
pca mahalanobisactivations0.7540.7540.7540.7180.7180.7180.8180.8180.818aggregate

Modular addition results: online methods

scorefeaturesmean_auc_rocaggregated_auc_rocbest_auc_rocmean_auc_roc_agreeaggregated_auc_roc_agreebest_auc_roc_agreemean_auc_roc_disagreeaggregated_auc_roc_disagreebest_auc_roc_disagreebest_layer
iterative rephrase0.5910.5910.5910.5940.5940.5940.5870.5870.587aggregate
misconception contrast0.499nannan0.499nannan0.499nannanaggregate
isoforestactivations0.735nan0.9970.726nan0.9960.744nan0.99813
isoforest pcsattribution0.586nan0.4870.586nan0.4980.585nan0.47328
lofactivations0.8640.9990.9990.8630.9990.9990.8650.9990.999aggregate
lof concat meanprobe0.9150.9150.9150.9090.9090.9090.9220.9220.922aggregate
lof concat pcsprobe0.9510.9510.9510.9490.9490.9490.9530.9530.953aggregate
lof meanattribution0.7910.8850.8850.7850.8720.8720.7960.9000.900aggregate
lof meanprobe0.8880.9600.9600.8770.9420.9420.9000.9790.979aggregate
lof pcsattribution0.7920.8690.7440.7930.8720.7430.7910.8660.74425
lof pcsprobe0.897nan0.9050.893nan0.8950.900nan0.91628
mahalanobisactivations0.8851.0001.0000.8811.0001.0000.8891.0001.000aggregate
mahalanobis concat meanattribution0.4830.4830.4830.4970.4970.4970.4690.4690.469aggregate
mahalanobis concat meanprobe0.7790.7790.7790.7650.7650.7650.7940.7940.794aggregate
mahalanobis grad normattribution0.580nan0.5520.572nan0.5590.590nan0.54231
mahalanobis grad normattribution activations0.803nan0.6760.797nan0.6850.810nan0.66731
mahalanobis meanattribution0.6770.8150.8150.6750.8070.8070.6790.8230.823aggregate
mahalanobis meanattribution activations0.7001.0001.0000.6991.0001.0000.7031.0001.000aggregate
mahalanobis meanprobe0.8780.9600.9460.8600.9360.9220.8960.9870.97328
mahalanobis meanprobe activations0.385nan0.4930.395nan0.5000.375nan0.4841
mahalanobis mean ensembleattribution activations0.9180.9180.9180.8970.8970.8970.9410.9410.941aggregate
mahalanobis mean ensembleprobe activations0.7950.9610.9610.7830.9370.9370.8090.9880.988aggregate
mahalanobis pcsattribution0.6840.6070.5870.6810.6120.5930.6890.6020.58328
mahalanobis pcsprobe0.683nan0.7600.677nan0.7490.690nan0.77228
pca mahalanobisactivations0.9340.9340.9340.9200.9200.9200.9490.9490.949aggregate

Multiplication results: online methods

scorefeaturesmean_auc_rocaggregated_auc_rocbest_auc_rocmean_auc_roc_agreeaggregated_auc_roc_agreebest_auc_roc_agreemean_auc_roc_disagreeaggregated_auc_roc_disagreebest_auc_roc_disagreebest_layer
iterative rephrase0.5760.5760.5760.6300.6300.6300.5290.5290.529aggregate
misconception contrast0.497nannan0.492nannan0.500nannanaggregate
isoforestactivations0.821nan0.9760.814nan0.9770.829nan0.97613
isoforest meanattribution0.8060.8060.8060.7990.7990.7990.8500.8500.850aggregate
isoforest pcsattribution0.603nan0.7580.590nan0.7490.644nan0.81028
lofactivations0.8480.9930.9930.8460.9920.9920.8490.9940.994aggregate
lof concat meanprobe0.9660.9660.9660.9620.9620.9620.9710.9710.971aggregate
lof concat pcsprobe0.9120.9120.9120.8870.8870.8870.9400.9400.940aggregate
lof meanattribution0.8180.9000.9000.7970.8870.8870.8500.9220.922aggregate
lof meanprobe0.8760.9320.9320.8590.9230.9230.9000.9450.945aggregate
lof pcsattribution0.8750.9030.8970.8380.8710.8560.9160.9370.94025
lof pcsprobe0.878nan0.9190.845nan0.9110.917nan0.93128
mahalanobisactivations0.8691.0001.0000.8701.0001.0000.8681.0001.000aggregate
mahalanobis concat meanattribution0.7660.7660.7660.7350.7350.7350.8850.8850.885aggregate
mahalanobis concat meanprobe0.9590.9590.9590.9540.9540.9540.9660.9660.966aggregate
mahalanobis grad normattribution0.644nan0.7270.616nan0.6810.684nan0.82631
mahalanobis grad normattribution activations0.566nan0.8610.531nan0.8420.626nan0.97631
mahalanobis meanattribution0.7460.8760.8760.7220.8650.8650.7950.9190.919aggregate
mahalanobis meanattribution activations0.7561.0001.0000.7341.0001.0000.8011.0001.000aggregate
mahalanobis meanprobe0.7770.8770.9300.7610.8730.9300.8100.8980.93728
mahalanobis meanprobe activations0.286nan0.5200.283nan0.4960.289nan0.5461
mahalanobis mean ensembleattribution activations0.8960.8960.8960.8880.8880.8880.9290.9290.929aggregate
mahalanobis mean ensembleprobe activations0.7640.8970.8970.7500.8950.8950.7910.9130.913aggregate
mahalanobis pcsattribution0.7450.5020.8310.7280.4440.8200.8070.5740.89228
mahalanobis pcsprobe0.671nan0.7630.661nan0.7950.713nan0.75928
pca mahalanobisactivations1.0001.0001.0001.0001.0001.0001.0001.0001.000aggregate

NLI results: online methods

scorefeaturesmean_auc_rocaggregated_auc_rocbest_auc_rocmean_auc_roc_agreeaggregated_auc_roc_agreebest_auc_roc_agreemean_auc_roc_disagreeaggregated_auc_roc_disagreebest_auc_roc_disagreebest_layer
iterative rephrase0.5320.5320.5320.3820.3820.3820.8990.8990.899aggregate
misconception contrast0.5260.5620.5620.5380.5950.5950.5040.5320.532aggregate
isoforestactivations0.504nan0.5230.508nan0.5140.495nan0.54913
isoforest meanattribution0.8800.8800.8800.8790.8790.8790.9710.9710.971aggregate
isoforest pcsattribution0.815nan0.7840.806nan0.7810.923nan0.85428
lofactivations0.5220.5130.5130.5310.5250.5250.5050.4940.494aggregate
lof concat meanprobe0.8800.8800.8800.8700.8700.8700.9780.9780.978aggregate
lof concat pcsprobe0.9010.9010.9010.9040.9040.9040.9880.9880.988aggregate
lof meanattribution0.8440.9250.9250.8360.9300.9300.9410.9890.989aggregate
lof meanprobe0.8340.8890.8890.8180.8870.8870.9460.9740.974aggregate
lof pcsattribution0.8900.9390.9780.8930.9470.9770.9660.9920.99025
lof pcsprobe0.876nan0.9230.877nan0.9400.975nan0.98328
mahalanobisactivations0.5460.5680.5680.5480.5650.5650.5450.5750.575aggregate
mahalanobis concat meanattribution0.8800.8800.8800.8880.8880.8880.9580.9580.958aggregate
mahalanobis concat meanprobe0.8710.8710.8710.8470.8470.8470.9720.9720.972aggregate
mahalanobis grad normattribution0.819nan0.9360.800nan0.9380.949nan0.95031
mahalanobis grad normattribution activations0.793nan0.8470.779nan0.8210.922nan0.92331
mahalanobis meanattribution0.8280.9080.9080.8210.9160.9160.9300.9750.975aggregate
mahalanobis meanattribution activations0.7940.4680.4680.7850.4510.4510.8920.5200.520aggregate
mahalanobis meanprobe0.8380.8930.8880.8180.8820.8770.9500.9740.95328
mahalanobis meanprobe activations0.487nan0.5070.489nan0.5090.484nan0.5011
mahalanobis mean ensembleattribution activations0.9090.9090.9090.9160.9160.9160.9750.9750.975aggregate
mahalanobis mean ensembleprobe activations0.8090.8930.8930.7900.8830.8830.9130.9740.974aggregate
mahalanobis pcsattribution0.9250.9300.9310.9280.9330.9300.9790.9850.98028
mahalanobis pcsprobe0.892nan0.9090.890nan0.9040.972nan0.97028
pca mahalanobisactivations0.6730.6730.6730.6520.6520.6520.7370.7370.737aggregate

Population results: online methods

scorefeaturesmean_auc_rocaggregated_auc_rocbest_auc_rocmean_auc_roc_agreeaggregated_auc_roc_agreebest_auc_roc_agreemean_auc_roc_disagreeaggregated_auc_roc_disagreebest_auc_roc_disagreebest_layer
iterative rephrase0.6810.6810.6810.7840.7840.7840.5130.5130.513aggregate
misconception contrast0.7510.9120.9120.7380.8990.8990.7930.9490.949aggregate
isoforestactivations0.697nan0.9710.702nan0.9570.690nan0.99013
isoforest meanattribution0.9120.9120.9120.8770.8770.8770.9640.9640.964aggregate
isoforest pcsattribution0.670nan0.6140.636nan0.5350.725nan0.75228
lofactivations0.8640.9870.9870.8450.9800.9800.8890.9970.997aggregate
lof concat meanprobe0.8790.8790.8790.8350.8350.8350.9400.9400.940aggregate
lof concat pcsprobe0.7690.7690.7690.6810.6810.6810.8810.8810.881aggregate
lof meanattribution0.7760.9090.9090.7240.8590.8590.8560.9700.970aggregate
lof meanprobe0.8850.9300.9300.8410.8950.8950.9440.9740.974aggregate
lof pcsattribution0.7370.7970.8530.6810.7280.8230.8260.8910.90325
mahalanobisactivations0.6351.0001.0000.6371.0001.0000.6301.0001.000aggregate
mahalanobis concat meanattribution0.8780.8780.8780.8310.8310.8310.9410.9410.941aggregate
mahalanobis concat meanprobe0.9230.9230.9230.8880.8880.8880.9680.9680.968aggregate
mahalanobis grad normattribution0.727nan0.7890.669nan0.7270.818nan0.87731
mahalanobis grad normattribution activations0.710nan0.9570.656nan0.9480.790nan0.97031
mahalanobis meanattribution0.7860.9270.9270.7410.8920.8920.8570.9710.971aggregate
mahalanobis meanattribution activations0.7941.0001.0000.7511.0001.0000.8621.0001.000aggregate
mahalanobis meanprobe0.9320.9480.9420.9010.9210.9160.9710.9830.97828
mahalanobis meanprobe activations0.561nan0.5300.527nan0.5210.615nan0.5461
mahalanobis mean ensembleattribution activations0.9390.9390.9390.9060.9060.9060.9790.9790.979aggregate
mahalanobis mean ensembleprobe activations0.8770.9530.9530.8450.9270.9270.9190.9860.986aggregate
mahalanobis pcsattribution0.8240.8390.8640.7820.7890.8330.8960.9170.90828
mahalanobis pcsprobe0.793nan0.7950.715nan0.7190.899nan0.90028
pca mahalanobisactivations0.9780.9780.9780.9700.9700.9700.9890.9890.989aggregate

Sciq results: online methods

scorefeaturesmean_auc_rocaggregated_auc_rocbest_auc_rocmean_auc_roc_agreeaggregated_auc_roc_agreebest_auc_roc_agreemean_auc_roc_disagreeaggregated_auc_roc_disagreebest_auc_roc_disagreebest_layer
iterative rephrase0.4050.4050.4050.3000.3000.3000.1990.1990.199aggregate
misconception contrast0.5710.6050.6050.5100.4920.4920.5760.5430.543aggregate
isoforestactivations0.437nan0.4870.502nan0.5260.441nan0.50413
isoforest meanattribution0.4690.4690.4690.4100.4100.4100.3480.3480.348aggregate
isoforest pcsattribution0.506nan0.6220.497nan0.5320.413nan0.44628
lofactivations0.5470.6190.6190.5140.5200.5200.3980.2960.296aggregate
lof concat meanprobe0.4440.4440.4440.5510.5510.5510.1230.1230.123aggregate
lof concat pcsprobe0.4410.4410.4410.5870.5870.5870.0790.0790.079aggregate
lof meanattribution0.5750.6420.6420.5200.5520.5520.5000.3810.381aggregate
lof meanprobe0.4740.4930.4930.5090.5110.5110.2810.3400.340aggregate
lof pcsattribution0.6640.7330.7020.5900.6810.6450.4620.3740.43725
lof pcsprobe0.506nan0.4680.526nan0.5040.263nan0.24028
mahalanobisactivations0.4770.5950.5950.5140.5190.5190.4240.4190.419aggregate
mahalanobis concat meanattribution0.5480.5480.5480.4310.4310.4310.3460.3460.346aggregate
mahalanobis concat meanprobe0.4760.4760.4760.5040.5040.5040.2950.2950.295aggregate
mahalanobis grad normattribution0.446nan0.3680.442nan0.4880.292nan0.26531
mahalanobis grad normattribution activations0.528nan0.6980.508nan0.6150.379nan0.93131
mahalanobis meanattribution0.5130.5480.5480.4690.4270.4270.4070.3480.348aggregate
mahalanobis meanattribution activations0.5180.5990.5990.4770.4900.4900.4380.7570.757aggregate
mahalanobis meanprobe0.4940.4940.5480.4900.4940.4580.3810.3330.44728
mahalanobis meanprobe activations0.454nan0.4560.486nan0.5040.256nan0.1441
mahalanobis mean ensembleattribution activations0.5490.5490.5490.4270.4270.4270.3480.3480.348aggregate
mahalanobis mean ensembleprobe activations0.4780.4900.4900.4920.4920.4920.3720.3310.331aggregate
mahalanobis pcsattribution0.6240.5890.6980.5310.4960.6300.3710.3430.43528
mahalanobis pcsprobe0.561nan0.5570.505nan0.4640.483nan0.43328
pca mahalanobisactivations0.3670.3670.3670.4960.4960.4960.1950.1950.195aggregate

Sentiment results: online methods

scorefeaturesmean_auc_rocaggregated_auc_rocbest_auc_rocmean_auc_roc_agreeaggregated_auc_roc_agreebest_auc_roc_agreemean_auc_roc_disagreeaggregated_auc_roc_disagreebest_auc_roc_disagreebest_layer
iterative rephrase0.2980.2980.2980.2990.2990.2990.2460.2460.246aggregate
misconception contrast0.5260.5230.5230.5310.5320.5320.5320.5060.506aggregate
isoforestactivations0.521nan0.4960.522nan0.5050.526nan0.48413
isoforest meanattribution0.3770.3770.3770.5080.5080.5080.2380.2380.238aggregate
isoforest pcsattribution0.411nan0.4380.483nan0.5430.296nan0.20528
lofactivations0.6190.6580.6580.6590.7250.7250.5810.6140.614aggregate
lof concat meanprobe0.4260.4260.4260.5660.5660.5660.2660.2660.266aggregate
lof concat pcsprobe0.4120.4120.4120.5180.5180.5180.2940.2940.294aggregate
lof meanattribution0.4480.4340.4340.5350.5340.5340.3510.3180.318aggregate
lof meanprobe0.4190.4090.4090.5060.4950.4950.3010.2870.287aggregate
lof pcsattribution0.5310.5520.8170.6030.6360.7550.4550.4460.93625
lof pcsprobe0.420nan0.4640.518nan0.5350.309nan0.37828
mahalanobisactivations0.6070.6870.6870.6330.7210.7210.6040.7210.721aggregate
mahalanobis concat meanattribution0.4240.4240.4240.5730.5730.5730.2430.2430.243aggregate
mahalanobis concat meanprobe0.4500.4500.4500.5900.5900.5900.2920.2920.292aggregate
mahalanobis grad normattribution0.491nan0.5390.488nan0.5770.488nan0.49931
mahalanobis grad normattribution activations0.406nan0.7130.479nan0.8590.305nan0.76831
mahalanobis meanattribution0.4240.4040.4040.5180.5490.5490.2880.2400.240aggregate
mahalanobis meanattribution activations0.4390.5860.5860.5330.7360.7360.3130.5450.545aggregate
mahalanobis meanprobe0.4040.3970.4420.4770.4780.5200.3010.2830.33928
mahalanobis meanprobe activations0.460nan0.5120.457nan0.5120.465nan0.5151
mahalanobis mean ensembleattribution activations0.4350.4350.4350.5740.5740.5740.2640.2640.264aggregate
mahalanobis mean ensembleprobe activations0.4140.4260.4260.4820.5070.5070.3170.3190.319aggregate
mahalanobis pcsattribution0.3860.3720.5280.4490.4420.5130.2720.2460.56228
mahalanobis pcsprobe0.372nan0.3880.424nan0.4340.280nan0.30828
pca mahalanobisactivations0.7600.7600.7600.7380.7380.7380.8270.8270.827aggregate

Squaring results: online methods

scorefeaturesmean_auc_rocaggregated_auc_rocbest_auc_rocmean_auc_roc_agreeaggregated_auc_roc_agreebest_auc_roc_agreemean_auc_roc_disagreeaggregated_auc_roc_disagreebest_auc_roc_disagreebest_layer
isoforest pcsattribution0.691nan0.7350.620nan0.6620.777nan0.82928
lof concat meanprobe0.9900.9900.9900.9860.9860.9860.9970.9970.997aggregate
lof concat pcsprobe0.9690.9690.9690.9540.9540.9540.9860.9860.986aggregate
lof meanattribution0.9310.9660.9660.9050.9470.9470.9660.9900.990aggregate
lof meanprobe0.9530.9760.9760.9370.9670.9670.9750.9880.988aggregate
lof pcsattribution0.9560.9690.9510.9330.9500.9220.9810.9910.98025
lof pcsprobe0.953nan0.9530.928nan0.9430.981nan0.96428
mahalanobis concat meanattribution0.9350.9350.9350.9010.9010.9010.9870.9870.987aggregate
mahalanobis concat meanprobe0.9900.9900.9900.9850.9850.9850.9960.9960.996aggregate
mahalanobis grad normattribution0.680nan0.8420.590nan0.7420.786nan0.99631
mahalanobis meanattribution0.8910.9420.9420.8510.9150.9150.9460.9840.984aggregate
mahalanobis meanprobe0.9050.9650.9940.8740.9510.9900.9490.9840.99828
mahalanobis meanprobe activations0.369nan0.4780.357nan0.4700.381nan0.4871
mahalanobis mean ensembleattribution activations0.9610.9610.9610.9450.9450.9450.9860.9860.986aggregate
mahalanobis mean ensembleprobe activations0.8760.9720.9720.8480.9610.9610.9150.9860.986aggregate
mahalanobis pcsattribution0.7990.6730.8150.7280.5710.7410.9000.7840.92228
mahalanobis pcsprobe0.699nan0.7790.616nan0.7310.797nan0.84528

Subtraction results: online methods

scorefeaturesmean_auc_rocaggregated_auc_rocbest_auc_rocmean_auc_roc_agreeaggregated_auc_roc_agreebest_auc_roc_agreemean_auc_roc_disagreeaggregated_auc_roc_disagreebest_auc_roc_disagreebest_layer
iterative rephrase0.4960.4960.4960.4770.4770.4770.5120.5120.512aggregate
misconception contrast0.411nannan0.392nannan0.412nannanaggregate
isoforestactivations0.872nan1.0000.871nan1.0000.873nan1.00013
isoforest meanattribution0.8960.8960.8960.9490.9490.9490.9780.9780.978aggregate
isoforest pcsattribution0.626nan0.9080.656nan0.9390.682nan0.94928
lofactivations0.8890.9990.9990.8880.9990.9990.8911.0001.000aggregate
lof concat meanprobe0.9960.9960.9960.9930.9930.9931.0001.0001.000aggregate
lof concat pcsprobe1.0001.0001.0001.0001.0001.0001.0001.0001.000aggregate
lof meanattribution0.8930.9750.9750.8930.9810.9810.9360.9980.998aggregate
lof meanprobe0.9280.9980.9980.9240.9950.9950.9541.0001.000aggregate
lof pcsattribution0.8800.9370.8520.9090.9620.8950.9550.9910.95825
lof pcsprobe0.893nan0.9730.940nan0.9780.922nan0.98028
mahalanobisactivations0.9081.0001.0000.9061.0001.0000.9091.0001.000aggregate
mahalanobis concat meanattribution0.9340.9340.9340.9590.9590.9590.9980.9980.998aggregate
mahalanobis concat meanprobe1.0001.0001.0001.0001.0001.0001.0001.0001.000aggregate
mahalanobis grad normattribution0.543nan0.9470.515nan0.9640.602nan0.99231
mahalanobis grad normattribution activations0.663nan1.0000.688nan0.9990.670nan1.00031
mahalanobis meanattribution0.8210.9690.9690.8070.9760.9760.8720.9970.997aggregate
mahalanobis meanattribution activations0.8221.0001.0000.8071.0001.0000.8721.0001.000aggregate
mahalanobis meanprobe0.8860.9980.9930.8660.9960.9920.9030.9990.99828
mahalanobis meanprobe activations0.298nan0.4950.295nan0.4930.300nan0.4961
mahalanobis mean ensembleattribution activations0.9760.9760.9760.9780.9780.9780.9970.9970.997aggregate
mahalanobis mean ensembleprobe activations0.8550.9980.9980.8350.9960.9960.8711.0001.000aggregate
mahalanobis pcsattribution0.8240.5050.9910.8640.3950.9910.9230.6220.99728
mahalanobis pcsprobe0.830nan0.9330.872nan0.9630.880nan0.94928
pca mahalanobisactivations1.0001.0001.0001.0001.0001.0001.0001.0001.000aggregate

Offline results

Addition: offline results

scorefeaturesmean_auc_rocaggregated_auc_rocbest_auc_rocmean_auc_roc_agreeaggregated_auc_roc_agreebest_auc_roc_agreemean_auc_roc_disagreeaggregated_auc_roc_disagreebest_auc_roc_disagreebest_layer
emactivations0.874nan1.0000.878nan1.0000.870nan1.00019
likelihoodactivations0.879nan1.0000.882nan1.0000.875nan1.00019
queactivations0.9191.0001.0000.9181.0001.0000.9191.0001.000aggregate
que concat meanattribution0.8500.8500.8500.8620.8620.8620.9740.9740.974aggregate
que concat meanprobe1.0001.0001.0001.0001.0001.0001.0001.0001.000aggregate
que grad normattribution0.5730.8740.9730.4520.9840.9870.6940.8660.97431
que meanattribution0.856nan0.9370.883nan0.9530.907nan0.95325
que meanprobe0.9511.0001.0000.9541.0001.0000.9601.0001.00028
que pcsattribution0.8730.9490.9430.9040.9980.9700.9380.9880.98825
que pcsprobe0.9051.0001.0000.9031.0001.0000.9381.0001.00028

Hemisphere: offline results

scorefeaturesmean_auc_rocaggregated_auc_rocbest_auc_rocmean_auc_roc_agreeaggregated_auc_roc_agreebest_auc_roc_agreemean_auc_roc_disagreeaggregated_auc_roc_disagreebest_auc_roc_disagreebest_layer
emactivations0.838nan0.9800.841nan0.9830.837nan0.97619
likelihoodactivations0.838nan0.9800.841nan0.9830.838nan0.97619
queactivations0.8921.0001.0000.8851.0001.0000.9111.0001.000aggregate
que concat meanattribution0.9120.9120.9120.9110.9110.9110.9910.9910.991aggregate
que concat meanprobe0.9890.9890.9890.9860.9860.9860.9960.9960.996aggregate
que grad normattribution0.7100.8170.8620.6430.8050.8110.8330.9090.92731
que meanattribution0.634nan0.7690.628nan0.7820.643nan0.75225
que meanprobe0.9410.9890.9580.9190.9850.9320.9790.9980.98828
que pcsattribution0.8930.9430.8940.8850.9510.8980.9580.9880.95925
que pcsprobe0.9300.9780.9500.9060.9740.9230.9780.9920.98728

Modular addition: offline results

scorefeaturesmean_auc_rocaggregated_auc_rocbest_auc_rocmean_auc_roc_agreeaggregated_auc_roc_agreebest_auc_roc_agreemean_auc_roc_disagreeaggregated_auc_roc_disagreebest_auc_roc_disagreebest_layer
likelihoodactivations0.887nan1.0000.884nan1.0000.891nan1.00019
queactivations0.9151.0001.0000.9121.0001.0000.9181.0001.000aggregate
que concat meanattribution0.4640.4640.4640.4800.4800.4800.4480.4480.448aggregate
que concat meanprobe0.8150.8150.8150.7970.7970.7970.8340.8340.834aggregate
que grad normattribution0.5200.5010.4830.5280.5080.4860.5130.4960.48031
que meanattribution0.638nan0.6160.640nan0.6230.637nan0.61025
que meanprobe0.8370.9960.9270.8260.9930.9050.8491.0000.95128
que pcsattribution0.6160.6390.6440.6220.6430.6450.6110.6350.64425
que pcsprobe0.7930.9750.9110.7880.9540.8910.7980.9970.93428

Multiplication: offline results

scorefeaturesmean_auc_rocaggregated_auc_rocbest_auc_rocmean_auc_roc_agreeaggregated_auc_roc_agreebest_auc_roc_agreemean_auc_roc_disagreeaggregated_auc_roc_disagreebest_auc_roc_disagreebest_layer
likelihoodactivations0.861nan1.0000.861nan1.0000.860nan1.00019
queactivations0.8831.0001.0000.8851.0001.0000.8821.0001.000aggregate
que concat meanattribution0.8500.8500.8500.8050.8050.8050.9610.9610.961aggregate
que concat meanprobe0.9910.9910.9910.9920.9920.9920.9900.9900.990aggregate
que grad normattribution0.7130.8260.8230.6780.8160.7900.7540.8750.89931
que meanattribution0.776nan0.8160.747nan0.7740.825nan0.89625
que meanprobe0.8440.9630.9810.8290.9600.9830.8700.9700.98128
que pcsattribution0.8590.8940.9120.8380.8730.8870.9120.9520.97025
que pcsprobe0.9090.9690.9960.9000.9670.9960.9320.9730.99628

NLI: offline results

scorefeaturesmean_auc_rocaggregated_auc_rocbest_auc_rocmean_auc_roc_agreeaggregated_auc_roc_agreebest_auc_roc_agreemean_auc_roc_disagreeaggregated_auc_roc_disagreebest_auc_roc_disagreebest_layer
emactivations0.534nan0.5000.548nan0.5070.511nan0.48819
likelihoodactivations0.534nan0.5010.548nan0.5080.511nan0.48819
queactivations0.6300.8140.8140.6370.8180.8180.6110.8050.805aggregate
que concat meanattribution0.9050.9050.9050.9060.9060.9060.9680.9680.968aggregate
que concat meanprobe0.9160.9160.9160.8940.8940.8940.9700.9700.970aggregate
que grad normattribution0.7270.8890.9180.6570.8670.8860.9320.9850.99931
que meanattribution0.822nan0.9540.805nan0.9490.928nan0.97825
que meanprobe0.8480.9200.9170.8230.9000.9040.9440.9820.95828
que pcsattribution0.9260.9600.9880.9240.9550.9860.9690.9930.99425
que pcsprobe0.9380.9610.9590.9330.9560.9510.9840.9900.98428

Population: offline results

scorefeaturesmean_auc_rocaggregated_auc_rocbest_auc_rocmean_auc_roc_agreeaggregated_auc_roc_agreebest_auc_roc_agreemean_auc_roc_disagreeaggregated_auc_roc_disagreebest_auc_roc_disagreebest_layer
emactivations0.746nan0.9560.764nan0.9510.713nan0.96819
likelihoodactivations0.746nan0.9550.764nan0.9500.712nan0.96819
queactivations0.8751.0001.0000.8771.0001.0000.8761.0001.000aggregate
que concat meanattribution0.9690.9690.9690.9520.9520.9520.9900.9900.990aggregate
que concat meanprobe0.9800.9800.9800.9660.9660.9660.9940.9940.994aggregate
que grad normattribution0.5690.7980.6940.5500.7420.5720.6030.8960.84731
que meanattribution0.789nan0.7780.748nan0.7230.851nan0.86025
que meanprobe0.9670.9880.9740.9500.9790.9580.9870.9970.99228
que pcsattribution0.8690.9550.8840.8250.9430.8540.9350.9820.93825
que pcsprobe0.9390.9480.9360.9010.9150.8970.9810.9840.98128

Sciq: offline results

scorefeaturesmean_auc_rocaggregated_auc_rocbest_auc_rocmean_auc_roc_agreeaggregated_auc_roc_agreebest_auc_roc_agreemean_auc_roc_disagreeaggregated_auc_roc_disagreebest_auc_roc_disagreebest_layer
emactivations0.463nan0.3960.527nan0.5390.412nan0.13519
likelihoodactivations0.465nan0.3960.531nan0.5380.400nan0.11019
queactivations0.4810.6370.6370.5300.5390.5390.4720.8810.881aggregate
que concat meanattribution0.5000.5000.5000.3650.3650.3650.5500.5500.550aggregate
que concat meanprobe0.4060.4060.4060.5140.5140.5140.4590.4590.459aggregate
que grad normattribution0.4360.3410.3460.4520.4370.4560.2710.2700.23231
que meanattribution0.496nan0.6220.479nan0.5370.444nan0.67025
que meanprobe0.4090.3690.4440.4820.4730.4730.3910.3270.69528
que pcsattribution0.5480.5720.6230.4740.4630.5510.5270.4500.55125
que pcsprobe0.4530.3880.4350.4770.4680.4750.4880.4810.76028

Sentiment: offline results

scorefeaturesmean_auc_rocaggregated_auc_rocbest_auc_rocmean_auc_roc_agreeaggregated_auc_roc_agreebest_auc_roc_agreemean_auc_roc_disagreeaggregated_auc_roc_disagreebest_auc_roc_disagreebest_layer
emactivations0.636nan0.7900.674nan0.8250.609nan0.74119
likelihoodactivations0.642nan0.8060.684nan0.8470.611nan0.75019
queactivations0.7460.9750.9750.7710.9740.9740.7360.9930.993aggregate
que concat meanattribution0.5860.5860.5860.7060.7060.7060.4960.4960.496aggregate
que concat meanprobe0.5470.5470.5470.7180.7180.7180.3400.3400.340aggregate
que grad normattribution0.5480.4860.8000.5380.5560.8140.5680.3910.78331
que meanattribution0.448nan0.4170.540nan0.6250.323nan0.19125
que meanprobe0.4140.3820.4550.4860.4960.5260.3120.2640.36128
que pcsattribution0.5470.6450.8510.6050.6870.7930.4670.5910.92625
que pcsprobe0.4100.4080.4540.4710.4700.4980.3160.3070.38928

Squaring: offline results

scorefeaturesmean_auc_rocaggregated_auc_rocbest_auc_rocmean_auc_roc_agreeaggregated_auc_roc_agreebest_auc_roc_agreemean_auc_roc_disagreeaggregated_auc_roc_disagreebest_auc_roc_disagreebest_layer
que concat meanattribution0.9530.9530.9530.9260.9260.9260.9950.9950.995aggregate
que concat meanprobe0.9980.9980.9980.9970.9970.9971.0001.0001.000aggregate
que grad normattribution0.7050.7610.7150.6780.7190.6370.7300.8050.79131
que meanattribution0.910nan0.9890.874nan0.9840.956nan0.99625
que meanprobe0.9370.9951.0000.9150.9910.9990.9670.9991.00028
que pcsattribution0.9080.9260.8590.8560.8830.7900.9810.9900.96125
que pcsprobe0.9310.9730.9950.8940.9590.9920.9840.9910.99828

Subtraction: offline results

scorefeaturesmean_auc_rocaggregated_auc_rocbest_auc_rocmean_auc_roc_agreeaggregated_auc_roc_agreebest_auc_roc_agreemean_auc_roc_disagreeaggregated_auc_roc_disagreebest_auc_roc_disagreebest_layer
emactivations0.898nan1.0000.896nan1.0000.899nan1.00019
likelihoodactivations0.902nan1.0000.901nan1.0000.904nan1.00019
queactivations0.9151.0001.0000.9141.0001.0000.9171.0001.000aggregate
que concat meanattribution0.9240.9240.9240.9380.9380.9380.9990.9990.999aggregate
que concat meanprobe1.0001.0001.0001.0001.0001.0001.0001.0001.000aggregate
que grad normattribution0.5340.5920.6630.5720.6950.6400.5360.6460.74431
que meanattribution0.816nan0.9820.792nan0.9800.876nan0.99425
que meanprobe0.9051.0001.0000.8871.0001.0000.9231.0001.00028
que pcsattribution0.8660.9220.9560.9160.9710.9730.9730.9940.98325
que pcsprobe0.9631.0000.9990.9781.0001.0000.9961.0000.99828