Large language models (LLMs) often exhibit flawed reasoning ability that undermines reliability. Existing approaches to improving reasoning typically treat it as a general and monolithic skill, applying broad training which is inefficient and unable to target specific reasoning errors. We introduce Reasoning Editing, a paradigm for selectively modifying specific reasoning patterns in LLMs while preserving other reasoning pathways. This task presents a fundamental trade-off between Generality, the ability of an edit to generalize across different tasks sharing the same reasoning pattern, and Locality, the ability to preserve other reasoning capabilities. Through systematic investigation, we uncover the Circuit-Interference Law: Edit interference between reasoning patterns is proportional to the overlap of their neural circuits. Guided by this principle, we propose REdit, the first framework to actively reshape neural circuits before editing, thereby modulating interference between reasoning patterns and mitigating the trade-off. REdit integrates three components: (i) Contrastive Circuit Reshaping, which directly addresses the generality-locality trade-off by disentangling overlapping circuits; (ii) Meta-Contrastive Learning, which extends transferability to novel reasoning patterns; and (iii) Dual-Level Protection, which preserves preexisting abilities by constraining reshaping update directions and regularizing task-level predictions. Extensive experiments with Qwen-2.5-3B on propositional logic reasoning tasks across three difficulty levels demonstrate that REdit consistently achieves superior generality and locality compared to baselines, with additional validation in mathematics showing broader potential. Our code is available at https://github.com/LzyFischer/REdit.
Figures & tables
Figure 1: LLM reasoning deficiencies and editing trade-off.
Figure 2: Correlation between circuit distance and interference. (a–c) Scatter plots with regression lines show that larger distances consistently correspond to reduced interference across different distance metrics. (d) Density plots of Pearson correlations confirm consistent negative associations.
Figure 3: Editing success rates across methods on ContextHub. REdit achieves success rates comparable to other approaches, confirming that it does not compromise the model’s fundamental editing capabilities.
Dataset
Metric
Raw
BIMT
LoRA
ROME
AlphaEdit
Ours
Level 1
Generality
60.7±2.3
72.2±1.4
63.8±2.9
67.8±3.2
67.9±1.9
74.1±1.6
Locality
N/A
61.5±0.7
84.9±1.6
89.8±3.1
87.0±0.9
94.3±0.4
Level 2
Generality
53.2±1.4
63.6±2.9
58.4±0.1
61.3±1.1
58.8±1.5
64.8±1.2
Locality
N/A
59.4±4.1
91.5±0.0
93.1±0.1
93.3±0.0
94.3±0.5
Level 3
Generality
45.1±1.6
52.6±0.4
50.1±0.8
51.5±3.3
54.2±0.8
55.0±1.6
Locality
N/A
52.3±1.0
92.3±2.8
94.6±2.7
92.2±0.7
94.4±0.8
Table 1: Main results on ContextHub evaluated with generality and locality metrics. The best and second-best scores are highlighted in bold and underlined , respectively. Raw denotes the performance of the unedited LLM. For BIMT, we apply the same LoRA-based editing method as in REdit.
Dataset
Metric
Raw
w/o MCL
w/o NSP
w/o PDP
Ours
Level 1
Generality
60.7±2.3
72.9±0.4
73.3±0.2
73.4±0.5
74.1±1.6
Locality
N/A
90.7±1.8
89.5±0.3
90.1±2.5
94.3±0.4
Level 2
Generality
53.2±1.4
62.5±0.3
62.4±1.6
61.3±2.0
64.8±1.2
Locality
N/A
94.9±0.6
93.0±1.8
94.0±0.8
94.3±0.5
Level 3
Generality
45.1±1.6
53.8±1.3
50.9±0.6
51.8±0.6
55.0±1.6
Locality
N/A
93.7±1.3
92.8±1.1
92.8±1.2
94.4±0.8
Table 2: Ablation studies on ContextHub evaluated with generality and locality metrics. The best and second-best scores are highlighted in bold and underlined , respectively.
Figure 4: Performance on unseen reasoning patterns after circuit reshaping with different ratios for training. REdit consistently outperforms baselines without reshaping.
Figure 5: Circuit–interference relationship before and after circuit reshaping. (a,b) Scatter plots of intra- and inter-pattern measurements show improved separability in interference and circuit distance. (c) Silhouette scores across reasoning patterns indicate consistent gains in cluster separation.
Figure 6: Evaluation on mathematical reasoning benchmark TemplateGSM.
Appendix figures & tables8 assets
Supplementary material from the paper’s appendix.
Appendix
Abstract Instance
Contextual Instance
(vxkgr∨caunc)→ybyz . Given ybyz is False, what is the value of caunc ?
If an area of land has experienced significant uplift or been shaped by powerful erosional forces, then the terrain will feature tall, steep mountains. Given that the area does not have tall, steep mountains, can it be determined if powerful erosional forces have shaped the land?
Appendix
Table 3: Level-1 example instantiations in ContextHub.
Math Template
Instantiated Problem
[NAME] sold [NUM1] [ITEM] to [her/his/their] friends in April at a [LOCATION] in [COUNTY] , [STATE] . In May, [PRONOUN] sold [NUM2] [ITEM] . How many [ITEM] did [NAME] sell altogether in April and May?
Rosy Plascencia sold 238 air fryers to her friends in April at a yoga studio boutique in Bracken County, Kentucky. In May, they sold 119 air fryers. How many air fryers did Rosy Plascencia sell altogether in April and May?
Appendix
Table 4: Example instantiations in TemplateGSM.
Figure 7: Comparison of accuracy between the original LLMs ( Raw ) and the unedited models after REdit circuit reshaping ( REdit (w/o Edit) ) across three difficulty levels of logical reasoning tasks. REdit consistently provides modest gains, with the most notable improvements at Level 1.
Figure 8: Case study of circuits from reasoning patterns I and II before and after REdit circuit reshaping. REdit enhances intra-pattern consistency while eliminating inter-pattern overlap.
Figure 9: Trade-off of REdit
Dataset
Metric
Raw
BIMT
LoRA
ROME
AlphaEdit
REdit
Level 1
Generality
47.1±0.1
68.3±0.1
64.8±0.4
57.3±0.1
69.4±0.4
70.8±0.1
Locality
N/A
72.2±0.3
76.3±0.6
76.5±0.1
76.3±2.1
80.6±0.5
Level 2
Generality
46.9±0.3
60.4±0.1
55.4±0.4
56.3±0.4
56.0±0.1
69.1±0.1
Locality
N/A
73.8±0.4
73.7±0.1
76.5±1.1
73.4±0.1
78.2±0.1
Level 3
Generality
55.3±0.1
62.6±0.1
62.0±0.4
59.5±0.4
62.3±0.5
65.6±0.2
Locality
N/A
87.6±0.1
87.0±0.4
88.0±0.1
87.3±0.2
87.3±0.1
Appendix
Table 5: Results on ContextHub with Gemma-3-1B-IT as the backbone. The best scores are highlighted in bold .
Date Template
Instantiated Question
Today is Christmas Eve of [YEAR] . What is the date tomorrow in MM/DD/YYYY? A. [CHOICE_A] B. [CHOICE_B] C. [CHOICE_C] D. [CHOICE_D] E. [CHOICE_E] F. [CHOICE_F]
Today is Christmas Eve of 1909. What is the date tomorrow in MM/DD/YYYY? A. 10/25/1909 B. 12/26/1909 C. 12/28/1909 D. 12/25/1910 E. 12/27/1909 F. 12/25/1909
Appendix
Table 6: Example template and instantiated question from the Date dataset.
Metric
Raw
BIMT
LoRA
ROME
AlphaEdit
REdit
Generality
41.5±1.1
55.3±1.0
44.2±0.2
49.5±0.7
50.8±0.4
57.6±0.3
Locality
N/A
67.8±0.3
87.6±0.8
91.2±1.1
89.2±1.1
90.7±0.5
Appendix
Table 7: Results on the Date dataset with Qwen-2.5-3B . The best scores are highlighted in bold .
National Engineering Research Center of Software Engineering, Peking University · School of Computer Science, Peking University · Key Laboratory of High Confidence Software Technologies, Ministry of Education +1