BlockCert: Certified Blockwise Extraction of Transformer Mechanisms
Not on the map. Why?
Abstract (arXiv)
Mechanistic interpretability aspires to reverse-engineer neural networks into explicit algorithms, while model editing seeks to modify specific behaviours without retraining. Both areas are typically evaluated with informal evidence and ad-hoc experiments, with few explicit guarantees about how far an extracted or edited model can drift from the original on relevant inputs. We introduce BlockCert, a framework for certified blockwise extraction of transformer mechanisms, and outline how a lightweight extension can support certified local edits. Given a pre-trained transformer and a prompt distribution, BlockCert extracts structured surrogate implementations for residual blocks together with machine-checkable certificates that bound approximation error, record coverage metrics, and hash the underlying artifacts. We formalize a simple Lipschitz-based composition theorem in Lean 4 that lifts these local guarantees to a global deviation bound. Empirically, we apply the framework to GPT-2 small, TinyLlama-1.1B-Chat, and Llama-3.2-3B. Across these models we obtain high per-block coverage and small residual errors on the evaluated prompts, and in the TinyLlama setting we show that a fully stitched model matches the baseline perplexity within approximately 6e-5 on stress prompts. Our results suggest that blockwise extraction with explicit certificates is feasible for real transformer language models and offers a practical bridge between mechanistic interpretability and formal reasoning about model behaviour.
Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 12 of its 16 references that are in the map. First posted on arXiv 20 Nov 2025.
Builds on
12 of 16 references.
References · 12
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2022Locating and Editing Factual Associations in GPTcited by 2,609
- 2022Mass-Editing Memory in a Transformercited by 976
- 2022Toy Models of Superpositioncited by 928
- 2023Progress measures for grokking via mechanistic interpretabilitycited by 822
- 2017Reluplex: An Efficient SMT Solver for Verifying Deep Neural Networkscited by 739
- 2024TinyLlama: An Open-Source Small Language Modelcited by 604
- 2023Editing Large Language Models: Problems, Methods, and Opportunitiescited by 367
- 2023Towards Best Practices of Activation Patching in Language Models: Metrics and Methodscited by 328
- 2021Beta-CROWN: Efficient Bound Propagation with Per-neuron Split Constraints for Complete and Incomplete Neural Network Robustness Verificationcited by 224
- 2023Knowledge Editing for Large Language Models: A Surveycited by 189
Built on by
Not cited yet.