Papers › Feedback Loops With Language Models Drive In-Context Reward Hacking

Feedback Loops With Language Models Drive In-Context Reward Hacking

9 Feb 2024arXiv:2402.06627archive 2025-07-28

Alexander Pan, Erik Jones, Meena Jagadeesan, Jacob Steinhardt

Language models influence the external world: they query APIs that read and write to web pages, generate content that shapes human behavior, and run system commands as autonomous agents. These interactions form feedback loops: LLM outputs affect the world, which in turn affect subsequent LLM outputs. In this work, we show that feedback loops can cause in-context reward hacking (ICRH), where the LLM at test-time optimizes a (potentially implicit) objective but creates negative side effects in the process. For example, consider an LLM agent deployed to increase Twitter engagement; the LLM may retrieve its previous tweets into the context window and make them more controversial, increasing engagement but also toxicity. We identify and study two processes that lead to ICRH: output-refinement and policy-refinement. For these processes, evaluations on static datasets are insufficient -- they miss the feedback effects and thus cannot capture the most harmful behavior. In response, we provide three recommendations for evaluation to capture more instances of ICRH. As AI development accelerates, the effects of feedback loops will proliferate, increasing the need to understand their role in shaping LLM behavior.

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.06627")

Code

Syntology Ran 9 of 10 code samples harvested from 1 repository linked to this paper; 1 has no recorded run. Of those that ran: 9 ran with no contract checked.

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

aypan17/llm-feedback officialmentioned in papermentioned on GitHub 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; 9 ran; 0 honoured the contract we drafted; 1 has no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

9ran
1unverified

Licence: 10 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 aypan17/llm-feedback. “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.

agg_mva_data aypan17/llm-feedback/output-refinement/plot_results.py official repository ran no licence file found · pointer only · 563fb2d60e722adc · report
get_agent_prompt aypan17/llm-feedback/output-refinement/optimization/utils.py official repository ran no licence file found · pointer only · eb019e3b76b00c83 · report
get_agent_prompt aypan17/llm-feedback/output-refinement/reward_hacking/utils.py official repository ran no licence file found · pointer only · 53e13d8a3017f353 · report
get_fixed_model_name aypan17/llm-feedback/policy-refinement/toolemu/utils/llm.py official repository ran no licence file found · pointer only · 743634a9969fa3ce · report
get_judge_prompt aypan17/llm-feedback/output-refinement/optimization/utils.py official repository ran no licence file found · pointer only · 3d994407d1a46b5a · report
get_judge_prompt aypan17/llm-feedback/output-refinement/reward_hacking/utils.py official repository ran no licence file found · pointer only · df2d243cab33deb8 · report
perform_ranking aypan17/llm-feedback/output-refinement/pairwise_voting.py official repository ran no licence file found · pointer only · 2f91f12ce2181afb · report
process_response aypan17/llm-feedback/output-refinement/optimization/utils.py official repository ran fingerprinted no licence file found · pointer only · 676f96b3b5ebf7e4 · report
process_response aypan17/llm-feedback/output-refinement/reward_hacking/utils.py official repository ran fingerprinted no licence file found · pointer only · 5747fd8a748faaad · report
get_model_name aypan17/llm-feedback/policy-refinement/toolemu/utils/llm.py official repository unverified no licence file found · pointer only · 6eb6bddfebc2ae76 · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

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