SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.10093 · EMNLP · 2024

How to Leverage Demonstration Data in Alignment for Large Language Model? A Self-Imitation Learning Perspective

Yige Yuan, Mingxiao Li, Teng Xiao, Huaisheng Zhu, Vasant Honavar, Chao Cui

arXiv · PDF · Open in the Atlas

Code that ran

8 of 10 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; 1 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 6 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/2410.10093.json · badge: /api/ran/2410.10093.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
tengxiao1/GSIL canonical (classifier label)
classifier basis: census
8 ran · 2 no recorded run
FunctionStatusWhere it lives
apply_chat_template Ran
ran; our contract draft was wrong, not the code
tengxiao1/GSIL/gsil/alignment/data.py
pointer only (licence: NONE) · get_code("23781da963dd98a5")
How it ran

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

apply_chat_template_dpo Ran
ran; our contract draft was wrong, not the code
tengxiao1/GSIL/gsil/run_gsil.py
pointer only (licence: NONE) · get_code("1b4af0629010ced4")
How it ran

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

apply_chat_template_spin Ran
ran; our contract draft was wrong, not the code
tengxiao1/GSIL/gsil/run_gsil.py
pointer only (licence: NONE) · get_code("4f500029c1332cc3")
How it ran

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

load_and_process_data_ultrachat Ran
ran, honoured the contract we drafted
tengxiao1/GSIL/gsil/combine.py
pointer only (licence: NONE) · get_code("d644aa0a41ffedf1")
How it ran

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

mix_datasets Ran
ran on a synthesized input
tengxiao1/GSIL/gsil/alignment/data.py
pointer only (licence: NONE) · get_code("a934ef1868f33dea")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, tengxiao1/GSIL 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_prompts Ran
ran; our contract draft was wrong, not the code
tengxiao1/GSIL/gsil/generate.py
pointer only (licence: NONE) · get_code("65ab2e38274df088")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, tengxiao1/GSIL 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_json Ran
ran; our contract draft was wrong, not the code
tengxiao1/GSIL/gsil/combine.py
pointer only (licence: NONE) · get_code("d15e65c12916d1f1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, tengxiao1/GSIL 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_jsonl Ran
ran; our contract draft was wrong, not the code
tengxiao1/GSIL/gsil/combine.py
pointer only (licence: NONE) · get_code("ed3cbe8d977dbf1d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, tengxiao1/GSIL 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_datasets Not yet run
unverified (harvested, no recorded run)
tengxiao1/GSIL/gsil/alignment/data.py
pointer only (licence: NONE) · get_code("26a8955ec17591c5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, tengxiao1/GSIL 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_quantization_config Not yet run
unverified (harvested, no recorded run)
tengxiao1/GSIL/gsil/alignment/model_utils.py
pointer only (licence: NONE) · get_code("c9ed692d311c459a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, tengxiao1/GSIL 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 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 9 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
get_quantization_config 1 other paper
1 dated earlier
2408.15313 (2024-08)
Bi-Factorial Preference Optimization: Balancing Safety-Helpfulness in Language Models

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

This paper introduces a novel generalized selfimitation learning (GSIL) framework, which effectively and efficiently aligns large language models with offline demonstration data. We develop GSIL by deriving a surrogate objective of imitation learning with density ratio estimates, facilitating the use of self-generated data and optimizing the imitation learning objective with simple classification losses. GSIL eliminates the need for complex adversarial training in standard imitation learning, achieving lightweight and efficient fine-tuning for large language models. In addition, GSIL encompasses a family of offline losses parameterized by a general class of convex functions for density ratio estimation and enables a unified view for alignment with demonstration data. Extensive experiments show that GSIL consistently and significantly outperforms baselines in many challenging benchmarks, such as coding (HuamnEval), mathematical reasoning (GSM8K) and instruction-following benchmark (MT-Bench). Code is public available at https://github.com/tengxiao1/GSIL.

For agents

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

get_harvested_code_for_paper("2410.10093")
get_code_for_paper("2410.10093")
have("2410.10093")

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

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

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

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

Connect an agent — have() is free.