Papers › The Reversal Curse: LLMs trained on "A is B" fail to learn "B is A"

The Reversal Curse: LLMs trained on "A is B" fail to learn "B is A"

21 Sep 2023arXiv:2309.12288archive 2025-07-28

Lukas Berglund, Meg Tong, Max Kaufmann, Mikita Balesni, Asa Cooper Stickland, Tomasz Korbak, Owain Evans

We expose a surprising failure of generalization in auto-regressive large language models (LLMs). If a model is trained on a sentence of the form "A is B", it will not automatically generalize to the reverse direction "B is A". This is the Reversal Curse. For instance, if a model is trained on "Valentina Tereshkova was the first woman to travel to space", it will not automatically be able to answer the question, "Who was the first woman to travel to space?". Moreover, the likelihood of the correct answer ("Valentina Tershkova") will not be higher than for a random name. Thus, models do not generalize a prevalent pattern in their training set: if "A is B" occurs, "B is A" is more likely to occur. It is worth noting, however, that if "A is B" appears in-context, models can deduce the reverse relationship. We provide evidence for the Reversal Curse by finetuning GPT-3 and Llama-1 on fictitious statements such as "Uriah Hawthorne is the composer of Abyssal Melodies" and showing that they fail to correctly answer "Who composed Abyssal Melodies?". The Reversal Curse is robust across model sizes and model families and is not alleviated by data augmentation. We also evaluate ChatGPT (GPT-3.5 and GPT-4) on questions about real-world celebrities, such as "Who is Tom Cruise's mother? [A: Mary Lee Pfeiffer]" and the reverse "Who is Mary Lee Pfeiffer's son?". GPT-4 correctly answers questions like the former 79% of the time, compared to 33% for the latter. Code available at: https://github.com/lukasberglund/reversal_curse.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2309.12288")

Code

Syntology Ran 9 of 11 code samples harvested from 1 repository linked to this paper; 2 have no recorded run. Of those that ran: 9 ran with no contract checked.

By repository: official repository: 11 samples from 1 repository, 9 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

lukasberglund/reversal_curse officialmentioned in papermentioned on GitHub report
metr/public-tasks mentioned on GitHubpytorchNOASSERTION report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

11 samples harvested; 9 ran; 0 honoured the contract we drafted; 2 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

9ran
2unverified

Licence: 11 of the 11 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from lukasberglund/reversal_curse. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

convert_runs_to_df lukasberglund/reversal_curse/src/wandb_utils.py official repository ran no licence file found · pointer only · 2748d6bfde1f400a · report
generate_wandb_substring_filter lukasberglund/reversal_curse/src/wandb_utils.py official repository ran no licence file found · pointer only · 8893b67058cf5e56 · report
get_cost_per_1k_tokens lukasberglund/reversal_curse/src/models/openai_complete.py official repository ran no licence file found · pointer only · b34d526a98178a10 · report
get_openwebtext_path lukasberglund/reversal_curse/src/dataset.py official repository ran no licence file found · pointer only · aa42dd70be709dc2 · report
get_preprocess_function lukasberglund/reversal_curse/src/dataset.py official repository ran no licence file found · pointer only · f94438c1b75c62d2 · report
load_from_json lukasberglund/reversal_curse/src/common.py official repository ran no licence file found · pointer only · e01bde09eb15910f · report
load_from_jsonl lukasberglund/reversal_curse/src/common.py official repository ran no licence file found · pointer only · 9ebcde58a78649e8 · report
load_from_yaml lukasberglund/reversal_curse/src/common.py official repository ran no licence file found · pointer only · 6fe4b4ebee97037c · report
log_after_retry lukasberglund/reversal_curse/src/models/openai_complete.py official repository ran no licence file found · pointer only · e35d51ba8013184f · report
load_model lukasberglund/reversal_curse/src/models/common.py official repository unverified no licence file found · pointer only · c9de75a7c39c5012 · report
load_tokenizer lukasberglund/reversal_curse/src/models/common.py official repository unverified no licence file found · pointer only · e18553bc097d701c · report

Tasks

Data AugmentationSentence

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Absolute Position EncodingsAdamAttentionAttention DropoutBPECosine AnnealingDense ConnectionsDropoutGPT-3GPT-4Label SmoothingLayer NormalizationLinear LayerLinear Warmup With Cosine AnnealingMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformerWeight Decayfail

1 archive method tag without a method page not shown.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections