Yoshua Bengio, Moksh Jain, Sung Hwang, Gauthier Gidel, Juho Lee, Kenji Kawaguchi, Seanie Lee, Minsu Kim, Nikolay Malkin, David Dobre, Lynn Cherif
7 of 8 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, 1 violated it and 0 have no contract verdict; 6 failures of our instrument; 1 no recorded run), measured 2026-11-22; 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.18540.json · badge: /api/ran/2405.18540.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.
| Repository | Role | Ran |
|---|---|---|
| GFNOrg/red-teaming | canonical (classifier label) classifier basis: census |
6 ran · 1 no recorded run |
| gfnorg/red-teaming | canonical (classifier label) classifier basis: classifier_2025 |
1 ran · 0 no recorded run |
| Function | Status | Where it lives |
|---|---|---|
| avg_pooling | Ran ran; our contract draft was wrong, not the code |
GFNOrg/red-teaming/trainers/gfn_trainer.py code served (permissive licence) · get_code("9e3fca8886c2c85e") How it ranRan 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 Tensor, ndim 2, dtype family float, shape (2, 4) 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.
|
| batch_cosine_similarity_kernel | Ran ran; our contract draft was wrong, not the code |
GFNOrg/red-teaming/utils.py code served (permissive licence) · get_code("0c83713b19aeca88") How it ranRan 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 float, ndim 0, dtype family float, shape () 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.
|
| check_filename | Ran ran, violated the contract we drafted |
GFNOrg/red-teaming/collect_samples.py code served (permissive licence) · get_code("9fa453cce5ebc8e9") How it ranRan 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 bool, ndim 0, dtype family float, shape () 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.
|
| get_dataloader | Ran ran; our contract draft was wrong, not the code |
GFNOrg/red-teaming/dataset.py code served (permissive licence) · get_code("a31a641c4e49e500") How it ranRan 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 DataLoader. 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.
|
| get_decay_parameter_names | Ran ran; our contract draft was wrong, not the code |
GFNOrg/red-teaming/utils.py code served (permissive licence) · get_code("38c281ea8977e9ae") How it ranRan 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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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.
|
| get_parameter_names | Ran ran; our contract draft was wrong, not the code |
GFNOrg/red-teaming/utils.py code served (permissive licence) · get_code("214442c552c26bab") How it ranRan 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 list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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.
|
| make_chat_prompt | Ran ran; our contract draft was wrong, not the code |
gfnorg/red-teaming/safety_dataset/create_safety_response.py code served (permissive licence) · get_code("5e006375b39e3def") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned str. 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.
|
| generate_and_return_z_logprob | Not yet run unverified (harvested, no recorded run) |
GFNOrg/red-teaming/trainers/gfn_trainer.py code served (permissive licence) · get_code("1c61f4ae1d677417") How it ranno invocation recorded. |
Of 8 samples lifted from this paper's linked repositories, 8 carry a function identity and 0 do not. Of the 8 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, 1 later) and 7 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.
| Function | Also present in | Earliest-dated | Others named |
|---|---|---|---|
| get_parameter_names | 4 other papers 1 dated earlier, 3 later |
2106.02584 (2021-06) Self-Attention Between Datapoints: Going Beyond Individual Input-Output Pairs in Deep Learning |
2407.09533 (2024-07) Video Occupancy Models 2408.16090 (2024-08) EPO: Hierarchical LLM Agents with Environment Preference Optimization and 1 more not named here |
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.
Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.
Red-teaming, or identifying prompts that elicit harmful responses, is a critical step in ensuring the safe and responsible deployment of large language models (LLMs). Developing effective protection against many modes of attack prompts requires discovering diverse attacks. Automated red-teaming typically uses reinforcement learning to fine-tune an attacker language model to generate prompts that elicit undesirable responses from a target LLM, as measured, for example, by an auxiliary toxicity classifier. We show that even with explicit regularization to favor novelty and diversity, existing approaches suffer from mode collapse or fail to generate effective attacks. As a flexible and probabilistically principled alternative, we propose to use GFlowNet fine-tuning, followed by a secondary smoothing phase, to train the attacker model to generate diverse and effective attack prompts. We find that the attacks generated by our method are effective against a wide range of target LLMs, both with and without safety tuning, and transfer well between target LLMs. Finally, we demonstrate that models safetytuned using a dataset of red-teaming prompts generated by our method are robust to attacks from other RL-based red-teaming approaches. Code is available at https://github.com/GFNOrg/red-teaming. Warning: This paper contains offensive language model outputs.
The same record, over MCP at https://syntology.ai/mcp:
get_harvested_code_for_paper("2405.18540")
get_code_for_paper("2405.18540")
have("2405.18540")
The run record, dated, one paper per request, free:
curl https://syntology.ai/api/ran/2405.18540.json
A badge for a README (the split and the date, never a ratio):
[](https://syntology.ai/paper/2405.18540)
Connect an agent — have() is free.