Abstract
Large Language Models (LLMs) demonstrate remarkable proficiency in text generation, yet the internal mechanisms governing their understanding of discourse relations—the logical connections between sentences—remain largely opaque. This study identifies "discursive circuits" within GPT-2: sparse, specialized subgraphs that manage logical relations such as causality and contrast. By introducing the Completion under Discourse Relation (CUDR) task and utilizing Edge Attribution Patching (EAP), researchers demonstrate that these circuits are highly localized, representing only 0.2% of the model's total edges. The findings reveal a hierarchical processing pipeline where lower layers handle linguistic prerequisites and upper layers execute abstract discourse logic. Furthermore, these circuits exhibit significant generalization across diverse linguistic frameworks, suggesting a universal internal representation of discourse logic in LLMs.
Introduction
Mechanistic interpretability aims to deconstruct the "black box" of LLMs into understandable components or "circuits." While previous research has successfully mapped circuits for simple tasks like indirect object identification, discourse relations present a greater challenge due to their abstract nature and long-range dependencies. Discourse relations, such as "Reason" or "Contrast," act as the logical glue of language. This research seeks to determine whether LLMs possess dedicated internal engines for discourse or if such capabilities are distributed diffusely throughout the network.
Methodology: CUDR and Edge Attribution Patching
To isolate discursive circuits, the researchers developed a novel contrastive framework.
Completion under Discourse Relation (CUDR)
The CUDR task utilizes "minimal contrastive pairs" where the initial segment of a discourse ($Arg_1$) is held constant, but the connective ($Conn$) is varied. This variation forces the model to choose between two distinct logical paths ($Arg_2$ vs. $Arg'_2$). For example, "Bob is hungry, so..." should lead to "he goes to the canteen," while "Bob is hungry, but..." should lead to "the canteen is closed."
Edge Attribution Patching (EAP)
Identifying circuits traditionally requires exhaustive activation patching, which is computationally prohibitive. The authors employed Edge Attribution Patching (EAP), a gradient-based method using Taylor approximation. EAP efficiently identifies the specific connections (edges) between attention heads and MLP layers that are causally responsible for the model's output shift when the discourse connective is changed.
The CUDR Dataset
The study introduced a comprehensive benchmark consisting of 27,754 instances. This dataset spans three major linguistic frameworks:
- Penn Discourse Treebank (PDTB)
- Rhetorical Structure Theory (RST)
- Segmented Discourse Representation Theory (SDRT)
To ensure high-quality, logically coherent completions, the authors leveraged GPT-4o-mini to augment existing discourse corpora, creating clear contrastive choices for the model.
Key Insights: The Architecture of Discourse
The analysis of the identified circuits yielded several critical insights into the internal logic of LLMs:
- Extreme Sparsity: A circuit containing only approximately 1,000 edges (0.2% of the model) can recover 90% of the full model's performance on discourse tasks.
- Hierarchical Processing: Discourse understanding follows a "linguistic pre-requisite" pipeline. Lower layers (0-12) focus on features like coreference and lexical semantics, while upper layers (14-24) perform the abstract logical decision-making.
- Universal Logic: Circuits discovered using one framework (e.g., PDTB) generalize effectively to others (e.g., RST), suggesting that LLMs develop a "shared" internal logic that transcends specific academic taxonomies.
Results and Generalization
The sparse circuits achieved ~90% faithfulness in replicating the full model's behavior. Notably, fine-grained (L3) circuits outperformed coarser (L1) ones, indicating that the model utilizes highly specific pathways for different logical relations, such as distinguishing between "Reason" and "Result." The circuits also demonstrated robust generalization across different genres (e.g., the GDTB dataset) and frameworks.
Conclusion and Future Work
This research provides a foundational map of how LLMs process complex discourse logic. While currently limited to English and specific model scales (GPT-2), the discovery of sparse, universal discursive circuits opens new avenues for making LLMs more interpretable and controllable. Future work will explore these circuits in larger models, across multiple languages, and in comparison to human neurological processing of discourse.
Summary updated