ContextCite: Attributing Model Generation to Context
The DOI matches its Crossref record; 30 of the 30 references it cites were found in a registry or an index.
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.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
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?
The source backs part of the claim, not all of it — or backs it for a different population, condition or comparison.
In the citing paper
“Existing contributive attribution methods for LLMs typically require extensive context ablations or other computationally expensive techniques, such as gradient-based analysis during inference (Cohen-Wang et al., 2024;Qi et al., 2024;Phukan et al., 2024).”
From SelfCite: Self-Supervised Alignment for Context Attribution in Large Language Models (2025) · cites this paper as Cohen-Wang et al., 2024
Experimental — accuracy not yet measuredThe cited source says what the claim attributes to it.
In the citing paper
“ContextCite then approximates g(v) using a sparse linear function, ĝ(v) = ŵ⊤ v + b.”
From SelfCite: Self-Supervised Alignment for Context Attribution in Large Language Models (2025) · cites this paper as Cohen-Wang et al., 2024
In the citing paper
“Notice that resulting weights ŵ ∈ R |C| encode the importance of each source c i to the probability of generating the original response; they can be interpreted directly as attribution scores (higher scores suggest greater importance).”
From SelfCite: Self-Supervised Alignment for Context Attribution in Large Language Models (2025) · cites this paper as Cohen-Wang et al., 2024
In the citing paper
“In this section, we first describe how the ContextCite method (Cohen-Wang et al., 2024) estimates continuous attribution scores for each sentence in the context.”
From SelfCite: Self-Supervised Alignment for Context Attribution in Large Language Models (2025) · cites this paper as Cohen-Wang et al., 2024
In the citing paper
“In Cohen-Wang et al. (2024), typical choices of n range from 32 to 256, balancing cost (requires n LM forward passes) and accuracy.”
From SelfCite: Self-Supervised Alignment for Context Attribution in Large Language Models (2025) · cites this paper as Cohen-Wang et al., 2024
2 more claims about this paper
Create a free account to see every claim other papers make about this one.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps
Simonyan, K., Vedaldi, A., & Zisserman, A. (2013) · arXiv · doi:10.48550/arxiv.1312.6034 · Cited by 5,370
Abstractive Text Summarization using Sequence-to-sequence RNNs and Beyond
Nallapati, R., Zhou, B., dos Santos, C., Gulcehre, C., & Xiang, B. (2016) · Proceedings of The 20th SIGNLL Conference on Computational Natural Language Learning · doi:10.18653/v1/k16-1028 · Cited by 2,361
SmoothGrad: removing noise by adding noise
Smilkov, D., Thorat, N., Kim, B., Viégas, F., & Wattenberg, M. (2017) · arXiv · doi:10.48550/arxiv.1706.03825 · Cited by 1,467
Attention is not not Explanation
Wiegreffe, S., & Pinter, Y. (2019) · Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP) · doi:10.18653/v1/d19-1002 · Cited by 966
LaMDA: Language Models for Dialog Applications
Thoppilan, R., De Freitas, D., Hall, J., Shazeer, N., Kulshreshtha, A., Cheng, H.-T., Jin, A., Bos, T., Baker, L., Du, Y., et al. (2022) · arXiv · doi:10.48550/arxiv.2201.08239 · Cited by 778
Not Just a Black Box: Learning Important Features Through Propagating Activation Differences
Shrikumar, A., Greenside, P., Shcherbina, A., & Kundaje, A. B. (2016) · arXiv (Cornell University) · doi:10.48550/arxiv.1605.01713 · Cited by 496
Jain, S., & Wallace, B. (2019) · arXiv (Cornell University) · doi:10.48550/arxiv.1902.10186 · Cited by 467
Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks
Reimers, N., & Gurevych, I. (2019) · arXiv · doi:10.48550/arxiv.1908.10084 · Cited by 343
Jiang, A. Q., Sablayrolles, A., Mensch, A., Bamford, C., Chaplot, D. S., Casas, D. D. L., Bressand, F., Lengyel, G., Lample, G., Saulnier, L., et al. (2023) · arXiv · doi:10.48550/arxiv.2310.06825 · Cited by 340
TRAK: Attributing Model Behavior at ScalePreprint
Park, S., Georgiev, K., Ilyas, A., Leclerc, G., & Mądry, A. (2023) · arXiv (Cornell University) · doi:10.48550/arxiv.2303.14186 · Cited by 293
Self-citationWebGPT: Browser-assisted question-answering with human feedback
Nakano, R., Hilton, J., Balaji, S., Wu, J., Ouyang, L., Kim, C., Hesse, C., Jain, S., Kosaraju, V., Saunders, W., et al. (2021) · arXiv · doi:10.48550/arxiv.2112.09332 · Cited by 272
DROP: A Reading Comprehension Benchmark Requiring Discrete Reasoning Over Paragraphs
Dua, D., Wang, Y., Dasigi, P., Stanovsky, G., Singh, S., & Gardner, M. (2019) · arXiv · doi:10.48550/arxiv.1903.00161 · Cited by 238
Universal and Transferable Adversarial Attacks on Aligned Language Models
Zou, A., Wang, Z., Carlini, N., Nasr, M., Kolter, J. Z., & Fredrikson, M. (2023) · arXiv · doi:10.48550/arxiv.2307.15043 · Cited by 197
Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phone
Abdin, M., Aneja, J., Awadalla, H., Awadallah, A., Awan, A. A., Bach, N., Bahree, A., Bakhtiari, A., Bao, J., Behl, H., et al. (2024) · arXiv · doi:10.48550/arxiv.2404.14219 · Cited by 166
Complex Claim Verification with Evidence Retrieved in the WildPreprint
Chen, J.-F., Kim, G., Sriram, A., Durrett, G., & Choi, E. (2023) · North American Chapter of the Association for Computational Linguistics · doi:10.48550/arxiv.2305.11859 · Cited by 154
DataInf: Efficiently Estimating Data Influence in LoRA-tuned LLMs and Diffusion Models
Kwon, Y., Wu, E., Wu, K., & Zou, J. (2023) · International Conference on Learning Representations · doi:10.48550/arxiv.2310.00902 · Cited by 150
AtP*: An efficient and scalable method for localizing LLM behaviour to components
Kramár, J., Lieberum, T., Shah, R., & Nanda, N. (2024) · arXiv · doi:10.48550/arxiv.2403.00745 · Cited by 120
Ignore Previous Prompt: Attack Techniques For Language Models
Perez, F., & Ribeiro, I. (2022) · arXiv · doi:10.48550/arxiv.2211.09527 · Cited by 110
In-context Example Selection with InfluencesPreprint
Nguyen, T. D., & Wong, E. (2023) · arXiv (Cornell University) · doi:10.48550/arxiv.2302.11042 · Cited by 99
HotpotQA: A Dataset for Diverse, Explainable Multi-hop Question Answering
Yang, Z., Qi, P., Zhang, S., Bengio, Y., Cohen, W. W., Salakhutdinov, R., & Manning, C. D. (2018) · arXiv · doi:10.48550/arxiv.1809.09600 · Cited by 97
Teaching language models to support answers with verified quotes
Menick, J., Trebacz, M., Mikulik, V., Aslanides, J., Song, F., Chadwick, M., Glaese, M., Young, S., Campbell-Gillingham, L., Irving, G., et al. (2022) · arXiv · doi:10.48550/arxiv.2203.11147 · Cited by 53
Attributed Question Answering: Evaluation and Modeling for Attributed Large Language Models
Bohnet, B., Tran, V. Q., Verga, P., Aharoni, R., Andor, D., Soares, L. B., Ciaramita, M., Eisenstein, J., Ganchev, K., Herzig, J., et al. (2022) · arXiv · doi:10.48550/arxiv.2212.08037 · Cited by 30
Chern, I.-C., Chern, S., Chen, S., Yuan, W., Feng, K., Zhou, C., He, J., Neubig, G., & Liu, P. (2023) · arXiv · doi:10.48550/arxiv.2307.13528 · Cited by 29
Studying Large Language Model Generalization with Influence Functions
Grosse, R., Bae, J., Anil, C., Elhage, N., Tamkin, A., Tajdini, A., Steiner, B., Li, D., Durmus, E., Perez, E., et al. (2023) · arXiv · doi:10.48550/arxiv.2308.03296 · Cited by 26
Decomposing and Editing Predictions by Modeling Model ComputationPreprint
Shah, H., Ilyas, A., & Mądry, A. (2024) · arXiv (Cornell University) · doi:10.48550/arxiv.2404.11534 · Cited by 26
Self-citationFActScore: Fine-grained Atomic Evaluation of Factual Precision in Long Form Text Generation
Min, S., Krishna, K., Lyu, X., Lewis, M., Yih, W.-T., Koh, P. W., Iyyer, M., Zettlemoyer, L., & Hajishirzi, H. (2023) · arXiv · doi:10.48550/arxiv.2305.14251 · Cited by 14
(2022) · doi:10.48550/arxiv.2210.08726 · Cited by 12
Quantifying the Plausibility of Context Reliance in Neural Machine TranslationPreprint
Sarti, G., Chrupała, G., Nissim, M., & Bisazza, A. (2023) · arXiv (Cornell University) · doi:10.48550/arxiv.2310.01188 · Cited by 12
PURR: Efficiently Editing Language Model Hallucinations by Denoising Language Model Corruptions
Chen, A., Pasupat, P., Singh, S., Lee, H., & Guu, K. (2023) · arXiv · doi:10.48550/arxiv.2305.14908 · Cited by 7
Attention Sorting Combats Recency Bias In Long Context Language Models
Peysakhovich, A., & Lerer, A. (2023) · arXiv · doi:10.48550/arxiv.2310.01427 · Cited by 6
Research works printed but not linked: 39
- Samira Abnar and Willem Zuidema. "Quantifying attention flow in transformers". In: arXiv preprint arXiv:2005.00928 (2020). · arXiv
- Steven Bird, Ewan Klein, and Edward Loper. Natural language processing with Python: analyzing text with the natural language toolkit. " O'Reilly Media, Inc.", 2009.
- 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.
- Ting-Yun Chang and Robin Jia. "Data curation alone can stabilize in-context learning". In: arXiv preprint arXiv:2212.10378 (2022). · arXiv
- Ian Covert, Scott Lundberg, and Su-In Lee. "Explaining by removing: A unified framework for model explanation". In: Journal of Machine Learning Research 22.209 (2021), pp. 1-90.
- Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Amy Yang, Angela Fan, et al. "The llama 3 herd of models". In: arXiv preprint arXiv:2407.21783 (2024). · arXiv
- Yanzhuo Ding, Yang Liu, Huanbo Luan, and Maosong Sun. "Visualizing and understanding neural machine translation". In: Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers). 2017, pp. 1150-1159.
- Joseph Enguehard. "Sequential Integrated Gradients: a simple but effective method for ex- plaining language models". In: arXiv preprint arXiv:2305.15853 (2023). · arXiv
- Kai Greshake, Sahar Abdelnabi, Shailesh Mishra, Christoph Endres, Thorsten Holz, and Mario Fritz. "Not what you've signed up for: Compromising real-world llm-integrated applications with indirect prompt injection". In: Proceedings of the 16th ACM Workshop on Artificial Intelligence and Security. 2023, pp. 79-90.
- Tianyu Gao, Howard Yen, Jiatong Yu, and Danqi Chen. "Enabling large language models to generate text with citations". In: arXiv preprint arXiv:2305.14627 (2023). · arXiv
- Lei Huang, Weijiang Yu, Weitao Ma, Weihong Zhong, Zhangyin Feng, Haotian Wang, Qiang- long Chen, Weihua Peng, Xiaocheng Feng, Bing Qin, et al. "A survey on hallucination in large language models: Principles, taxonomy, challenges, and open questions". In: arXiv preprint arXiv:2311.05232 (2023). · arXiv
- Andrew Ilyas, Sung Min Park, Logan Engstrom, Guillaume Leclerc, and Aleksander Madry. "Datamodels: Predicting Predictions from Training Data". In: International Conference on Machine Learning (ICML). 2022.
- Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, et al. "Natural questions: a benchmark for question answering research". In: Transactions of the Association for Computational Linguistics 7 (2019), pp. 453-466.
- 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.
- Adam Tauman Kalai and Santosh S Vempala. "Calibrated language models must hallucinate". In: arXiv preprint arXiv:2311.14648 (2023). · arXiv
- Jiwei Li, Xinlei Chen, Eduard Hovy, and Dan Jurafsky. "Visualizing and understanding neural models in NLP". In: arXiv preprint arXiv:1506.01066 (2015). · arXiv
- Scott Lundberg and Su-In Lee. "A unified approach to interpreting model predictions". In: Neural Information Processing Systems (NeurIPS). 2017.
- Nelson F Liu, Kevin Lin, John Hewitt, Ashwin Paranjape, Michele Bevilacqua, Fabio Petroni, and Percy Liang. "Lost in the middle: How language models use long contexts". In: Transactions of the Association for Computational Linguistics 12 (2024), pp. 157-173.
- Jaesong Lee, Joong-Hwi Shin, and Jun-Seok Kim. "Interactive visualization and manipulation of attention-based neural machine translation". In: Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing: System Demonstrations. 2017, pp. 121-126.
- Nelson F Liu, Tianyi Zhang, and Percy Liang. "Evaluating verifiability in generative search engines". In: arXiv preprint arXiv:2304.09848 (2023). · arXiv
- 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
- Tri Nguyen, Mir Rosenberg, Xia Song, Jianfeng Gao, Saurabh Tiwary, Rangan Majumder, and Li Deng. Ms marco: A human-generated machine reading comprehension dataset. 2016. URL: https://openreview.net/forum?id=Hk1iOLcle.
- Dario Pasquini, Martin Strohmeier, and Carmela Troncoso. "Neural Exec: Learning (and Learn- ing from) Execution Triggers for Prompt Injection Attacks". In: arXiv preprint arXiv:2403.03792 (2024). · arXiv
- F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay. "Scikit-learn: Machine Learning in Python". In: vol. 12. 2011, pp. 2825-2830.
- Jirui Qi, Gabriele Sarti, Raquel Fern'andez, and Arianna Bisazza. "Model Internals-based Answer Attribution for Trustworthy Retrieval-Augmented Generation". In: 2024. URL: https: //api.semanticscholar.org/CorpusID:270619780.
- Hannah Rashkin, Vitaly Nikolaev, Matthew Lamm, Lora Aroyo, Michael Collins, Dipanjan Das, Slav Petrov, Gaurav Singh Tomar, Iulia Turc, and David Reitter. "Measuring attribution in natural language generation models". In: Computational Linguistics 49.4 (2023), pp. 777-840.
- 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.
- Kacper Sokol, Alexander Hepburn, Raul Santos-Rodriguez, and Peter Flach. "bLIMEy: Surro- gate Prediction Explanations Beyond LIME". In: Arxiv preprint arXiv:1910.13016. 2019. · arXiv
- Charles Spearman. "The Proof and Measurement of Association between Two Things". In: The American Journal of Psychology. 1904.
- Sofia Serrano and Noah A Smith. "Is attention interpretable?" In: arXiv preprint arXiv:1906.03731 (2019). · arXiv
- Jerome Sacks, William J. Welch, Toby J. Mitchell, and Henry P. Wynn. "Design and Analysis of Computer Experiments". In: Statistical Science. Vol. 4. Institute of Mathematical Statistics, 1989, pp. 409-423. URL: http://www.jstor.org/stable/2245858.
- Robert Tibshirani. "Regression Shrinkage and Selection Via the Lasso". In: Journal of the Royal Statistical Society, Series B. 1994.
- Martin J Wainwright. High-dimensional statistics: A non-asymptotic viewpoint. Vol. 48. Cambridge university press, 2019.
- 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.
- Eric Wallace, Shi Feng, Nikhil Kandpal, Matt Gardner, and Sameer Singh. "Universal adversar- ial triggers for attacking and analyzing NLP". In: arXiv preprint arXiv:1908.07125 (2019). · arXiv
- Theodora Worledge, Judy Hanwen Shen, Nicole Meister, Caleb Winston, and Carlos Guestrin. "Unifying corroborative and contributive attributions in large language models". In: arXiv preprint arXiv:2311.12233 (2023). · arXiv
- Rose E Wang, Pawan Wirawarn, Omar Khattab, Noah Goodman, and Dorottya Demszky. "Backtracing: Retrieving the Cause of the Query". In: arXiv preprint arXiv:2403.03956 (2024). · arXiv
- Kayo Yin and Graham Neubig. "Interpreting language models with contrastive explanations". In: arXiv preprint arXiv:2202.10419 (2022). · arXiv
- Xi Ye, Ruoxi Sun, Sercan Arik, and Tomas Pfister. "Effective Large Language Model Adaptation for Improved Grounding and Citation Generation". In: Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies (Volume 1: Long Papers). 2024, pp. 6237-6251.
Cited by
Design Patterns for Securing LLM Agents against Prompt Injections
Beurer-Kellner, L., Buesser, B., Creţu, A.-M., Debenedetti, E., Dobos, D., Fabian, D., Fischer, M., Froelicher, D., Grosse, K., Naeff, D., et al. (2025) · arXiv · doi:10.48550/arxiv.2506.08837 · Cited by 2
SelfCite: Self-Supervised Alignment for Context Attribution in Large Language Models
Chuang, Y.-S., Cohen-Wang, B., Shen, S. Z., Wu, Z., Xu, H., Lin, X. V., Glass, J., Li, S.-W., & Yih, W.-T. (2025) · arXiv · doi:10.48550/arxiv.2502.09604
Self-citation
Metadata
- Authors
- Cohen-Wang, B., Shah, H., Georgiev, K., & Madry, A.
- Venue
- Advances in Neural Information Processing Systems 37
- Published
- 2024
- Pages
- 95764-95807
- Cited by
- 27
- References
- 30
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
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.