SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2406.18406 · NeurIPS · 2024

IRCAN: Mitigating Knowledge Conflicts in LLM Generation via Identifying and Reweighting Context-Aware Neurons

Dan Shi, Renren Jin, Tianhao Shen, Weilong Dong, Xinwei Wu, Deyi Xiong

arXiv · PDF · Open in the Atlas

Code that ran

11 of 12 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 9 failures of our instrument; 1 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2406.18406.json · badge: /api/ran/2406.18406.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
danshi777/ircan canonical (classifier label)
classifier basis: classifier_2025
9 ran · 0 no recorded run
danshi777/IRCAN canonical (classifier label)
classifier basis: census
2 ran · 1 no recorded run
FunctionStatusWhere it lives
completion_task_generation Ran
ran; our contract draft was wrong, not the code
danshi777/ircan/src/3_enhance_and_evaluate.py
pointer only (licence: NONE) · get_code("87348b6e69e519df")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, danshi777/ircan when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

convert_to_triplet_ig Ran
ran, honoured the contract we drafted
danshi777/ircan/src/1_calculate_attribution_completion.py
pointer only (licence: NONE) · get_code("7ca5f6affb7142af")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, danshi777/ircan when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

enhance_neurons Ran
ran; our contract draft was wrong, not the code
danshi777/ircan/src/utils/enhance_model.py
pointer only (licence: NONE) · get_code("f53b8b1219f680f8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, danshi777/ircan when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_context_attr Ran
ran; our contract draft was wrong, not the code
danshi777/ircan/src/1_calculate_attribution_completion.py
pointer only (licence: NONE) · get_code("2c0175fb3a85802d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, danshi777/ircan when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_context_attr Ran
ran; our contract draft was wrong, not the code
danshi777/IRCAN/src/1_calculate_attribution_mcq.py
pointer only (licence: NONE) · get_code("58b2480c8dfcb07b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, danshi777/IRCAN when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_information Ran
ran; our contract draft was wrong, not the code
danshi777/ircan/src/3_enhance_and_evaluate.py
pointer only (licence: NONE) · get_code("5c4128b72feca7a9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, danshi777/ircan when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_prompts Ran
ran; our contract draft was wrong, not the code
danshi777/ircan/src/3_enhance_and_evaluate.py
pointer only (licence: NONE) · get_code("e2d17a2e0e06f143")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, danshi777/ircan when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

pos_list2str Ran
ran; our contract draft was wrong, not the code
danshi777/ircan/src/utils/enhance_model.py
pointer only (licence: NONE) · get_code("dbb7a4fa7b6bb8d1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, danshi777/ircan when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

pos_str2list Ran
ran, honoured the contract we drafted
danshi777/ircan/src/utils/enhance_model.py
pointer only (licence: NONE) · get_code("dae759b7f6c3b29d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, danshi777/ircan when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

scaled_input Ran
ran; our contract draft was wrong, not the code
danshi777/ircan/src/1_calculate_attribution_completion.py
pointer only (licence: NONE) · get_code("0478177ef6964221")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, danshi777/ircan when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

scaled_input Ran
ran; our contract draft was wrong, not the code
danshi777/IRCAN/src/1_calculate_attribution_mcq.py
pointer only (licence: NONE) · get_code("4e8f7031219b2572")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, danshi777/IRCAN when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

analysis_context_file Not yet run
unverified (harvested, no recorded run)
danshi777/IRCAN/src/2_get_cns.py
pointer only (licence: NONE) · get_code("69e1d21af1cdf8ca")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, danshi777/IRCAN when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 0 later) and 9 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
pos_str2list
brick of this paper's assembly: helper
2 other papers
2 dated earlier · 1 only as an assembly brick
2104.08696 (2021-04)
Knowledge Neurons in Pretrained Transformers
2310.20138 (2023-10)
DEPN: Detecting and Editing Privacy Neurons in Pretrained Language Models
convert_to_triplet_ig 1 other paper
1 dated earlier
2310.20138 (2023-10)
DEPN: Detecting and Editing Privacy Neurons in Pretrained Language Models
pos_list2str
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2310.20138 (2023-10)
DEPN: Detecting and Editing Privacy Neurons in Pretrained Language Models

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

It is widely acknowledged that large language models (LLMs) encode a vast reservoir of knowledge after being trained on mass data. Recent studies disclose knowledge conflicts in LLM generation, wherein outdated or incorrect parametric knowledge (i.e., encoded knowledge) contradicts new knowledge provided in the context. To mitigate such knowledge conflicts, we propose a novel framework, IRCAN (Identifying and Reweighting Context-Aware Neurons) to capitalize on neurons that are crucial in processing contextual cues. Specifically, IRCAN first identifies neurons that significantly contribute to context processing, utilizing a context-aware attribution score derived from integrated gradients. Subsequently, the identified context-aware neurons are strengthened via reweighting. In doing so, we steer LLMs to generate context-sensitive outputs with respect to the new knowledge provided in the context. Extensive experiments conducted across a variety of models and tasks demonstrate that IRCAN not only achieves remarkable improvements in handling knowledge conflicts but also offers a scalable, plug-andplay solution that can be integrated seamlessly with existing models. Our codes are released at https://github.com/danshi777/IRCAN.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2406.18406")
get_code_for_paper("2406.18406")
have("2406.18406")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2406.18406.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2406.18406.svg)](https://syntology.ai/paper/2406.18406)

Connect an agent — have() is free.