SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.16455 · 2024

On the Algorithmic Bias of Aligning Large Language Models with RLHF: Preference Collapse and Matching Regularization

arXiv · PDF · Open in the Atlas

Code that ran

11 of 14 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; 3 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 8 failures of our instrument; 3 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; 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/2405.16455.json · badge: /api/ran/2405.16455.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
JiancongXiao/PM_RLHF canonical (classifier label)
classifier basis: census
11 ran · 3 no recorded run
FunctionStatusWhere it lives
calculate_flops Ran
ran, honoured the contract we drafted
JiancongXiao/PM_RLHF/dschat/utils/perf.py
pointer only (licence: NONE) · get_code("069f56cb00324e10")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, JiancongXiao/PM_RLHF 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.

gather_log_probs Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
JiancongXiao/PM_RLHF/dschat/rlhf/ppo_trainer.py
pointer only (licence: NONE); the stored copy get_code serves, from zyushun/adam-mini, is pointer only (licence: NONE) · get_code("2f0a690c70d11c23")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, JiancongXiao/PM_RLHF 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.

generate Ran
ran; our contract draft was wrong, not the code
JiancongXiao/PM_RLHF/step1_supervised_finetuning/prompt_eval.py
pointer only (licence: NONE) · get_code("451c619b9609c3c0")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, JiancongXiao/PM_RLHF 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.

generate_constrastive_search Ran
ran; our contract draft was wrong, not the code
JiancongXiao/PM_RLHF/step1_supervised_finetuning/prompt_eval.py
pointer only (licence: NONE) · get_code("385922750eb70702")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, JiancongXiao/PM_RLHF 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_eval_ds_config Ran
ran; our contract draft was wrong, not the code
JiancongXiao/PM_RLHF/dschat/utils/ds_utils.py
pointer only (licence: NONE) · get_code("792e87a1badc5642")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, JiancongXiao/PM_RLHF 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_hf_configs Ran
ran, honoured the contract we drafted
JiancongXiao/PM_RLHF/dschat/utils/perf.py
pointer only (licence: NONE) · get_code("df20c2f4083d17af")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, JiancongXiao/PM_RLHF 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.

log_init Ran
ran, honoured the contract we drafted
JiancongXiao/PM_RLHF/dschat/rlhf/rlhf_engine.py
pointer only (licence: NONE) · get_code("429d42a3bf925da5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, JiancongXiao/PM_RLHF 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.

only_optimize_lora_parameters Ran
ran; our contract draft was wrong, not the code
JiancongXiao/PM_RLHF/dschat/utils/module/lora.py
pointer only (licence: NONE) · get_code("7d082cd1b7edc2aa")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, JiancongXiao/PM_RLHF 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.

prepare_datapair Ran
ran; our contract draft was wrong, not the code
JiancongXiao/PM_RLHF/step2_reward_model_finetuning/rw_eval.py
pointer only (licence: NONE) · get_code("ed8922a081978462")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, JiancongXiao/PM_RLHF 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.

prepare_singlesample Ran
ran; our contract draft was wrong, not the code
JiancongXiao/PM_RLHF/step2_reward_model_finetuning/rw_eval.py
pointer only (licence: NONE) · get_code("779ea48e220986c3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, JiancongXiao/PM_RLHF 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.

to_device Ran
ran; our contract draft was wrong, not the code
JiancongXiao/PM_RLHF/dschat/utils/utils.py
pointer only (licence: NONE) · get_code("387b9e6c4f21dd62")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, JiancongXiao/PM_RLHF 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.

causal_lm_model_to_fp32_loss Not yet run
unverified (harvested, no recorded run)
JiancongXiao/PM_RLHF/dschat/utils/model/model_utils.py
pointer only (licence: NONE) · get_code("a43ca11da51d269b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, JiancongXiao/PM_RLHF 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. No invocation recorded.

get_tokenizer Not yet run
unverified (harvested, no recorded run)
JiancongXiao/PM_RLHF/dschat/utils/utils.py
pointer only (licence: NONE) · get_code("5017ecabf588a56c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, JiancongXiao/PM_RLHF 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. No invocation recorded.

load_hf_tokenizer Not yet run
unverified (harvested, no recorded run)
JiancongXiao/PM_RLHF/dschat/utils/utils.py
pointer only (licence: NONE) · get_code("3f9f61afa9043c4f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, JiancongXiao/PM_RLHF 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. No invocation recorded.

Also present in other papers' code

Of 14 samples lifted from this paper's linked repositories, 14 carry a function identity and 0 do not. Of the 14 distinct functions with an identity, 12 are also present in other papers whose code we hold (12 with at least one paper dated earlier, 0 the same month, 8 later) and 2 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
gather_log_probs 9 other papers
5 dated earlier, 3 later, 1 same year, order not determinable
2308.02223 (2023-08)
ESRL: Efficient Sampling-based Reinforcement Learning for Sequence Generation
2310.10505 (2023-10)
ReMax: A Simple, Effective, and Efficient Reinforcement Learning Method for Aligning Large Language Models
2024.naacl-long.326 (2024 (year only))
LSTDial: Enhancing Dialogue Generation via Long-and Short-Term Measurement Feedback
and 6 more not named here
log_init 9 other papers
5 dated earlier, 3 later, 1 same year, order not determinable
2308.02223 (2023-08)
ESRL: Efficient Sampling-based Reinforcement Learning for Sequence Generation
2310.10505 (2023-10)
ReMax: A Simple, Effective, and Efficient Reinforcement Learning Method for Aligning Large Language Models
2024.naacl-long.326 (2024 (year only))
LSTDial: Enhancing Dialogue Generation via Long-and Short-Term Measurement Feedback
and 6 more not named here
calculate_flops 6 other papers
3 dated earlier, 3 later
2310.10505 (2023-10)
ReMax: A Simple, Effective, and Efficient Reinforcement Learning Method for Aligning Large Language Models
2402.05808 (2024-02)
Training Large Language Models for Reasoning through Reverse Curriculum Reinforcement Learning
2403.14112 (2024-03)
Benchmarking Chinese Commonsense Reasoning of LLMs: From Chinese-Specifics to Reasoning-Memorization Correlations
and 3 more not named here
get_hf_configs 6 other papers
3 dated earlier, 3 later
2310.10505 (2023-10)
ReMax: A Simple, Effective, and Efficient Reinforcement Learning Method for Aligning Large Language Models
2402.05808 (2024-02)
Training Large Language Models for Reasoning through Reverse Curriculum Reinforcement Learning
2403.14112 (2024-03)
Benchmarking Chinese Commonsense Reasoning of LLMs: From Chinese-Specifics to Reasoning-Memorization Correlations
and 3 more not named here
to_device 6 other papers
4 dated earlier, 1 later, 1 same year, order not determinable
2310.20246 (2023-10)
Breaking Language Barriers in Multilingual Mathematical Reasoning: Insights and Observations
2024.naacl-long.326 (2024 (year only))
LSTDial: Enhancing Dialogue Generation via Long-and Short-Term Measurement Feedback
2402.05808 (2024-02)
Training Large Language Models for Reasoning through Reverse Curriculum Reinforcement Learning
and 3 more not named here
generate_constrastive_search 4 other papers
3 dated earlier, 1 same year, order not determinable
2308.02223 (2023-08)
ESRL: Efficient Sampling-based Reinforcement Learning for Sequence Generation
2310.10505 (2023-10)
ReMax: A Simple, Effective, and Efficient Reinforcement Learning Method for Aligning Large Language Models
2310.20246 (2023-10)
Breaking Language Barriers in Multilingual Mathematical Reasoning: Insights and Observations
and 1 more not named here
generate 3 other papers
2 dated earlier, 1 same year, order not determinable
2308.02223 (2023-08)
ESRL: Efficient Sampling-based Reinforcement Learning for Sequence Generation
2310.20246 (2023-10)
Breaking Language Barriers in Multilingual Mathematical Reasoning: Insights and Observations
2024.naacl-long.326 (2024 (year only))
LSTDial: Enhancing Dialogue Generation via Long-and Short-Term Measurement Feedback
get_eval_ds_config 3 other papers
1 dated earlier, 2 later
2402.05808 (2024-02)
Training Large Language Models for Reasoning through Reverse Curriculum Reinforcement Learning
2410.16843 (2024-10)
Trustworthy Alignment of Retrieval-Augmented Large Language Models via Reinforcement Learning
2410.21662 (2024-10)
$f$-PO: Generalizing Preference Optimization with $f$-divergence Minimization
prepare_datapair 3 other papers
2 dated earlier, 1 same year, order not determinable
2310.10505 (2023-10)
ReMax: A Simple, Effective, and Efficient Reinforcement Learning Method for Aligning Large Language Models
2024.naacl-long.326 (2024 (year only))
LSTDial: Enhancing Dialogue Generation via Long-and Short-Term Measurement Feedback
2404.17287 (2024-04)
When to Trust LLMs: Aligning Confidence with Response Quality
prepare_singlesample 3 other papers
2 dated earlier, 1 same year, order not determinable
2310.10505 (2023-10)
ReMax: A Simple, Effective, and Efficient Reinforcement Learning Method for Aligning Large Language Models
2024.naacl-long.326 (2024 (year only))
LSTDial: Enhancing Dialogue Generation via Long-and Short-Term Measurement Feedback
2404.17287 (2024-04)
When to Trust LLMs: Aligning Confidence with Response Quality
causal_lm_model_to_fp32_loss 2 other papers
1 dated earlier, 1 later
2402.05808 (2024-02)
Training Large Language Models for Reasoning through Reverse Curriculum Reinforcement Learning
2410.16843 (2024-10)
Trustworthy Alignment of Retrieval-Augmented Large Language Models via Reinforcement Learning
only_optimize_lora_parameters 2 other papers
1 dated earlier, 1 later
2402.05808 (2024-02)
Training Large Language Models for Reasoning through Reverse Curriculum Reinforcement Learning
2410.21662 (2024-10)
$f$-PO: Generalizing Preference Optimization with $f$-divergence Minimization

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

Accurately aligning large language models (LLMs) with human preferences is crucial for informing fair, economically sound, and statistically efficient decision-making processes. However, we argue that the predominant approach for aligning LLMs with human preferences through a reward model -- reinforcement learning from human feedback (RLHF) -- suffers from an inherent algorithmic bias due to its Kullback--Leibler-based regularization in optimization. In extreme cases, this bias could lead to a phenomenon we term preference collapse, where minority preferences are virtually disregarded. To mitigate this algorithmic bias, we introduce preference matching (PM) RLHF, a novel approach that provably aligns LLMs with the preference distribution of the reward model under the Bradley--Terry--Luce/Plackett--Luce model. Central to our approach is a PM regularizer that takes the form of the negative logarithm of the LLM's policy probability distribution over responses, which helps the LLM balance response diversification and reward maximization. Notably, we obtain this regularizer by solving an ordinary differential equation that is necessary for the PM property. For practical implementation, we introduce a conditional variant of PM RLHF that is tailored to natural language generation. Finally, we empirically validate the effectiveness of conditional PM RLHF through experiments on the OPT and Llama-family models, demonstrating a 29% to 41% improvement in alignment with human preferences, as measured by a certain metric, compared to standard RLHF.

For agents

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

get_harvested_code_for_paper("2405.16455")
get_code_for_paper("2405.16455")
have("2405.16455")

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

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

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

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

Connect an agent — have() is free.