Table of Contents
Fetching ...

Discursive Circuits: How Do Language Models Understand Discourse Relations?

Yisong Miao, Min-Yen Kan

TL;DR

Discursive circuits identify sparse causal subgraphs in transformer models that underlie discourse understanding. The authors propose CuDR, a task that uses minimal counterfactual contrasts and activation patching to reveal these circuits across PDTB, RST, and SDRT. They show small circuits (about 0.2 percent of connections) faithfully reproduce full model behavior and generalize across frameworks, while revealing a hierarchical organization of discourse relations and links to linguistic features. The work provides a mechanistic, cross framework account of discourse processing and opens avenues to extend to multilingual data and other architectures.

Abstract

Which components in transformer language models are responsible for discourse understanding? We hypothesize that sparse computational graphs, termed as discursive circuits, control how models process discourse relations. Unlike simpler tasks, discourse relations involve longer spans and complex reasoning. To make circuit discovery feasible, we introduce a task called Completion under Discourse Relation (CuDR), where a model completes a discourse given a specified relation. To support this task, we construct a corpus of minimal contrastive pairs tailored for activation patching in circuit discovery. Experiments show that sparse circuits ($\approx 0.2\%$ of a full GPT-2 model) recover discourse understanding in the English PDTB-based CuDR task. These circuits generalize well to unseen discourse frameworks such as RST and SDRT. Further analysis shows lower layers capture linguistic features such as lexical semantics and coreference, while upper layers encode discourse-level abstractions. Feature utility is consistent across frameworks (e.g., coreference supports Expansion-like relations).

Discursive Circuits: How Do Language Models Understand Discourse Relations?

TL;DR

Discursive circuits identify sparse causal subgraphs in transformer models that underlie discourse understanding. The authors propose CuDR, a task that uses minimal counterfactual contrasts and activation patching to reveal these circuits across PDTB, RST, and SDRT. They show small circuits (about 0.2 percent of connections) faithfully reproduce full model behavior and generalize across frameworks, while revealing a hierarchical organization of discourse relations and links to linguistic features. The work provides a mechanistic, cross framework account of discourse processing and opens avenues to extend to multilingual data and other architectures.

Abstract

Which components in transformer language models are responsible for discourse understanding? We hypothesize that sparse computational graphs, termed as discursive circuits, control how models process discourse relations. Unlike simpler tasks, discourse relations involve longer spans and complex reasoning. To make circuit discovery feasible, we introduce a task called Completion under Discourse Relation (CuDR), where a model completes a discourse given a specified relation. To support this task, we construct a corpus of minimal contrastive pairs tailored for activation patching in circuit discovery. Experiments show that sparse circuits ( of a full GPT-2 model) recover discourse understanding in the English PDTB-based CuDR task. These circuits generalize well to unseen discourse frameworks such as RST and SDRT. Further analysis shows lower layers capture linguistic features such as lexical semantics and coreference, while upper layers encode discourse-level abstractions. Feature utility is consistent across frameworks (e.g., coreference supports Expansion-like relations).

Paper Structure

This paper contains 33 sections, 2 equations, 12 figures, 14 tables.

Figures (12)

  • Figure 1: Task Overview: The CuDR task enables discovery of discursive circuits by contrasting model predictions under minimal changes to the discourse connectives. Activation patching reveals components causally responsible for shifting the model’s prediction.
  • Figure 2: Illustration of attribution patching with CuDR: We steer the model's prediction from the counterfactual toward the original outcome. Activations from the original run are patched into the counterfactual run to influence the model’s prediction.
  • Figure 3: RQ1: Overall Faithfulness of Discursive Circuits: We report average faithfulness across 13 PDTB relations for circuits L3, L1, L0, the random baseline, and the IOI baseline. The Y-axis shows faithfulness (%), and the X-axis shows the number of patched edges (log scale). Shaded areas indicate standard deviation. L3 and L1 reach strong faithfulness at $\approx 200$ edges (vertical dashed line).
  • Figure 4: RQ1 Faithfulness of Discursive Circuits by Discourse Relation (see indices 1–13).
  • Figure 5: RQ2 Cross-dataset generalization: Performance by applying PDTB's circuits to other datasets.
  • ...and 7 more figures