Knowledge Circuits in Pretrained Transformers
Yunzhi Yao, Ningyu Zhang, Zekun Xi, Mengru Wang, Ziwen Xu, Shumin Deng, Huajun Chen
Abstract
The remarkable capabilities of modern large language models are rooted in their vast repositories of knowledge encoded within their parameters, enabling them to perceive the world and engage in reasoning. The inner workings of how these models store knowledge have long been a subject of intense interest and investigation among researchers. To date, most studies have concentrated on isolated components within these models, such as the Multilayer Perceptrons and attention head. In this paper, we delve into the computation graph of the language model to uncover the knowledge circuits that are instrumental in articulating specific knowledge. The experiments, conducted with GPT2 and TinyLLAMA, have allowed us to observe how certain information heads, relation heads, and Multilayer Perceptrons collaboratively encode knowledge within the model. Moreover, we evaluate the impact of current knowledge editing techniques on these knowledge circuits, providing deeper insights into the functioning and constraints of these editing methodologies. Finally, we utilize knowledge circuits to analyze and interpret language model behaviors such as hallucinations and in-context learning. We believe the knowledge circuits hold potential for advancing our understanding of Transformers and guiding the improved design of knowledge editing. Code and data are available in https://github.com/zjunlp/KnowledgeCircuits.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext d8fb0ffa-4a08-4de2-b379-8354b0110cfbCited by top-tier papers40
- Landscape of Thoughts: Visualizing the Reasoning Process of Large Language ModelsZhanke Zhou, Zhaocheng Zhu, Xuan Li, Mikhail Galkin et al.ICLR 2026 · 28 citations
- A Implies B: Circuit Analysis in LLMs for Propositional Logical ReasoningGuanzhe Hong, Nishanth Dikkala, Enming Luo, Cyrus Rashtchian et al.NeurIPS 2025 · 17 citations
- Paths Not Taken: Understanding and Mending the Multilingual Factual Recall PipelineMeng Lu, Ruochen Zhang, Carsten Eickhoff, Ellie PavlickEMNLP 2025 · 15 citations
- Rethinking Circuit Completeness in Language Models: AND, OR, and ADDER GatesHang Chen, Jiaying Zhu, Xinyu Yang, Wenya WangNeurIPS 2025 · 11 citations
- Formal Mechanistic Interpretability: Automated Circuit Discovery with Provable GuaranteesItamar Hadad, Guy Katz, Shahaf BassanICLR 2026 · 10 citations
Builds on35
- Locating and Editing Factual Associations in GPTKevin Meng, David Bau, Alex Andonian, Yonatan BelinkovNeurIPS 2022 · 3,415 citations
- Inference-Time Intervention: Eliciting Truthful Answers from a Language ModelKenneth Li, Oam Patel, Fernanda B. Viégas, Hanspeter Pfister et al.NeurIPS 2023 · 1,549 citations
- Sparse Autoencoders Find Highly Interpretable Features in Language ModelsRobert Huben, Hoagy Cunningham, Logan Riggs Smith, Aidan Ewart et al.ICLR 2024 · 1,072 citations
- Towards Automated Circuit Discovery for Mechanistic InterpretabilityArthur Conmy, Augustine N. Mavor-Parker, Aengus Lynch, Stefan Heimersheim et al.NeurIPS 2023 · 861 citations
- Investigating Gender Bias in Language Models Using Causal Mediation AnalysisJesse Vig, Sebastian Gehrmann, Yonatan Belinkov, Sharon Qian et al.NeurIPS 2020 · 851 citations
Related papers
- HeadMap: Locating and Enhancing Knowledge Circuits in LLMsXuehao Wang, Liyuan Wang, Binghuai Lin, Yu ZhangICLR 2025
- Knowledge Graph Enhanced Large Language Model EditingMengqi Zhang, Xiaotian Ye, Qiang Liu, Pengjie Ren et al.EMNLP 2024 · 5 citations
- Hypothesis Testing the Circuit Hypothesis in LLMsClaudia Shi, Nicolas Beltran-Velez, Achille Nazaret, Carolina Zheng et al.NeurIPS 2024 · 36 citations
- Pierce the Mists, Greet the Sky: Decipher Knowledge Overshadowing via Knowledge Circuit AnalysisHaoming Huang, Yibo Yan, Jiahao Huo, Xin Zou et al.EMNLP 2025
- Towards Interpretable Sequence Continuation: Analyzing Shared Circuits in Large Language ModelsMichael Lan, Philip Torr, Fazl BarezEMNLP 2024 · 1 citation
