Lune

NeurIPS2024Top-tier venue

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 Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

40 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Sparse Autoencoders Find Highly Interpretable Features in Language Models cites Towards Automated Circuit Discovery for Mechanistic Interpretability
  • Sparse Autoencoders Find Highly Interpretable Features in Language Models cites Investigating Gender Bias in Language Models Using Causal Mediation Analysis
  • Towards Automated Circuit Discovery for Mechanistic Interpretability cites Locating and Editing Factual Associations in GPT
  • Locating and Editing Factual Associations in GPT cites Investigating Gender Bias in Language Models Using Causal Mediation Analysis
  • Formal Mechanistic Interpretability: Automated Circuit Discovery with Provable Guarantees cites Towards Automated Circuit Discovery for Mechanistic Interpretability
  • Rethinking Circuit Completeness in Language Models: AND, OR, and ADDER Gates cites Towards Automated Circuit Discovery for Mechanistic Interpretability
  • Rethinking Circuit Completeness in Language Models: AND, OR, and ADDER Gates cites Locating and Editing Factual Associations in GPT
  • Rethinking Circuit Completeness in Language Models: AND, OR, and ADDER Gates cites Investigating Gender Bias in Language Models Using Causal Mediation Analysis
  • Inference-Time Intervention: Eliciting Truthful Answers from a Language Model cites Locating and Editing Factual Associations in GPT
  • Landscape of Thoughts: Visualizing the Reasoning Process of Large Language Models cites Inference-Time Intervention: Eliciting Truthful Answers from a Language Model
  • Paths Not Taken: Understanding and Mending the Multilingual Factual Recall Pipeline cites Locating and Editing Factual Associations in GPT
  • Paths Not Taken: Understanding and Mending the Multilingual Factual Recall Pipeline cites Investigating Gender Bias in Language Models Using Causal Mediation Analysis
  • Paths Not Taken: Understanding and Mending the Multilingual Factual Recall Pipeline cites Inference-Time Intervention: Eliciting Truthful Answers from a Language Model
  • A Implies B: Circuit Analysis in LLMs for Propositional Logical Reasoning cites Locating and Editing Factual Associations in GPT
  • A Implies B: Circuit Analysis in LLMs for Propositional Logical Reasoning cites Investigating Gender Bias in Language Models Using Causal Mediation Analysis
  • A Implies B: Circuit Analysis in LLMs for Propositional Logical Reasoning cites Paths Not Taken: Understanding and Mending the Multilingual Factual Recall Pipeline
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers40

  1. Landscape of Thoughts: Visualizing the Reasoning Process of Large Language ModelsZhanke Zhou, Zhaocheng Zhu, Xuan Li, Mikhail Galkin et al.ICLR 2026 · 28 citations
  2. A Implies B: Circuit Analysis in LLMs for Propositional Logical ReasoningGuanzhe Hong, Nishanth Dikkala, Enming Luo, Cyrus Rashtchian et al.NeurIPS 2025 · 17 citations
  3. Paths Not Taken: Understanding and Mending the Multilingual Factual Recall PipelineMeng Lu, Ruochen Zhang, Carsten Eickhoff, Ellie PavlickEMNLP 2025 · 15 citations
  4. Rethinking Circuit Completeness in Language Models: AND, OR, and ADDER GatesHang Chen, Jiaying Zhu, Xinyu Yang, Wenya WangNeurIPS 2025 · 11 citations
  5. Formal Mechanistic Interpretability: Automated Circuit Discovery with Provable GuaranteesItamar Hadad, Guy Katz, Shahaf BassanICLR 2026 · 10 citations

Builds on37

  1. Locating and Editing Factual Associations in GPTKevin Meng, David Bau, Alex Andonian, Yonatan BelinkovNeurIPS 2022 · 3,415 citations
  2. 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
  3. Sparse Autoencoders Find Highly Interpretable Features in Language ModelsRobert Huben, Hoagy Cunningham, Logan Riggs Smith, Aidan Ewart et al.ICLR 2024 · 1,072 citations
  4. Towards Automated Circuit Discovery for Mechanistic InterpretabilityArthur Conmy, Augustine N. Mavor-Parker, Aengus Lynch, Stefan Heimersheim et al.NeurIPS 2023 · 861 citations
  5. 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

  1. How Do LLMs Acquire New Knowledge? A Knowledge Circuits Perspective on Continual Pre-TrainingYixin Ou, Yunzhi Yao, Ningyu Zhang, Hui Jin et al.ACL Findings 2025 · 3 citations
  2. HeadMap: Locating and Enhancing Knowledge Circuits in LLMsXuehao Wang, Liyuan Wang, Binghuai Lin, Yu ZhangICLR 2025
  3. Knowledge Graph Enhanced Large Language Model EditingMengqi Zhang, Xiaotian Ye, Qiang Liu, Pengjie Ren et al.EMNLP 2024 · 5 citations
  4. Hypothesis Testing the Circuit Hypothesis in LLMsClaudia Shi, Nicolas Beltran-Velez, Achille Nazaret, Carolina Zheng et al.NeurIPS 2024 · 36 citations
  5. Finding and Editing Multi-Modal Neurons in Pre-Trained TransformersHaowen Pan, Yixin Cao, Xiaozhi Wang, Xun Yang et al.ACL Findings 2024 · 8 citations
Dusk over the sea between two cliffs drawn in fine vertical lines