IC-003HyperDAS dynamically selects intervention tokens and learns linear subspaces in Llama3-8b that mediate entity attributes.

Jiuding Sun, Jing Huang, Sidharth Baskaran, Karel D'Oosterlinck, Christopher Potts, Michael Sklar, Atticus Geiger

SourceHyperDAS: Towards Automating Mechanistic Interpretability with Hypernetworks

The paper introduces HyperDAS, a hypernetwork-based method to automate the localization of concepts in a pre-trained Llama3-8b model. HyperDAS uses a transformer to encode a natural language description of a concept (e.g., 'the country of a city') and then selects token positions and identifies a linear subspace in the model's residual stream for intervention. It is trained and evaluated on the RAVEL benchmark, which measures the ability to disentangle entity attributes (e.g., country, birth year) through causal interventions. HyperDAS achieves state-of-the-art disentanglement scores, outperforming the Multi-task Distributed Alignment Search (MDAS) baseline across five entity domains. The analysis shows that HyperDAS targets different token positions depending on the layer, with middle layers focusing on entity tokens and deeper layers targeting syntax tokens.

Evidence
interventional
Key metric
Disentangle score: HyperDAS (asymmetric) 84.7 average, MDAS 76.0 average (Table 3a); City domain: HyperDAS-sym 76.9 / 90.9 / 83.9 (cause/iso/disentangle) at layer 15 (Figure 3b).
Caveat
The paper notes that HyperDAS will only be successful if the target concept is mediated by linear features, and that non-linear mediators are a possibility. It also acknowledges the risk that the method might 'hack' evaluations and inject information rather than uncovering causal structure, though design choices were made to mitigate this.
Model
Llama 3 8B
Concepts
Linear representation, Depth-dependent structure
Datasets
RAVEL [eval]
Methods
HyperDAS [primary], Distributed Alignment Search / DAS, Multi-task Distributed Alignment Search / MDAS [compared-to], Sparse autoencoder / Sparse autoencoders / K-sparse autoencoder / Topk sparse autoencoder / Scaling and Evaluating Sparse Autoencoders / Cunningham et al. 2023 (sparse autoencoders) [compared-to]
Related work
Distributed Alignment Search / DAS [builds-on], Multi-task Distributed Alignment Search / MDAS [compared-to]
Extraction
automatic-extraction