SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.01878 · 2024

LiPO: Listwise Preference Optimization through Learning-to-Rank

arXiv · PDF · Open in the Atlas

Code that ran

4 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; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 0 failures of our instrument; 2 no recorded run), measured 2026-11-22; 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/2402.01878.json · badge: /api/ran/2402.01878.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
CyberAgentAILab/annotation-efficient-po community (classifier label)
classifier basis not recorded on the link
4 ran · 2 no recorded run
FunctionStatusWhere it lives
compute_score_matrix Ran
ran on a synthesized input
CyberAgentAILab/annotation-efficient-po/aepo/mbr/policy/mbr.py
code served (permissive licence) · get_code("4fa31ca890d1bad2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (2, 2) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

def dummy_score_function(hyp, ref, src):
    """
    A dummy score function that takes hypothesis, reference, and source.
    Returns a score array matching the number of references.
    """
    # hyp is expected to be an array of repeated samples
    # ref is a list of samples
    # src is optional source input
    # Return scores for each reference
    return np.array([0.8, 0.7])

# Create sample data
samples = [
    "sample one",
    "sample two"
]

ARGS = {
    "samples": samples,
    "score_function": dummy_score_function,
    "src_input": "source text"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 2) — shape (2, 2) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
gbfs Ran
ran on a synthesized input
CyberAgentAILab/annotation-efficient-po/aepo/mbr/policy/diverse_mbr.py
code served (permissive licence) · get_code("c3e7b6a5e02cc75a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family int, shape (10,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

def objective_function(selection: np.array) -> float:
    """
    A simple objective function that rewards selecting diverse elements.
    Returns a score based on how many elements are selected and their diversity.
    """
    num_selected = np.sum(selection)
    if num_selected == 0:
        return 0.0
    
    # Simple diversity metric: reward selecting spread-out indices
    selected_indices = np.where(selection == 1)[0]
    if len(selected_indices) == 0:
        return 0.0
    
    # Score increases with number selected, with a submodular penalty
    base_score = num_selected * 2.0
    diversity_bonus = np.sum(np.diff(selected_indices)) * 0.1 if len(selected_indices) > 1 else 0.0
    
    return base_score + diversity_bonus

ARGS = {
    "func": objective_function,
    "n": 10,
    "k": 3
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (10,) — shape (10,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
generate_objective Ran
ran on a synthesized input
CyberAgentAILab/annotation-efficient-po/aepo/mbr/policy/diverse_mbr.py
code served (permissive licence) · get_code("d870256602e7e4e3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned function. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a small similarity matrix
# The function expects a square matrix (n x n) where n is the number of items
# We'll use n=5 items
n = 5
similarity_matrix = np.array([
    [1.0, 0.8, 0.6, 0.4, 0.2],
    [0.8, 1.0, 0.7, 0.5, 0.3],
    [0.6, 0.7, 1.0, 0.6, 0.4],
    [0.4, 0.5, 0.6, 1.0, 0.7],
    [0.2, 0.3, 0.4, 0.7, 1.0]
], dtype=np.float64)

# k should be less than n (number of items to select)
k = 3

# div_pen is a diversity penalty weight
div_pen = 0.5

ARGS = {
    "k": k,
    "div_pen": div_pen,
    "matrix": similarity_matrix
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
local_search Ran
ran on a synthesized input
CyberAgentAILab/annotation-efficient-po/aepo/mbr/policy/diverse_mbr.py
code served (permissive licence) · get_code("ce435137db62a83c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family int, shape (10,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Define a simple objective function that takes a binary array
# and returns a scalar score (higher is better)
def objective_func(x: np.array) -> float:
    """
    Simple objective function: sum of selected elements with a diversity bonus.
    x is a binary array where 1 means selected, 0 means not selected.
    """
    # Create a simple scoring based on index and selection
    scores = np.arange(len(x)) * 0.5
    base_score = np.sum(x * scores)
    # Add small penalty based on number of selected items to encourage diversity
    num_selected = np.sum(x)
    if num_selected > 0:
        return base_score - 0.1 * num_selected
    return base_score

# Create initial solution: binary array with some elements selected
# For a problem of size 10, select 5 elements initially
init_solution = np.array([1, 1, 1, 1, 1, 0, 0, 0, 0, 0], dtype=int)

ARGS = {
    "func": objective_func,
    "init": init_solution,
    "iterations": 5,
    "neighbor": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family int, shape (10,) — shape (10,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
compute_mbr Not yet run
unverified (harvested, no recorded run)
CyberAgentAILab/annotation-efficient-po/aepo/mbr/policy/mbr.py
code served (permissive licence) · get_code("c36696fde0a4d9a9")
How it ran

no invocation recorded.

read_dataset Not yet run
unverified (harvested, no recorded run)
CyberAgentAILab/annotation-efficient-po/aepo/preprocess.py
code served (permissive licence) · get_code("2286661176238829")
How it ran

no invocation 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, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 6 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.

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-22.

Repositories linked to this paper

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

Abstract

Aligning language models (LMs) with curated human feedback is critical to control their behaviors in real-world applications. Several recent policy optimization methods, such as DPO and SLiC, serve as promising alternatives to the traditional Reinforcement Learning from Human Feedback (RLHF) approach. In practice, human feedback often comes in a format of a ranked list over multiple responses to amortize the cost of reading prompt. Multiple responses can also be ranked by reward models or AI feedback. There lacks such a thorough study on directly fitting upon a list of responses. In this work, we formulate the LM alignment as a \textit{listwise} ranking problem and describe the LiPO framework, where the policy can potentially learn more effectively from a ranked list of plausible responses given the prompt. This view draws an explicit connection to Learning-to-Rank (LTR), where most existing preference optimization work can be mapped to existing ranking objectives. Following this connection, we provide an examination of ranking objectives that are not well studied for LM alignment with DPO and SLiC as special cases when list size is two. In particular, we highlight a specific method, LiPO-$λ$, which leverages a state-of-the-art \textit{listwise} ranking objective and weights each preference pair in a more advanced manner. We show that LiPO-$λ$ can outperform DPO variants and SLiC by a clear margin on several preference alignment tasks with both curated and real rankwise preference data.

For agents

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

get_harvested_code_for_paper("2402.01878")
get_code_for_paper("2402.01878")
have("2402.01878")

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

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

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

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

Connect an agent — have() is free.