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

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

6 Feb 2024arXiv:2402.04315archive 2025-07-28

Chengyu Huang, Zeqiu Wu, Yushi Hu, Wenya Wang

While recent Large Language Models (LLMs) have proven useful in answering user queries, they are prone to hallucination, and their responses often lack credibility due to missing references to reliable sources. An intuitive solution to these issues would be to include in-text citations referring to external documents as evidence. While previous works have directly prompted LLMs to generate in-text citations, their performances are far from satisfactory, especially when it comes to smaller LLMs. In this work, we propose an effective training framework using fine-grained rewards to teach LLMs to generate highly supportive and relevant citations, while ensuring the correctness of their responses. We also conduct a systematic analysis of applying these fine-grained rewards to common LLM training strategies, demonstrating its advantage over conventional practices. We conduct extensive experiments on Question Answering (QA) datasets taken from the ALCE benchmark and validate the model's generalizability using EXPERTQA. On LLaMA-2-7B, the incorporation of fine-grained rewards achieves the best performance among the baselines, even surpassing that of GPT-3.5-turbo.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2402.04315")

Code

Syntology Ran 7 of 12 code samples harvested from 1 repository linked to this paper; 5 have no recorded run. Of those that ran: 4 ran · our draft was wrong; 3 ran with no contract checked.

By repository: official repository: 12 samples from 1 repository, 7 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

hcy123902/atg-w-fg-rw officialmentioned in paperpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

12 samples harvested; 7 ran; 0 honoured the contract we drafted; 5 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

4ran · our draft was wrong
3ran
5unverified

Licence: 0 of the 12 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from hcy123902/atg-w-fg-rw. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

make_doc_prompt hcy123902/atg-w-fg-rw/evaluation/eval_utils.py official repository ran Apache-2.0 (permissive) · c7d29eb322d5d6e3 · report
normalize_answer hcy123902/atg-w-fg-rw/evaluation/eval_utils.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · dae7ab386661a4f4 · report
reduce_mean hcy123902/atg-w-fg-rw/fgrlhf/utils.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · e5bacba887a721ef · report
reduce_std hcy123902/atg-w-fg-rw/fgrlhf/utils.py official repository ran fingerprinted Apache-2.0 (permissive) · 174bfbbeb1f29e12 · report
reduce_sum hcy123902/atg-w-fg-rw/fgrlhf/utils.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 5874b0a8910897fd · report
remove_citations hcy123902/atg-w-fg-rw/evaluation/eval_utils.py official repository ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 5df8b525aada9853 · report
split_qampari_text hcy123902/atg-w-fg-rw/fgrlhf/reward_utils.py official repository ran fingerprinted Apache-2.0 (permissive) · d36629ddac8ee6aa · report
get_rouge_scores hcy123902/atg-w-fg-rw/fgrlhf/evaluators.py official repository unverified Apache-2.0 (permissive) · 031d4bfddac2dbef · report
get_single_rouge_score hcy123902/atg-w-fg-rw/fgrlhf/evaluators.py official repository unverified Apache-2.0 (permissive) · 46fb11d38baff4e2 · report
postprocess_text hcy123902/atg-w-fg-rw/fgrlhf/evaluators.py official repository unverified Apache-2.0 (permissive) · 94a55f838c975848 · report
split_text_to_sentences hcy123902/atg-w-fg-rw/fgrlhf/reward_utils.py official repository unverified Apache-2.0 (permissive) · e7f95d91543ac720 · report
split_text_to_subsentences hcy123902/atg-w-fg-rw/fgrlhf/reward_utils.py official repository unverified Apache-2.0 (permissive) · 11589c4018cfc261 · report

Tasks

HallucinationQuestion Answering

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

AdamAttentionAttention DropoutBPECosine AnnealingDense ConnectionsDropoutGPT-3Layer NormalizationLinear LayerLinear Warmup With Cosine AnnealingMulti-Head AttentionResidual ConnectionSoftmaxWeight Decay

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections