Training Language Models to Generate Text with Citations via Fine-grained Rewards

Chengyu Huang, Zeqiu Wu, Yushi Hu, Wenya Wang

Abstract

Large Language Models (LLMs) frequently struggle with factual accuracy and source attribution, often failing to provide precise citations even when provided with relevant documents. This paper presents a framework for training LLMs to generate highly attributable text using fine-grained rewards. By decomposing rewards into correctness, citation recall, and citation precision, and applying them via rejection sampling and reinforcement learning, the researchers demonstrate that smaller models like LLaMA-2-7B can outperform ChatGPT in citation accuracy and relevance.

Introduction

While LLMs have shown remarkable capabilities, their utility in information-critical domains is limited by "hallucinations" and a lack of interpretability. Retrieval-Augmented Generation (RAG) attempts to mitigate this by providing external documents, but models often fail to use these sources correctly or cite them accurately. Smaller open-source models, in particular, struggle with "citation stuffing" or omitting citations for key claims. This research addresses the challenge of training models to produce "attributable" text, where every factual claim is supported by a verifiable reference.

Methodology

The proposed training pipeline utilizes fine-grained rewards to provide specific feedback during the learning process. The process consists of three main stages:

  1. Distillation: Initial fine-tuning of a LLaMA-2-7B model on ChatGPT-generated responses to establish a baseline for citation formatting.
  2. Fine-grained Reward Modeling: Rewards are broken down into three specific metrics:
  3. Correctness ($R_1$): Measures if the response contains the key information needed to answer the query.
  4. Citation Recall ($R_2$): Evaluates whether cited documents actually support the associated claims.
  5. Citation Precision ($R_3$): Ensures that cited documents are necessary and relevant, discouraging unnecessary citations.
  6. Training Algorithms: These rewards are integrated using Rejection Sampling (RS), where the best-performing candidate answers are selected for fine-tuning, and Reinforcement Learning (PPO) for token-level optimization.
Overview of the distillation, rejection sampling, and reinforcement learning pipeline, alongside the fine-grained reward calculation process.

Experimental Setup

The models were evaluated using the ALCE benchmark, which includes three diverse datasets: ASQA (long-form factoid answers), QAMPARI (entity list answers), and ELI5 (complex explanations). To test generalizability, the model was also evaluated on EXPERTQA, a high-difficulty dataset requiring deep domain knowledge that the model did not see during training.

Results and Discussion

The fine-grained approach yielded significant improvements over baseline models. On the ASQA dataset, the fine-grained RS+RL model achieved a 41.33% correctness score and a 79.71% citation recall, both surpassing ChatGPT's performance.

Performance comparison of the fine-grained rejection sampling method (+f.g.RS) against ChatGPT and various ablation configurations across the ALCE benchmark.

Key insights from the results include:

  • Credit Assignment: Fine-grained rewards effectively solve the "credit assignment" problem, telling the model exactly which parts of its response were successful.
  • Efficiency of Rejection Sampling: RS was found to be highly effective and more computationally efficient than full RL, though the combination of both provided the best results.
  • Error Taxonomy: Analysis revealed that the most common error (over 60%) is the "misinterpretation of cited passages," where the model cites the correct document but paraphrases it inaccurately.
  • Generalization: On the unseen EXPERTQA dataset, the model achieved a citation recall of 66.12%, compared to ChatGPT’s 56.98%, proving the skill is a transferable reasoning capability.

Conclusion and Future Work

This research demonstrates that specialized training with fine-grained rewards allows smaller models to achieve state-of-the-art performance in source attribution. However, limitations remain, including the dependency on initial distillation from larger models and the performance bottleneck created by the retrieval system itself. Future work will explore iterative training loops to further refine model performance without relying on proprietary data.

Summary updated

BibTeX
@inproceedings{huang2024training,
  author = {Chengyu Huang and Zeqiu Wu and Yushi Hu and Wenya Wang},
  title = {{Training Language Models to Generate Text with Citations via Fine-grained Rewards}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.acl-long.161},
}
Figure