SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.20703 · ICLR · 2024

Vanishing Gradients in Reinforcement Finetuning of Language Models

Preetum Nakkiran, Noam Razin, Etai Littwin, Joshua Susskind, Hattie Zhou, Omid Saremi, Vimal Thilak, Arwen Bradley

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 0 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2310.20703.json · badge: /api/ran/2310.20703.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
apple/ml-rlgrad canonical (classifier label)
classifier basis: census
6 ran · 0 no recorded run
FunctionStatusWhere it lives
encode_example Ran
ran, honoured the contract we drafted
apple/ml-rlgrad/bleurt/encoding.py
pointer only (licence: NONE) · get_code("c59cb856dad5f089")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, apple/ml-rlgrad when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_max_prompt_length Ran
ran, honoured the contract we drafted
apple/ml-rlgrad/rl4lms_extract_samples_from_model_runner.py
pointer only (licence: NOASSERTION) · get_code("273737207da9fb73")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, apple/ml-rlgrad (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

ranking_loss Ran
ran; our contract draft was wrong, not the code
apple/ml-rlgrad/bleurt/model.py
pointer only (licence: NONE) · get_code("928f493bec0ffc69")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, apple/ml-rlgrad when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

read_bleurt_config Ran
ran; our contract draft was wrong, not the code
apple/ml-rlgrad/bleurt/checkpoint.py
pointer only (licence: NONE) · get_code("f57743217d50baa3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, apple/ml-rlgrad when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

serialize_example Ran
ran; our contract draft was wrong, not the code
apple/ml-rlgrad/bleurt/encoding.py
pointer only (licence: NONE) · get_code("f71891eba726ed24")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, apple/ml-rlgrad when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

serialize_raw_example Ran
ran; our contract draft was wrong, not the code
apple/ml-rlgrad/bleurt/encoding.py
pointer only (licence: NONE) · get_code("74a38d5d8b44259d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, apple/ml-rlgrad when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 5 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 5 later) and 1 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
ranking_loss 2 other papers
2 later
2024.findings-emnlp.27 (2024 (year only))
TRANSLLAMA: LLM-based Simultaneous Translation System
2601.03549 (2026-01)
FEA-SLT: A Gloss-Free End-to-End Framework for Facial-Expression-Aware Sign Language Translation
encode_example 1 other paper
1 later
2601.03549 (2026-01)
FEA-SLT: A Gloss-Free End-to-End Framework for Facial-Expression-Aware Sign Language Translation
read_bleurt_config 1 other paper
1 later
2601.03549 (2026-01)
FEA-SLT: A Gloss-Free End-to-End Framework for Facial-Expression-Aware Sign Language Translation
serialize_example 1 other paper
1 later
2601.03549 (2026-01)
FEA-SLT: A Gloss-Free End-to-End Framework for Facial-Expression-Aware Sign Language Translation
serialize_raw_example 1 other paper
1 later
2601.03549 (2026-01)
FEA-SLT: A Gloss-Free End-to-End Framework for Facial-Expression-Aware Sign Language Translation

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Pretrained language models are commonly aligned with human preferences and downstream tasks via reinforcement finetuning (RFT), which refers to maximizing a (possibly learned) reward function using policy gradient algorithms. This work identifies a fundamental optimization obstacle in RFT: we prove that the expected gradient for an input vanishes when its reward standard deviation under the model is small, even if the expected reward is far from optimal. Through experiments on an RFT benchmark and controlled environments, as well as a theoretical analysis, we then demonstrate that vanishing gradients due to small reward standard deviation are prevalent and detrimental, leading to extremely slow reward maximization. Lastly, we explore ways to overcome vanishing gradients in RFT. We find the common practice of an initial supervised finetuning (SFT) phase to be the most promising candidate, which sheds light on its importance in an RFT pipeline. Moreover, we show that a relatively small number of SFT optimization steps on as few as 1% of the input samples can suffice, indicating that the initial SFT phase need not be expensive in terms of compute and data labeling efforts. Overall, our results emphasize that being mindful for inputs whose expected gradient vanishes, as measured by the reward standard deviation, is crucial for successful execution of RFT. 1 * Work done while interning at Apple.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2310.20703")
get_code_for_paper("2310.20703")
have("2310.20703")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2310.20703.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2310.20703.svg)](https://syntology.ai/paper/2310.20703)

Connect an agent — have() is free.