Papers › Learning Dynamics of LLM Finetuning

Learning Dynamics of LLM Finetuning

15 Jul 2024arXiv:2407.10490archive 2025-07-28

Yi Ren, Danica J. Sutherland

Learning dynamics, which describes how the learning of specific training examples influences the model's predictions on other examples, gives us a powerful tool for understanding the behavior of deep learning systems. We study the learning dynamics of large language models during different types of finetuning, by analyzing the step-wise decomposition of how influence accumulates among different potential responses. Our framework allows a uniform interpretation of many interesting observations about the training of popular algorithms for both instruction tuning and preference tuning. In particular, we propose a hypothetical explanation of why specific types of hallucination are strengthened after finetuning, e.g., the model might use phrases or facts in the response for question B to answer question A, or the model might keep repeating similar simple phrases when generating responses. We also extend our framework and highlight a unique "squeezing effect" to explain a previously observed phenomenon in off-policy direct preference optimization (DPO), where running DPO for too long makes even the desired outputs less likely. This framework also provides insights into where the benefits of on-policy DPO and other variants come from. The analysis not only provides a novel perspective of understanding LLM's finetuning but also inspires a simple, effective method to improve alignment performance.

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="2407.10490")

Code

Syntology Ran 5 of 10 code samples harvested from 1 repository linked to this paper; 5 have no recorded run. Of those that ran: 1 ran · our draft was wrong; 1 ran · fixture could not drive it; 3 ran with no contract checked.

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

joshua-ren/learning_dynamics_llm officialmentioned in papermentioned on GitHubpytorchApache-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

10 samples harvested; 5 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.

1ran · our draft was wrong
1ran · fixture could not drive it
3ran
5unverified

Licence: 0 of the 10 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 joshua-ren/learning_dynamics_llm. “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.

extract_anthropic_prompt joshua-ren/learning_dynamics_llm/src/preference_datasets.py official repository ran · our draft was wrong Apache-2.0 (permissive) · 12f6803880f9b17e · report
get_api_base_url joshua-ren/learning_dynamics_llm/src/gen_dataset.py official repository ran Apache-2.0 (permissive) · 950dcf3ad144388a · report
get_hh joshua-ren/learning_dynamics_llm/src/preference_datasets.py official repository ran Apache-2.0 (permissive) · 7d82ad82e19dab04 · report
get_local_run_dir joshua-ren/learning_dynamics_llm/src/utils.py official repository ran Apache-2.0 (permissive) · 10ab71f27ffd7de8 · report
preference_loss joshua-ren/learning_dynamics_llm/src/trainers.py official repository ran · fixture could not drive it fingerprinted Apache-2.0 (permissive) · c79211fc0225a27f · report
get_dataset joshua-ren/learning_dynamics_llm/src/preference_datasets.py official repository unverified Apache-2.0 (permissive) · 8fa0d07c713b5722 · report
get_gpt_completion joshua-ren/learning_dynamics_llm/src/gen_dataset.py official repository unverified Apache-2.0 (permissive) · d6be0aae15f087e3 · report
get_local_dir joshua-ren/learning_dynamics_llm/src/utils.py official repository unverified Apache-2.0 (permissive) · 8ab43db002bf984d · report
get_original_helpful joshua-ren/learning_dynamics_llm/src/gen_dataset.py official repository unverified Apache-2.0 (permissive) · a5e707e0c89d915f · report
get_remote_file joshua-ren/learning_dynamics_llm/src/utils.py official repository unverified Apache-2.0 (permissive) · e7ce4c19888c6df6 · report

Tasks

Hallucination

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

DPO

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