C$^2$-Cite: Contextual-Aware Citation Generation for Attributed Large Language Models

Yue Yu, Ting Bai, HengZhi Lan, Li Qian, Li Peng, Jie Wu, Wei Liu, Jian Luan, Chuan Shi

TL;DR

Current attributed large language models often treat citations (like [1]) as superficial text placeholders, leading to hallucinated or poorly integrated references. $C^2$-Cite solves this by embedding the actual semantic content of retrieved documents directly into the citation tokens during fine-tuning. This turns passive markers into active knowledge pointers, boosting both citation accuracy and response correctness while maintaining high generation speed.

What Problem Does This Paper Address?

Retrieval-Augmented Generation (RAG) has become the gold standard for reducing hallucinations in Large Language Models (LLMs) by pulling in external knowledge. However, to make these models truly trustworthy, they need to provide accurate attribution—explicitly citing which document supports which statement.

Existing instruction-tuned models struggle with this because they treat citation markers (e.g., [1], [2]) as generic text placeholders. The model doesn't inherently understand the semantic link between the marker and the source text. As a result, LLMs frequently suffer from disjointed text transitions, hallucinate non-existent citation numbers, or misalign references entirely. Paradoxically, forcing a standard model to output citations can even degrade the correctness of the response because it disrupts pre-trained text generation patterns.

Figure 1: Illustration of integrating contextual citation (i.e., ours) v.s. using only citation markers (i.e., [i]) in response generation of LLMs. Without contextual information, LLMs may produce erroneous or fictitious citations.

Methods

The authors introduce $C^2$-Cite (Contextual-aware Citation generation), a fine-tuning framework that explicitly models the semantic relationships between citation symbols and their referenced content within a standard decoder-only LLM architecture.

The framework introduces three key components:

  1. Contextual-Aware Embedding (CAE): Instead of using standard, static token embeddings for citation markers (e.g., <c_i>), $C^2$-Cite replaces them with a contextual embedding generated by mean-pooling the token embeddings of the actual retrieved document. This forces the model to associate the citation token directly with the document's semantic meaning.
  2. Contextual Citation Alignment (CCA): During generation, a specialized "citation router" (a binary classifier) determines whether the next token should be a default word or a citation token. If it's a citation, the model maps the hidden state into a citation space and selects the correct document based on its semantic similarity to the CAE matrix.
  3. Contextual Attentive Augment: To ensure the model doesn't forget the context of what it just cited, the authors introduce an attention-regularization loss. This forces subsequent tokens to maintain strong attention links to previously generated citation tokens, smoothing the transition between cited and non-cited text.
Figure 2: The architecture overview of C2-Cite with two key components: Contextual-Aware Embedding and Contextual Citation Alignment components to transform passive placeholders into active knowledge pointers for citation symbols.

Datasets

The model was evaluated using the ALCE (Automatic LLM Citation Evaluation) benchmark, which spans three distinct open-domain QA datasets:

  • ASQA: Focuses on factoid questions that require long-form, synthesized answers from multiple source passages.
  • ELI5: Requires long-form, paragraph-length explanatory answers to complex questions.
  • QAMPARI: Evaluates questions that have multiple distinct, correct answers.

For training, the authors fine-tuned the model on the SynSciQA series (SynSciQA, SynSciQA+, and SynSciQA++), which are general-purpose synthetic attribution datasets of varying quality.

Key Insights and Ideas

  • Citations as Active Pointers: The core "aha" moment is that citation markers shouldn't just be formatting targets. By injecting document semantics directly into the token embedding space, the model treats the citation as a functional pointer to knowledge it has already processed.
  • Fixing the "Citation Tax": Directly fine-tuning LLMs on citation data usually hurts response correctness because the model over-focuses on inserting symbols at the expense of text coherence. $C^2$-Cite eliminates this trade-off by regularizing the attention layer, ensuring that inserting a citation actually strengthens the logical flow of the sentence.
  • Single-Pass Efficiency: Unlike post-hoc or iterative attribution methods—which require multiple LLM calls or complex retroactive tracing—$C^2$-Cite achieves state-of-the-art results in a single, efficient generation pass.

Key Results

Evaluated on the Llama3-8B-Instruct model, $C^2$-Cite++ significantly outperformed existing prompt-based, iterative, and fine-tuning baselines:

  • Performance Boost: It outperformed the previous state-of-the-art baseline (Front) by an average of 5.8% in citation quality (F1 score) and a massive 17.4% in response correctness across all three datasets.
  • Efficiency: Efficiency analysis showed that $C^2$-Cite++ achieved the highest throughput (samples processed per second) compared to competitive baselines like Blueprint and Front, making it highly viable for real-world production pipelines.

Limitations and Future Work

The authors acknowledge a few areas for improvement:

  • Embedding Compression: The framework relies on mean-pooling to compress an entire document into a single citation token embedding. For exceptionally long documents, this simple aggregation might lose fine-grained semantic details.
  • Future Directions: Promising next steps include exploring more sophisticated document aggregation functions (like attention-based pooling) and adapting the framework to handle multi-modal retrieval sources (e.g., citing images or tables alongside text).

Summary updated

BibTeX
@inproceedings{yu2026c,
  author = {Yue Yu and Ting Bai and HengZhi Lan and Li Qian and Li Peng and Jie Wu and Wei Liu and Jian Luan and Chuan Shi},
  title = {{C$^2$-Cite: Contextual-Aware Citation Generation for Attributed Large Language Models}},
  booktitle = {WSDM},
  year = {2026},
  doi = {10.1145/3773966.3777933},
}
Figure