PreprintCited by 16Software Engineering ResearchTopic ModelingModel-Driven Software Engineering Techniques

ContextCite: Attributing Model Generation to Context

Open access
Cohen-Wang, Benjamin, Shah, Harshay, Georgiev, Kristian, Madry, Aleksander·2024·arXiv

Abstract

How do language models use information provided as context when generating a response? Can we infer whether a particular generated statement is actually grounded in the context, a misinterpretation, or fabricated? To help answer these questions, we introduce the problem of context attribution: pinpointing the parts of the context (if any) that led a model to generate a particular statement. We then present ContextCite, a simple and scalable method for context attribution that can be applied on top of any existing language model. Finally, we showcase the utility of ContextCite through three applications: (1) helping verify generated statements (2) improving response quality by pruning the context and (3) detecting poisoning attacks. We provide code for ContextCite at https://github.com/MadryLab/context-cite.

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

DataCite · 10.48550/arxiv.2409.00729

Cites

65 of 65 references verified0 citation errors · 0 not checkable

Statistics

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

  • It is difficult to make data attribution robust in itself.

    “Although it is difficult to make such an attribution robust in itself (Cohen-Wang et al., 2024), similar issues as above arise where users may ignore additional information if it exceeds their expectation or becomes too tedious to review (Micallef et al., 2017).”

    From Design Patterns for Securing LLM Agents against Prompt Injections (2025) · cites this paper as Cohen-Wang et al., 2024

    The “Potential failure modes” section (page unavailable) says ContextCite’s attributions may be unfaithful in some cases and recommends checking whether they should be trusted. That supports a concern about reliability, but the paper does not establish the broader claim that making attribution robust is inherently difficult. (LLM, conf=0.78)

    Experimental — accuracy not yet measured

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Cites

Flagged first, then by citations

9 of the 74 references couldn’t be matched to a known paper.

Research works printed but not linked: 8

  1. Jonathan H Clark, Eunsol Choi, Michael Collins, Dan Garrette, Tom Kwiatkowski, Vitaly Nikolaev, and Jennimaria Palomaki. "Tydi qa: A benchmark for information-seeking ques- tion answering in ty pologically di verse languages". In: Transactions of the Association for Computational Linguistics 8 (2020), pp. 454-470.
  2. Enja Kokalj, Blaž Škrlj, Nada Lavrač, Senja Pollak, and Marko Robnik-Šikonja. "BERT meets shapley: Extending SHAP explanations to transformer-based classifiers". In: Proceedings of the EACL hackashop on news media content analysis and automated report generation. 2021, pp. 16-21.
  3. Behnam Mohammadi. "Wait, It's All Token Noise? Always Has Been: Interpreting LLM Behavior Using Shapley Value". In: arXiv preprint arXiv:2404.01332 (2024). · arXiv
  4. Marco Tulio Ribeiro, Sameer Singh, and Carlos Guestrin. ""Why Should I Trust You?": Explain- ing the Predictions of Any Classifier". In: International Conference on Knowledge Discovery and Data Mining (KDD). 2016.
  5. Martin J Wainwright. High-dimensional statistics: A non-asymptotic viewpoint. Vol. 48. Cambridge university press, 2019.
  6. Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, et al. "Transformers: State-of- the-art natural language processing". In: Proceedings of the 2020 conference on empirical methods in natural language processing: system demonstrations. 2020, pp. 38-45.
  7. Sarah Wiegreffe and Yuval Pinter. "Attention is not not explanation". In: arXiv preprint arXiv:1908.04626 (2019). · arXiv
  8. Kayo Yin and Graham Neubig. "Interpreting language models with contrastive explanations". In: arXiv preprint arXiv:2202.10419 (2022). · arXiv

Cited by

Sorted by citations

Authors
Cohen-Wang, B., Shah, H., Georgiev, K., & Madry, A.
Venue
arXiv
Publisher
arXiv
Published
2024
Pages
95764-95807
ISSN
1049-5258 (ISSN-L)
OpenAlex
W4415796230
Cited by
16
References
74
Citations by year
2026: 15 · 2025: 1
FWCI
6.08
Type
conference paper
Language
en
Open access
Locations
  • neural information processing systems (publishedVersion)
  • arXiv (Cornell University) (submittedVersion)
  • arXiv (Cornell University)
Funders
  • National Science Foundation (2134108)
  • Open Philanthropy Project
Topics
  • Physical Sciences › Computer Science › Information Systems › Software Engineering Research
  • Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
  • Physical Sciences › Computer Science › Software › Model-Driven Software Engineering Techniques
Keywords
model generation, attribution, context, explainable AI, large language models

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review