AI summary · arXiv: 2409.00729v2 · cs.LG

ContextCite: Attributing Model Generation to Context

Benjamin Cohen-Wang, Harshay Shah, Kristian Georgiev, Aleksander Madry
Original paper · DOI 10.52202/079017-3035 Submitted to arXiv on 01 Sep. 2024 Published in Advances in Neural Information Processing Systems 37 (2024) License: NONEXCLUSIVE-DISTRIB 1.0

How to read this summary? Illustrated guide

The essentials

  • Research paper titled "ContextCite: Attributing Model Generation to Context" by Benjamin Cohen-Wang, Harshay Shah, Kristian Georgiev, and Aleksander Madry
  • Explores how language models use contextual information in generating responses
  • Introduces concept of context attribution to identify elements influencing model-generated statements
  • Proposes ContextCite as a method for attributing context, compatible with any language model
  • Demonstrates utility through verifying statement accuracy, enhancing response quality, and detecting poisoning attacks
  • Provides access to ContextCite code on GitHub (https://github.com/MadryLab/context-cite)
  • Contributes valuable insights to natural language processing and machine learning fields

Key points written by AI: they may contain errors, check them against the paper.

AI-generated keywords: Context Attribution Language Models Natural Language Processing Machine Learning Model Generation

Read further

  • Comprehensive Summary
  • Layman's Summary
  • Blog article
  • Original abstract
"ContextCite: Attributing Model Generation to Context" is a research paper authored by Benjamin Cohen-Wang, Harshay Shah, Kristian Georgiev, and Aleksander Madry. The paper delves into the intricate process of how language models utilize contextual information when generating responses. It poses questions about the authenticity of generated statements and introduces the concept of context attribution to address these queries. This involves identifying specific elements within the context that influenced a model to produce a particular statement. The authors propose ContextCite as a straightforward and scalable method for attributing context, which can be seamlessly integrated with any existing language model. They demonstrate its utility through three key applications: verifying accuracy of generated statements, enhancing response quality by pruning irrelevant parts of context, and detecting poisoning attacks aimed at manipulating model outputs. In addition to presenting their methodology and findings, the authors provide access to the code for ContextCite on GitHub (https://github.com/MadryLab/context-cite). Through their comprehensive exploration of context attribution in language models, this paper contributes valuable insights to the fields of natural language processing and machine learning.

Was this synthesis useful?

Score: 0

Why do we need votes?

Votes are used to determine whether we need to re-run our summarizing tools. If the count reaches -10, our tools can be restarted.

Figures and plots

Ask about a figure by number or use its question button to request visual analysis. Up to two figures and four image panels per question. Values read from plots are approximate; check the original data.

AI assistant instructions?

Tools for this paper

Explain it differently 1 free rewrite left today
Save to a collection Group papers in collections to compare them, chat with them and export them. Continue with Google Create a free account Log in

Advanced tools Premium

For researchers who follow a field closely: citation alerts, journal-club slides, version comparison and Zotero export. Discover Premium

Zotero Zotero guide
Citation alerts 136 papers already cite it: be emailed each new one. Citation alerts guide
Who works on it?

Among the 31 papers around this one, the name that comes back most: Gabriele Sarti (2 papers)

2 more people sign several of them. The full map adds their institutions and approaches, from the papers of the last years.

Continue with Google Create a free account: your first map is free
Weekly letter The latest letter of its field, "Artificial intelligence this week" of 23 November 2026: Artificial intelligence this week: The difference between looking right and getting it right · Receive one by email for free

Papers around this one

See them on a map

Ranked by how close their title and abstract are to this paper’s. Select some to read them together.

Closest papers

  1. Very close Cited by this paper Cites this paper
    Model Internals-based Answer Attribution for Trustworthy Retrieval-Augmented Generation
    Jirui Qi, Gabriele Sarti, Raquel Fernández et al. · 2024 · Conference on Empirical Methods in Natural Language Processing · cited 40 times · Not summarized yet
    Abstract

    Ensuring the verifiability of model answers is a fundamental challenge for retrieval-augmented generation (RAG) in the question answering (QA) domain. Recently, self-citation prompting was proposed to make large language models (LLMs) generate citations to supporting documents along with their answers. However, self-citing LLMs often struggle to match the required format, refer to non-existent sources, and fail to faithfully reflect LLMs’ context usage throughout the generation. In this work, we present MIRAGE – Model Internals-based RAG Explanations – a plug-and-play approach using model internals for faithful answer attribution in RAG applications. MIRAGE detects context-sensitive answer t…

  2. Very close Cites this paper Uses this paper in depth
    Attributing Response to Context: A Jensen-Shannon Divergence Driven Mechanistic Study of Context Attribution in Retrieval-Augmented Generation
    Ruizhe Li, Chen Chen, Yu-Chen Hu et al. · 2025 · arXiv.org · preprint, not peer reviewed · cited 19 times · Not summarized yet
    Abstract

    Retrieval-Augmented Generation (RAG) leverages large language models (LLMs) combined with external contexts to enhance the accuracy and reliability of generated responses. However, reliably attributing generated content to specific context segments, context attribution, remains challenging due to the computationally intensive nature of current methods, which often require extensive fine-tuning or human annotation. In this work, we introduce a novel Jensen-Shannon Divergence driven method to Attribute Response to Context (ARC-JSD), enabling efficient and accurate identification of essential context sentences without additional fine-tuning, gradient-calculation or surrogate modelling. Evaluati…

  3. Close Cites this paper
    Context Attribution with Multi-Armed Bandit Optimization
    Deng Pan, K. Murugesan, Ting Hua et al. · 2025 · Annual Meeting of the Association for Computational Linguistics · cited 3 times · Not summarized yet
    Abstract

    Understanding which parts of the retrieved context contribute to a large language model's generated answer is essential for building interpretable and trustworthy retrieval-augmented generation. We propose a novel framework that formulates context attribution as a combinatorial multi-armed bandit problem. We utilize Linear Thompson Sampling to efficiently identify the most influential context segments while minimizing the number of model queries. Our reward function leverages token log-probabilities to measure how well a subset of segments supports the original response, making it applicable to both open-source and black-box API-based models. Unlike SHAP and other perturbation-based methods …

  4. Close Cites this paper
    How Context Attribution Handles What the Model Already Knows
    Quoc-Huy Trinh, Linchao Zhu, Sebastian Szyller · 2026 · arXiv.org · preprint, not peer reviewed · Not summarized yet
    Abstract

    Context attribution methods for large language models (LLMs) identify which input context contributes to the model response. Recent works show the initial success in attributing the con- tributive score of the contexts. However, we observe that when the context overlaps with the training data, these methods can- not disentangle in-context from in-weight (IW) contributions, producing unreliable scores. Based on this observation, in this work, we introduce: 1) an evaluation protocol that relies on four new metrics (base-model context attribution score (BCS), cross-model context attribution consistency (CAC), attribution preservation score (APS), source separation pre- cision (SSP)) and 2) a be…

  5. Close Cites this paper
    SelfCite: Self-Supervised Alignment for Context Attribution in Large Language Models
    Yung-Sung Chuang, Benjamin Cohen-Wang, Shannon Zejiang Shen et al. · 2025 · International Conference on Machine Learning · cited 22 times · Not summarized yet
    Abstract

    We introduce SelfCite, a novel self-supervised approach that aligns LLMs to generate high-quality, fine-grained, sentence-level citations for the statements in their generated responses. Instead of only relying on costly and labor-intensive annotations, SelfCite leverages a reward signal provided by the LLM itself through context ablation: If a citation is necessary, removing the cited text from the context should prevent the same response; if sufficient, retaining the cited text alone should preserve the same response. This reward can guide the inference-time best-of-N sampling strategy to improve citation quality significantly, as well as be used in preference optimization to directly fine…

  6. Close
    Controllable Citation Sentence Generation with Language Models
    Nianlong Gu, Richard H. R. Hahnloser · 2022 · Computation and Language · cited 6 times · AI summary available
    Abstract

    Citation generation aims to generate a citation sentence that refers to a chosen paper in the context of a manuscript. However, a rigid citation generation process is at odds with an author's desire to control specific attributes, such as 1) the citation intent, e.g., either introducing background information or comparing results, and 2) keywords that should appear in the citation text. To provide these degrees of controllability during citation generation, we propose to integrate the manuscript context, the context of the referenced paper, and the desired control attributes into a structured template and use it to fine-tune a language model (LM) via next-token prediction. We then utilize Pr…

  7. Close Cites this paper
    Explaining the Reasoning of Large Language Models Using Attribution Graphs
    Chase Walker, Rickard Ewetz · 2025 · arXiv.org · preprint, not peer reviewed · cited 4 times · Not summarized yet
    Abstract

    Large language models (LLMs) exhibit remarkable capabilities, yet their reasoning remains opaque, raising safety and trust concerns. Attribution methods, which assign credit to input features, have proven effective for explaining the decision making of computer vision models. From these, context attributions have emerged as a promising approach for explaining the behavior of autoregressive LLMs. However, current context attributions produce incomplete explanations by directly relating generated tokens to the prompt, discarding inter-generational influence in the process. To overcome these shortcomings, we introduce the Context Attribution via Graph Explanations (CAGE) framework. CAGE introdu…

  8. Close Cited by this paper
    Quantifying the Plausibility of Context Reliance in Neural Machine Translation
    Gabriele Sarti, Grzegorz Chrupała, M. Nissim et al. · 2023 · International Conference on Learning Representations · cited 9 times · Not summarized yet
    Abstract

    Establishing whether language models can use contextual information in a human-plausible way is important to ensure their trustworthiness in real-world settings. However, the questions of when and which parts of the context affect model generations are typically tackled separately, with current plausibility evaluations being practically limited to a handful of artificial benchmarks. To address this, we introduce Plausibility Evaluation of Context Reliance (PECoRe), an end-to-end interpretability framework designed to quantify context usage in language models' generations. Our approach leverages model internals to (i) contrastively identify context-sensitive target tokens in generated texts a…

Prior work it builds on

  1. Close
    Unifying Corroborative and Contributive Attributions in Large Language Models
    Theodora T. Worledge, Judy Hanwen Shen, Nicole Meister et al. · 2023 · 2024 IEEE Conference on Secure and Trustworthy Machine Learning (SaTML) · cited 17 times · Not summarized yet
    Abstract

    As businesses, products, and services spring up around large language models, the trustworthiness of these models hinges on the verifiability of their outputs. However, methods for explaining language model outputs largely fall across two distinct fields of study which both use the term "attribution" to refer to entirely separate techniques: citation generation and training data attribution. In many modern applications, such as legal document generation and medical question answering, both types of attributions are important. In this work, we argue for and present a unified framework of large language model attributions. We show how existing methods of different types of attribution fall und…

  2. Close
    Measuring Attribution in Natural Language Generation Models
    Hannah Rashkin, Vitaly Nikolaev, Matthew Lamm et al. · 2021 · Computational Linguistics · cited 360 times · Not summarized yet
    Abstract

    Abstract Large neural models have brought a new challenge to natural language generation (NLG): It has become imperative to ensure the safety and reliability of the output of models that generate freely. To this end, we present an evaluation framework, Attributable to Identified Sources (AIS), stipulating that NLG output pertaining to the external world is to be verified against an independent, provided source. We define AIS and a two-stage annotation pipeline for allowing annotators to evaluate model output according to annotation guidelines. We successfully validate this approach on generation datasets spanning three tasks (two conversational QA datasets, a summarization dataset, and a tab…

  3. Close
    Teaching language models to support answers with verified quotes
    Jacob Menick, Maja Trebacz, Vladimir Mikulik et al. · 2022 · arXiv.org · preprint, not peer reviewed · cited 393 times · Not summarized yet
    Abstract

    Recent large language models often answer factual questions correctly. But users can't trust any given claim a model makes without fact-checking, because language models can hallucinate convincing nonsense. In this work we use reinforcement learning from human preferences (RLHP) to train"open-book"QA models that generate answers whilst also citing specific evidence for their claims, which aids in the appraisal of correctness. Supporting evidence is drawn from multiple documents found via a search engine, or from a single user-provided document. Our 280 billion parameter model, GopherCite, is able to produce answers with high quality supporting evidence and abstain from answering when unsure.…

  4. Close
    Enabling Large Language Models to Generate Text with Citations
    Tianyu Gao, Howard Yen, Jiatong Yu et al. · 2023 · Computation and Language · cited 926 times · AI summary available
    Abstract

    Large language models (LLMs) have emerged as a widely-used tool for information seeking, but their generated outputs are prone to hallucination. In this work, our aim is to allow LLMs to generate text with citations, improving their factual correctness and verifiability. Existing work mainly relies on commercial search engines and human evaluation, making it challenging to reproduce and compare different modeling approaches. We propose ALCE, the first benchmark for Automatic LLMs' Citation Evaluation. ALCE collects a diverse set of questions and retrieval corpora and requires building end-to-end systems to retrieve supporting evidence and generate answers with citations. We develop automatic…

  5. Close
    RARR: Researching and Revising What Language Models Say, Using Language Models
    Luyu Gao, Zhuyun Dai, Panupong Pasupat et al. · 2022 · Annual Meeting of the Association for Computational Linguistics · cited 409 times · Not summarized yet
    Abstract

    Language models (LMs) now excel at many tasks such as question answering, reasoning, and dialog. However, they sometimes generate unsupported or misleading content. A user cannot easily determine whether their outputs are trustworthy or not, because most LMs do not have any built-in mechanism for attribution to external evidence. To enable attribution while still preserving all the powerful advantages of recent generation models, we propose RARR (Retrofit Attribution using Research and Revision), a system that 1) automatically finds attribution for the output of any text generation model, and 2) post-edits the output to fix unsupported content while preserving the original output as much as …

Papers that cite it

  1. Close Uses this paper in depth
    AttnTrace: Contextual Attribution of Prompt Injection and Knowledge Corruption
    Yan-Ting Wang, Runpeng Geng, Ying Chen et al. · 2025 · IEEE Symposium on Security and Privacy · cited 10 times · Not summarized yet
    Abstract

    Long-context large language models (LLMs), such as GPT-5, Gemini-2.5-Pro, and Claude-Sonnet-4, are increasingly used to empower advanced AI systems, including retrievalaugmented generation (RAG) systems and autonomous agents. In these systems, an LLM receives an instruction along with a context-often consisting of texts retrieved from a knowledge database, memory, or the Internet-and generates a response that is contextually grounded by following the instruction. Many recent studies showed that these LLM-empowered systems are vulnerable to prompt injection and knowledge corruption attacks, where an attacker can inject malicious texts into the context such that the LLM generates an output as …

  2. Close Uses this paper in depth
    ProvenAI: Provenance-Native Traces of Evidence in Generated Answers
    Mohammad Faizan, Dalal Alharthi · 2026 · arXiv.org · preprint, not peer reviewed · cited 1 time · Not summarized yet
    Abstract

    Retrieval-augmented systems routinely present citations alongside generated answers, yet a citation does not confirm that the corresponding source meaningfully shaped the output. This paper introduces ProvenAI, a framework that decomposes transparency in multi-hop question answering into three independently measurable layers: answer correctness, citation fidelity against benchmark supporting evidence, and per-document influence under leave-one-resource-out intervention. Targeting the HotpotQA distractor benchmark through a seven-stage pipeline covering data normalisation, retrieval indexing, citation-aware answer generation, attribution auditing, ablation-based influence estimation, batch ev…

  3. Related Uses this paper in depth
    MaxShapley: Towards Incentive-compatible Generative Search with Fair Context Attribution
    Sara Patel, Mingxun Zhou, Giulia Fanti · 2025 · arXiv.org · preprint, not peer reviewed · cited 4 times · Not summarized yet
    Abstract

    Generative search engines based on large language models (LLMs) are replacing traditional search, fundamentally changing how information providers are compensated. To sustain this ecosystem, we need fair mechanisms to attribute and compensate content providers based on their contributions to generated answers. We introduce MaxShapley, an efficient algorithm for fair credit attribution in generative search pipelines that retrieve external sources before generation. MaxShapley is a special case of the celebrated Shapley value; it leverages a de-composable max-sum utility function to compute attributions with polynomial-time computation in the number of documents, as opposed to the exponential …

  4. Close
    Multi-Level Explanations for Generative Language Models
    Lucas Monteiro Paes, Dennis Wei, Hyo Jin Do et al. · 2024 · Annual Meeting of the Association for Computational Linguistics · cited 19 times · Not summarized yet
    Abstract

    Despite the increasing use of large language models (LLMs) for context-grounded tasks like summarization and question-answering, understanding what makes an LLM produce a certain response is challenging. We propose Multi-Level Explanations for Generative Language Models (MExGen), a technique to provide explanations for context-grounded text generation. MExGen assigns scores to parts of the context to quantify their influence on the model's output. It extends attribution methods like LIME and SHAP to LLMs used in context-grounded tasks where (1) inference cost is high, (2) input text is long, and (3) the output is text. We conduct a systematic evaluation, both automated and human, of perturba…

  5. Related Uses this paper in depth
    TracLLM: A Generic Framework for Attributing Long Context LLMs
    Yan-Ting Wang, Wei Zou, Runpeng Geng et al. · 2025 · USENIX Security Symposium · cited 22 times · Not summarized yet
    Abstract

    Long context large language models (LLMs) are deployed in many real-world applications such as RAG, agent, and broad LLM-integrated applications. Given an instruction and a long context (e.g., documents, PDF files, webpages), a long context LLM can generate an output grounded in the provided context, aiming to provide more accurate, up-to-date, and verifiable outputs while reducing hallucinations and unsupported claims. This raises a research question: how to pinpoint the texts (e.g., sentences, passages, or paragraphs) in the context that contribute most to or are responsible for the generated output by an LLM? This process, which we call context traceback, has various real-world applicatio…

How are these papers found?

We compare the title and abstract of this paper with those of every paper summarized on this site, and with the papers Semantic Scholar recommends, those it cites and those citing it (for a much-cited paper, its most recent citations and, from OpenAlex, the most cited ones). Among the prior work and the follow-ups, the papers that use each other in depth, a method it uses and the much-cited follow-ups come a little higher. The levels (very close, close, related) come from the similarity of the texts, not from a judgment of quality; * marks a paper without an abstract, compared by its title. The sentence under a paper is written by an AI from the two abstracts: check it in the papers. A paper marked not relevant by three readers leaves the list.

Updated on 1 November 2026.

The illustrated guide to the papers around a paper

The previous summary was created more than a year ago and can be re-run (if necessary) by clicking on the Run button below.

Disclaimer: The AI-based summarization tool and virtual assistant provided on this website may not always provide accurate and complete summaries or responses. We encourage you to carefully review and evaluate the generated content to ensure its quality and relevance to your needs.