Wuwei Zhang, ♠ Fangcong, Yin Howard, Yen Danqi, Chen Xi
16 of 18 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; 0 honoured the contract we drafted, 0 violated it and 11 have no contract verdict; 5 failures of our instrument; 2 no recorded run); 1 of them was also run on the host, not in the jail, by the peer-agreement lane that set its level, measured 2026-11-23; 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/2506.09944.json · badge: /api/ran/2506.09944.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.
| Repository | Role | Ran |
|---|---|---|
| princeton-pli/QRHead | canonical (classifier label) classifier basis not recorded on the link |
16 ran · 2 no recorded run |
| Function | Status | Where it lives |
|---|---|---|
| repeat_kv | Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
princeton-pli/QRHead/src/qrretriever/custom_modeling_llama.py code served (permissive licence) · get_code("30d7eec482ebf6b1") How it ranRan in Syntology's jail on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 4, dtype family float, shape (2, 6, 5, 4) as a later run recorded it. The image it ran in was not recorded. The comparison behind this sample's level is a different run: the peer-agreement lane ran it again on the host, not in the jail (report dated 2026-09-04T23:09:20Z). If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
|
| apply_rotary_pos_emb | Ran ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT) |
princeton-pli/QRHead/src/qrretriever/custom_modeling_qwen2.py code served (permissive licence) · get_code("d61c483a3c2b3156") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned tuple, ndim 5, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
|
| apply_rotary_pos_emb | Ran ran; our contract draft was wrong, not the code |
princeton-pli/QRHead/src/qrretriever/custom_modeling_llama.py code served (permissive licence) · get_code("bac65c3dafaec040") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned tuple, ndim 5, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
|
| compute_recall | Ran ran on a synthesized input |
princeton-pli/QRHead/exp_scripts/retrieval/eval_retrieval.py code served (permissive licence) · get_code("6485b6194332b150") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
|
| generate_prompt | Ran ran on a synthesized input |
princeton-pli/QRHead/exp_scripts/generation/run_generation_lme.py code served (permissive licence) · get_code("f8bf3d9d30b922e6") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
|
| get_anscheck_prompt | Ran ran; our contract draft was wrong, not the code |
princeton-pli/QRHead/exp_scripts/generation/eval_generation_lme.py code served (permissive licence) · get_code("8e4f7c8ecedd17fa") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
|
| get_doc_scores_per_head | Ran ran on a synthesized input |
princeton-pli/QRHead/exp_scripts/detection/detect_qrhead_beir.py code served (permissive licence) · get_code("d81d0dbbee1e8828") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
|
| get_doc_scores_per_head | Ran ran on a synthesized input |
princeton-pli/QRHead/exp_scripts/detection/detect_qrhead_lme.py code served (permissive licence) · get_code("009654fea103956a") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
|
| get_top_k_docs | Ran ran on a synthesized input |
princeton-pli/QRHead/exp_scripts/retrieval/eval_retrieval.py code served (permissive licence) · get_code("30515a995de52d2d") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
|
| get_topk_doc_idx | Ran ran on a synthesized input |
princeton-pli/QRHead/exp_scripts/generation/run_generation_clipper.py code served (permissive licence) · get_code("84ed72a7f256783d") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
|
| lme_eval | Ran ran on a synthesized input |
princeton-pli/QRHead/exp_scripts/detection/detect_qrhead_lme.py code served (permissive licence) · get_code("46d639c95b19b2e5") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float64, ndim 0, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
|
| load_config | Ran ran on a synthesized input |
princeton-pli/QRHead/src/qrretriever/config.py code served (permissive licence) · get_code("229e3b5a73665fb2") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
|
| merge_configs | Ran ran on a synthesized input |
princeton-pli/QRHead/src/qrretriever/config.py code served (permissive licence) · get_code("1b2be7c22837418d") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
|
| parse_file | Ran ran on a synthesized input |
princeton-pli/QRHead/exp_scripts/generation/eval_generation_clipper.py code served (permissive licence) · get_code("1340e53f675329ea") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
|
| rotate_half | Ran ran; our contract draft was wrong, not the code |
princeton-pli/QRHead/src/qrretriever/custom_modeling_llama.py code served (permissive licence) · get_code("b99eea6376d1e212") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
|
| score_heads | Ran ran on a synthesized input |
princeton-pli/QRHead/exp_scripts/detection/detect_qrhead_lme.py code served (permissive licence) · get_code("b3336deddac204eb") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
|
| extract_relevant_rounds | Not yet run unverified (harvested, no recorded run) |
princeton-pli/QRHead/exp_scripts/generation/run_generation_lme.py code served (permissive licence) · get_code("63bfa7b825473d3d") How it ranno invocation recorded. |
| prepare_prompt_for_generation | Not yet run unverified (harvested, no recorded run) |
princeton-pli/QRHead/exp_scripts/generation/run_generation_clipper.py code served (permissive licence) · get_code("ff68a23061cdf19a") How it ranno invocation recorded. |
Of 18 samples lifted from this paper's linked repositories, 18 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 5 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 3 the same month, 5 later) and 13 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.
| Function | Also present in | Earliest-dated | Others named |
|---|---|---|---|
| rotate_half | 360 other papers 282 dated earlier, 10 the same month, 60 later, 5 same year, order not determinable, 3 undated · 30 only as an assembly brick |
1901.02860 (2019-01) Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context |
2203.08913 (2022-03) Memorizing Transformers 2302.13971 (2023-02) LLaMA: Open and Efficient Foundation Language Models and 357 more not named here |
| repeat_kv | 243 other papers 192 dated earlier, 5 the same month, 40 later, 4 same year, order not determinable, 2 undated · 22 only as an assembly brick |
1901.02860 (2019-01) Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context |
2203.08913 (2022-03) Memorizing Transformers 2305.17888 (2023-05) LLM-QAT: Data-Free Quantization Aware Training for Large Language Models and 240 more not named here |
| apply_rotary_pos_emb | 94 other papers 64 dated earlier, 4 the same month, 21 later, 2 same year, order not determinable, 3 undated · 6 only as an assembly brick |
1901.02860 (2019-01) Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context |
2305.17888 (2023-05) LLM-QAT: Data-Free Quantization Aware Training for Large Language Models 2309.11674 (2023-09) A Paradigm Shift in Machine Translation: Boosting Translation Performance of Large Language Models and 91 more not named here |
| apply_rotary_pos_emb | 75 other papers 65 dated earlier, 9 later, 1 same year, order not determinable · 2 only as an assembly brick |
2309.11499 (2023-09) DreamLLM: Synergistic Multimodal Comprehension and Creation |
2312.02051 (2023-12) TimeChat: A Time-sensitive Multimodal Large Language Model for Long Video Understanding 2312.03414 (2023-12) Compressed Context Memory For Online Language Model Interaction and 72 more not named here |
| get_anscheck_prompt | 3 other papers 1 dated earlier, 2 later |
2410.10813 (2024-10) LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memory |
2510.18866 (2025-10) LightMem: Lightweight and Efficient Memory-Augmented Generation 2601.01280 (2026-01) Does Memory Need Graphs? A Unified Framework and Empirical Analysis for Long-Term Dialog Memory |
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-23.
Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.
Recent work has identified retrieval heads (Wu et al., 2025b), a subset of attention heads responsible for retrieving salient information in long-context language models (LMs), as measured by their copy-paste behavior in Needlein-a-Haystack tasks. In this paper, we introduce QRHEAD (Query-Focused Retrieval Head), an improved set of attention heads that enhance retrieval from long context. We identify QRHEAD by aggregating attention scores with respect to the input query, using a handful of examples from real-world tasks (e.g., long-context QA). We further introduce QR-RETRIEVER, an efficient and effective retriever that uses the accumulated attention mass of QRHEAD as retrieval scores. We use QR-RETRIEVER for long-context reasoning by selecting the most relevant parts with the highest retrieval scores. On multi-hop reasoning tasks LongMemEval and CLIPPER, this yields over 10% performance gains over full context and outperforms strong dense retrievers. We also evaluate QRRETRIEVER as a re-ranker on the BEIR benchmark and find that it achieves strong zero-shot performance, outperforming other LLM-based re-rankers such as RankGPT. Further analysis shows that both the querycontext attention scoring and task selection are crucial for identifying QRHEAD with strong downstream utility. Overall, our work contributes a general-purpose retriever and offers interpretability insights into the long-context capabilities of LMs. 1
The same record, over MCP at https://syntology.ai/mcp:
get_harvested_code_for_paper("2506.09944")
get_code_for_paper("2506.09944")
have("2506.09944")
The run record, dated, one paper per request, free:
curl https://syntology.ai/api/ran/2506.09944.json
A badge for a README (the split and the date, never a ratio):
[](https://syntology.ai/paper/2506.09944)
Connect an agent — have() is free.