Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

English · 简体中文

The Override Gap: A Magnitude Account of Knowledge Conflict Failure in Hypernetwork-Based Instant LLM Adaptation

Shuaizhi Cheng1,2   Xiang Shi2   Zhiwei Zhang2,3   Mingwei Li2

1Harbin Institute of Technology   2KigLand Machine Learning Lab   3CEREA, ENPC, EDF R&D, Institut Polytechnique de Paris, Île-de-France

arXiv OpenReview NeurIPS 2026 License: MIT

We study how document-generated adapters compete with pretrained knowledge. The code includes Selective Layer Boosting (SLB), Conflict-Aware Internalization (CA), matched-norm controls, and evaluation on Gemma-2B, Mistral-7B, and Qwen-4B.

Data and results

  • data/kid_bench.jsonl: 486 questions—245 novel recall, 47 mixed knowledge, and 194 conflicts (64 light, 61 medium, 69 deep).
  • data/compositional_qa.jsonl: 50 two-hop questions over 25 documents.
  • data/external_conflicts.jsonl: 30 additional questions, with the conflict and unambiguous subsets identified in each record.
  • results/: model answers and scores for the main evaluation, scaling controls, compositional QA, external conflicts, SQuAD, and retention; base-model prior scores are in prior_strength.jsonl.

Question records contain uid, group, fact_id, document, question, answer, and accepted_answers. answer_note supplies any interpretation needed for scoring. Result records join to questions by uid. Semantic labels use DeepSeek v4.1 Flash (1017). Accuracy bounds count uncertain labels as incorrect or correct; paired differences share the label of identical answers.

Recompute results

Use Python 3.11 and run commands from the repository root.

pip install -e '.[plots]'
python -m override_gap.analyze --output outputs/accuracy.csv
python -m override_gap.analyze --input results/scaling_controls.jsonl --contrast slb global_matched_increment
python -m override_gap.routing --output outputs/routing.json
python -m override_gap.standard --summarize results/retention.jsonl
python -m override_gap.plot --output outputs/accuracy.pdf

The other SLB comparators are random_layers_seed_mean, bottom_k, and increment_direction_seed_mean. Use --dataset composition or --dataset external with analyze for those result files. SQuAD scores can be aggregated with standard --summarize results/squad.jsonl.

Run experiments

Inference uses CUDA, PyTorch 2.6.0, and Doc-to-LoRA. Install its pinned runtime, then download the checkpoint for the model you want to evaluate. Base models are loaded from Hugging Face; Gemma requires access to its model repository.

pip install -r requirements-gpu.txt
pip install --no-deps 'git+https://github.com/SakanaAI/doc-to-lora.git@baa85db4d5df9b29d618af432d6ebf28b3ad5a29'
huggingface-cli login
python -m override_gap.download --model gemma
python -m override_gap.run --model gemma --output outputs/gemma.jsonl
python -m override_gap.run --model gemma --experiment controls --control global --subset C_all --output outputs/gemma_global.jsonl

Models are gemma, mistral, and qwen. The main run generates the base-model probe, baseline, SLB, always-strong, and CA answers. SLB boosts the top 25% of layers with β=1.75 for Gemma/Mistral and β=3 for Qwen. Controls are global, layers, and direction; use --beta 3 for the stronger setting. --experiment rag, sweep, and prior run the document-in-context comparisons, boost sweep, and base-model answer likelihoods. --dataset composition and --dataset external select the additional question sets.

To score new answers, set JUDGE_API_KEY, JUDGE_BASE_URL, and JUDGE_MODEL for a DeepSeek-compatible chat-completions endpoint, then run:

python -m override_gap.score --input outputs/gemma.jsonl --output outputs/gemma_scored.jsonl
python -m override_gap.analyze --input outputs/gemma_scored.jsonl

For SQuAD, download the official development JSON. Retention uses the test parquet from GSM8K and the multiple-choice validation parquet from TruthfulQA.

python -m override_gap.standard --task squad --model gemma --data dev-v1.1.json --output outputs/squad.jsonl
python -m override_gap.standard --task gsm8k --model gemma --data gsm8k_test.parquet --output outputs/gsm8k.jsonl
python -m override_gap.standard --task truthfulqa --model gemma --data truthfulqa_mc.parquet --output outputs/truthfulqa.jsonl

SQuAD uses the first 200 questions and token F1. Retention samples 200 questions per benchmark with seed 42 and averages over three unrelated KID-Bench documents. GSM8K uses a 256-token budget; TruthfulQA MC1 selects the answer with the highest summed conditional log probability.

Tests and license

pip install -e '.[test]'
python -m unittest discover -s tests -v

Code and KID-Bench data are provided under the MIT license. Chat templates come from Sakana AI's Doc-to-LoRA. Model weights and third-party benchmarks are obtained from their original repositories under their respective licenses.

Citation

@inproceedings{cheng2026overridegap,
  title={The Override Gap: A Magnitude Account of Knowledge Conflict Failure in Hypernetwork-Based Instant LLM Adaptation},
  author={Cheng, Shuaizhi and Shi, Xiang and Zhang, Zhiwei and Li, Mingwei},
  booktitle={Advances in Neural Information Processing Systems},
  year={2026},
  url={https://openreview.net/forum?id=n1UpRVEiaQ}
}

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages