SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2012.11635 · ICLR · 2021

A Distributional Approach to Controlled Text Generation

Muhammad Khalifa, Hady Elsahar, Marc Dymetman

arXiv · PDF · Open in the Atlas

Code that ran

4 of 8 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 3 failures of our instrument; 4 no recorded run), measured 2026-11-21; 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/2012.11635.json · badge: /api/ran/2012.11635.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
naver/gdc canonical (classifier label)
classifier basis: classifier_2025
3 ran · 3 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 1 no recorded run
FunctionStatusWhere it lives
BaseTrainer Ran
ran on a synthesized input · constructed an object; no result was computed
naver/gdc/dpg/gdc/gdc/gdc.py
pointer only (licence: NOASSERTION) · get_code("825da61438abc2b7")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, naver/gdc (NOASSERTION). 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.

logprobs_from_logits Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
naver/gdc/dpg/gdc/gdc/gdc.py
pointer only (licence: NOASSERTION) · get_code("38599d52fa916dd2")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, naver/gdc (NOASSERTION). 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.

stack_dicts Ran
ran; our contract draft was wrong, not the code
naver/gdc/dpg/gdc/gdc/core.py
pointer only (licence: NOASSERTION) · get_code("0757e25958eb0a41")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, naver/gdc (NOASSERTION). 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.

stack_dicts Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from naver/gdc
pointer only; the stored copy get_code serves, from naver/gdc, is pointer only (licence: NOASSERTION) · get_code("c421e6f0c295b7fb")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

GDCTrainer Not yet run
unverified (harvested, no recorded run)
naver/gdc/dpg/gdc/gdc/gdc.py
pointer only (licence: NOASSERTION) · get_code("2d73cd77f50f5669")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, naver/gdc (NOASSERTION). 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.

add_suffix Not yet run
unverified (harvested, no recorded run)
naver/gdc/dpg/gdc/gdc/core.py
pointer only (licence: NOASSERTION) · get_code("3d94961daec82cce")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, naver/gdc (NOASSERTION). 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.

flatten_dict Not yet run
unverified (harvested, no recorded run)
naver/gdc/dpg/gdc/gdc/core.py
pointer only (licence: NOASSERTION) · get_code("2f2b2a8fe27dcc79")
How it ran

The body of this sample is withheld: GitHub could not classify the licence of this paper's repository, naver/gdc (NOASSERTION). 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.

flatten_dict Not yet run
unverified (harvested, no recorded run)
this paper's copy was not recorded; identical code first harvested from naver/gdc
pointer only; the stored copy get_code serves, from naver/gdc, is pointer only (licence: NOASSERTION) · get_code("8826b925c6d6132e")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 3 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 3 later) and 3 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
flatten_dict
brick of this paper's assembly: helper
3 other papers
3 later · 1 only as an assembly brick
2112.00791 (2021-12)
Controlling Conditional Language Models without Catastrophic Forgetting
2206.00761 (2022-06)
On Reinforcement Learning and Distribution Matching for Fine-Tuning Language Models with no Catastrophic Forgetting
2310.14503 (2023-10)
Diversify Question Generation with Retrieval-Augmented Style Transfer
stack_dicts
brick of this paper's assembly: helper
3 other papers
3 later · 1 only as an assembly brick
2112.00791 (2021-12)
Controlling Conditional Language Models without Catastrophic Forgetting
2206.00761 (2022-06)
On Reinforcement Learning and Distribution Matching for Fine-Tuning Language Models with no Catastrophic Forgetting
2310.14503 (2023-10)
Diversify Question Generation with Retrieval-Augmented Style Transfer
add_suffix 1 other paper
1 later
2310.14503 (2023-10)
Diversify Question Generation with Retrieval-Augmented Style Transfer

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

Repositories linked to this paper

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

Abstract

We propose a Distributional Approach for addressing Controlled Text Generation from pre-trained Language Models (LMs). This approach permits to specify, in a single formal framework, both "pointwise" and "distributional" constraints over the target LM -to our knowledge, the first model with such generalitywhile minimizing KL divergence from the initial LM distribution. The optimal target distribution is then uniquely determined as an explicit EBM (Energy-Based Model) representation. From that optimal representation we then train a target controlled Autoregressive LM through an adaptive distributional variant of Policy Gradient. We conduct a first set of experiments over pointwise constraints showing the advantages of our approach over a set of baselines, in terms of obtaining a controlled LM balancing constraint satisfaction with divergence from the initial LM. We then perform experiments over distributional constraints, a unique feature of our approach, demonstrating its potential as a remedy to the problem of Bias in Language Models. Through an ablation study, we show the effectiveness of our adaptive technique for obtaining faster convergence. 1 * Equal Contributions. † Work done during an internship at NAVER Labs Europe.

For agents

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

get_harvested_code_for_paper("2012.11635")
get_code_for_paper("2012.11635")
have("2012.11635")

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

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

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

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

Connect an agent — have() is free.