← Lab /AI/ML

MAD methods fail to detect anomalies in Llama 3.1 on non-arithmetic tasks

Mechanistic anomaly detection techniques perform poorly on Llama 3.1 8B for non-arithmetic datasets, despite the model being less quirky than Mistral.

AI/ML EleutherAI 14 Oct 2024 Measurement Prototype evidence

Published as “Mechanistic Anomaly Detection Research Update 2”

Why it matters

The findings suggest current MAD techniques may be insufficient for detecting subtle anomalous behaviour in newer LLMs like Llama 3.1.

Summary

The team evaluated several mechanistic anomaly detection (MAD) approaches on Llama 3.1 8B and compared them to Mistral 7B v0.1. They found that on non-arithmetic datasets all MAD methods, including Mahalanobis distance, normalising flows, and sparse autoencoders, achieved poor AUC, while performance on arithmetic datasets was comparable to Mistral. Hidden-state centroid separation between Alice and Bob contexts correlated strongly with MAD performance, and Llama exhibited lower separation than Mistral. The authors conclude that current MAD techniques are insufficient for reliably detecting anomalous behaviour in Llama 3.1 and are deprioritising further work.

What they found 4

  1. Anomaly detection performance on non-arithmetic tasks is much worse for Llama 3.1 8B than for Mistral 7B v0.1

    “We found anomaly detection performance on non-arithmetic tasks was much worse for Llama 3.1 8B trained in the same way as Mistral 7B v0.1, the model that we were using previously.”

  2. Distance between Alice and Bob hidden-state centroids explains MAD performance and is lower for Llama

    “We found that the distance between the centroids of Alice and Bob contexts in the hidden state space at a given layer explained MAD performance well, and that Llama had less Alice-Bob separation than Mistral.”

  3. Normalising flow and sparse autoencoder detectors match Mahalanobis distance performance on raw activations

    “Both approaches yielded a performance profile close to the performance of the Mahalanobis distance on raw activations, and normalising flows in particular offered performance that matched the Mahalanobis distance on raw activations to a high level of precision.”

  4. Model quirkiness correlates with MAD performance for Llama but not for Mistral

    “We observed a significant correlation between the quirkiness of a model and the performance of the MAD methods for Llama, but less of a correlation for Mistral.”

Caveats 5

  • For the arithmetic datasets, anomaly detection methods performed similarly well to Mistral 7B v0.1.
  • There are notable exceptions where high AUC is achieved despite low hidden-state separation (specific layers of Mistral on population, subtraction and addition datasets).
  • It is unclear if the relationship between hidden-state separation and MAD performance generalises to other models and tasks.
  • Training longer is unlikely to improve Llama's quirkiness without degrading other performance dimensions.
  • The authors are deprioritising MAD work pending a significantly approach.

What’s new here 4

  • Evaluation of MAD methods on Llama 3.1 8B across arithmetic and non-arithmetic tasks
  • Demonstration that hidden-state Alice-Bob centroid distance predicts MAD success and is lower for Llama
  • Testing of normalising flow and sparse autoencoder detectors, finding performance similar to Mahalanobis distance
  • Observation that Llama is less quirky but still exhibits anomalous behaviour that MAD fails to capture