nnterp: A Standardized Interface for Mechanistic Interpretability of Transformers
On the map: Mechanistic interpretability → Circuits and mechanistic analysis
Abstract (arXiv)
Mechanistic interpretability research requires reliable tools for analyzing transformer internals across diverse architectures. Current approaches face a fundamental tradeoff: custom implementations like TransformerLens ensure consistent interfaces but require coding a manual adaptation for each architecture, introducing numerical mismatch with the original models, while direct HuggingFace access through NNsight preserves exact behavior but lacks standardization across models. To bridge this gap, we develop nnterp, a lightweight wrapper around NNsight that provides a unified interface for transformer analysis while preserving original HuggingFace implementations. Through automatic module renaming and comprehensive validation testing, nnterp enables researchers to write intervention code once and deploy it across 50+ model variants spanning 16 architecture families. The library includes built-in implementations of common interpretability methods (logit lens, patchscope, activation steering) and provides direct access to attention probabilities for models that support it. By packaging validation tests with the library, researchers can verify compatibility with custom models locally. nnterp bridges the gap between correctness and usability in mechanistic interpretability tooling.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Placed in Circuits and mechanistic analysis, one of 13 directions in Mechanistic interpretability. Builds on 3 of its 10 references that are in the map. First posted on arXiv 18 Nov 2025.
Builds on
3 of 10 references.
Closest ancestors · 1
Same direction, newest first
Other references · 2
Built on by
Citing papers per year: 2025: 1; 2026: 1.
2 papers.
Similar, not cited
Close in wording, no citation either way
- 2024Transformer Circuit Faithfulness Metrics are not Robust
- 2026Transformer Field Theory: A Response-Theoretic Approach to Mechanistic Interpretability
- 2026Align, Unify, Suppress, Route: A Coherentist View of Transformer Computation
- 2024A Practical Review of Mechanistic Interpretability for Transformer-Based Language Models
- 2025Beyond Components: Singular Vector-Based Interpretability of Transformer Circuits
- 2026Every Component Is a Lookup: One Linear Graph for Interaction, Composition and Attribution
- 2025Mechanistic Unveiling of Transformer Circuits: Self-Influence as a Key to Model Reasoning
- 2025On the Universality of Transformer Architectures; How Much Attention Is Enough?