SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2311.07468 · 2023

An Analysis and Mitigation of the Reversal Curse

arXiv · PDF · Open in the Atlas

Code that ran

12 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; 7 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 4 failures of our instrument; 2 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/2311.07468.json · badge: /api/ran/2311.07468.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
trestad/mitigating-reversal-curse canonical (classifier label)
classifier basis: census
12 ran · 2 no recorded run
FunctionStatusWhere it lives
compute_bleu Ran
ran, honoured the contract we drafted
trestad/mitigating-reversal-curse/generate.py
pointer only (licence: NONE) · get_code("f0d20ebd827390d6")
How it ran

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

compute_metric Ran
ran, honoured the contract we drafted
trestad/mitigating-reversal-curse/generate.py
pointer only (licence: NONE) · get_code("33553b56020f3138")
How it ran

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

evaluate_completion Ran
ran, violated the contract we drafted
trestad/mitigating-reversal-curse/generate.py
pointer only (licence: NONE) · get_code("0fe702a77b67a5de")
How it ran

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

gelu_fast Ran
ran, honoured the contract we drafted
trestad/mitigating-reversal-curse/transformers/src/transformers/activations_tf.py
pointer only (licence: NONE); the stored copy get_code serves, from VITA-Group/READ-ME, is pointer only (licence: NONE) · get_code("37a5eed2dbd663ca")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, trestad/mitigating-reversal-curse 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_config_class_from_processor_class Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
trestad/mitigating-reversal-curse/transformers/utils/create_dummy_models.py
pointer only (licence: NONE); the stored copy get_code serves, from takagi97/OXA-Fine-tuning, is pointer only (licence: NONE) · get_code("3d999b95009c7537")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, trestad/mitigating-reversal-curse 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_processor_types_from_config_class Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
trestad/mitigating-reversal-curse/transformers/utils/create_dummy_models.py
pointer only (licence: NONE); the stored copy get_code serves, from takagi97/OXA-Fine-tuning, is pointer only (licence: NONE) · get_code("0c0b81b081919d8e")
How it ran

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

hertz_to_mel Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
trestad/mitigating-reversal-curse/transformers/src/transformers/audio_utils.py
pointer only (licence: NONE); the stored copy get_code serves, from VITA-Group/READ-ME, is pointer only (licence: NONE) · get_code("9a09cbf63a4ddff4")
How it ran

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

mel_filter_bank Ran
ran, honoured the contract we drafted
trestad/mitigating-reversal-curse/transformers/src/transformers/audio_utils.py
pointer only (licence: NONE); the stored copy get_code serves, from VITA-Group/READ-ME, is pointer only (licence: NONE) · get_code("7e7c601df5b22499")
How it ran

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

mel_to_hertz Ran
ran, honoured the contract we drafted
trestad/mitigating-reversal-curse/transformers/src/transformers/audio_utils.py
pointer only (licence: NONE); the stored copy get_code serves, from VITA-Group/READ-ME, is pointer only (licence: NONE) · get_code("2650530d2f0dd9b2")
How it ran

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

mish Ran
ran, honoured the contract we drafted
trestad/mitigating-reversal-curse/transformers/src/transformers/activations_tf.py
pointer only (licence: NONE); the stored copy get_code serves, from VITA-Group/READ-ME, is pointer only (licence: NONE) · get_code("cc8c8c3ebf0c343f")
How it ran

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

new_torch_call Ran
ran; our contract draft was wrong, not the code
trestad/mitigating-reversal-curse/run_mlm.py
pointer only (licence: NONE) · get_code("8a3c4f29d18d7783")
How it ran

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

quick_gelu Ran
ran, honoured the contract we drafted
trestad/mitigating-reversal-curse/transformers/src/transformers/activations_tf.py
pointer only (licence: NONE); the stored copy get_code serves, from VITA-Group/READ-ME, is pointer only (licence: NONE) · get_code("e2d56cb91f999bef")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, trestad/mitigating-reversal-curse 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_architectures_from_config_class Not yet run
unverified (harvested, no recorded run)
trestad/mitigating-reversal-curse/transformers/utils/create_dummy_models.py
pointer only (licence: NONE); the stored copy get_code serves, from takagi97/OXA-Fine-tuning, is pointer only (licence: NONE) · get_code("b176efb26f72e507")
How it ran

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

prepare_model_for_training Not yet run
unverified (harvested, no recorded run)
trestad/mitigating-reversal-curse/run_mlm.py
pointer only (licence: NONE) · get_code("d30fdeea401b3cc5")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, trestad/mitigating-reversal-curse 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, 9 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 9 later) and 5 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_config_class_from_processor_class 27 other papers
2 dated earlier, 25 later
2007.07779 (2020-07)
AdapterHub: A Framework for Adapting Transformers
2308.12219 (2023-08)
Diffusion Language Models Can Perform Many Tasks with Scaling and Instruction-Finetuning
2312.15710 (2023-12)
Alleviating Hallucinations of Large Language Models through Induced Hallucinations
and 24 more not named here
get_architectures_from_config_class 25 other papers
1 dated earlier, 24 later
2308.12219 (2023-08)
Diffusion Language Models Can Perform Many Tasks with Scaling and Instruction-Finetuning
2312.15710 (2023-12)
Alleviating Hallucinations of Large Language Models through Induced Hallucinations
2024.findings-naacl.117 (2024 (year only))
Mitigating Hallucination in Abstractive Summarization with Domain-Conditional Mutual Information
and 22 more not named here
get_processor_types_from_config_class 25 other papers
1 dated earlier, 24 later
2308.12219 (2023-08)
Diffusion Language Models Can Perform Many Tasks with Scaling and Instruction-Finetuning
2312.15710 (2023-12)
Alleviating Hallucinations of Large Language Models through Induced Hallucinations
2024.findings-naacl.117 (2024 (year only))
Mitigating Hallucination in Abstractive Summarization with Domain-Conditional Mutual Information
and 22 more not named here
mish 25 other papers
15 dated earlier, 10 later
2007.07779 (2020-07)
AdapterHub: A Framework for Adapting Transformers
2104.08400 (2021-04)
Structure-Aware Abstractive Conversation Summarization via Discourse and Action Graphs
2106.00420 (2021-06)
Dialogue-oriented Pre-training
and 22 more not named here
gelu_fast 19 other papers
10 dated earlier, 9 later
2007.07779 (2020-07)
AdapterHub: A Framework for Adapting Transformers
2110.04366 (2021-10)
Towards a Unified View of Parameter-Efficient Transfer Learning
2111.00160 (2021-11)
DSEE: Dually Sparsity-embedded Efficient Tuning of Pre-trained Language Models
and 16 more not named here
quick_gelu 16 other papers
7 dated earlier, 9 later
2007.07779 (2020-07)
AdapterHub: A Framework for Adapting Transformers
2202.00666 (2022-02)
Locally Typical Sampling
2211.05392 (2022-11)
EVENTS REALM: Event Reasoning of Entity States via Language Models
and 13 more not named here
hertz_to_mel 5 other papers
5 later
2024.findings-naacl.117 (2024 (year only))
Mitigating Hallucination in Abstractive Summarization with Domain-Conditional Mutual Information
2402.18223 (2024-02)
Improving Open-Ended Text Generation via Adaptive Decoding
2404.16367 (2024-04)
Learning Syntax Without Planting Trees: Understanding Hierarchical Generalization in Transformers
and 2 more not named here
mel_to_hertz 5 other papers
5 later
2024.findings-naacl.117 (2024 (year only))
Mitigating Hallucination in Abstractive Summarization with Domain-Conditional Mutual Information
2402.18223 (2024-02)
Improving Open-Ended Text Generation via Adaptive Decoding
2404.16367 (2024-04)
Learning Syntax Without Planting Trees: Understanding Hierarchical Generalization in Transformers
and 2 more not named here
mel_filter_bank 4 other papers
4 later
2024.findings-naacl.117 (2024 (year only))
Mitigating Hallucination in Abstractive Summarization with Domain-Conditional Mutual Information
2404.16367 (2024-04)
Learning Syntax Without Planting Trees: Understanding Hierarchical Generalization in Transformers
2410.12178 (2024-10)
Model Balancing Helps Low-data Training and Fine-tuning
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-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

Recent research observed a noteworthy phenomenon in large language models (LLMs), referred to as the ``reversal curse.'' The reversal curse is that when dealing with two entities, denoted as $a$ and $b$, connected by their relation $R$ and its inverse $R^{-1}$, LLMs excel in handling sequences in the form of ``$aRb$,'' but encounter challenges when processing ``$bR^{-1}a$,'' whether in generation or comprehension. For instance, GPT-4 can accurately respond to the query ``Tom Cruise's mother is?'' with ``Mary Lee Pfeiffer,'' but it struggles to provide a satisfactory answer when asked ``Mary Lee Pfeiffer's son is?'' In this paper, we undertake the first-ever study of how the reversal curse happens in LLMs. Our investigations reveal that the reversal curse can stem from the specific training objectives, which become particularly evident in the widespread use of next-token prediction within most causal language models. We hope this initial investigation can draw more attention to the reversal curse, as well as other underlying limitations in current LLMs.

For agents

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

get_harvested_code_for_paper("2311.07468")
get_code_for_paper("2311.07468")
have("2311.07468")

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

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

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

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

Connect an agent — have() is free.