Papers › Born a Transformer -- Always a Transformer?

Born a Transformer -- Always a Transformer?

27 May 2025arXiv:2505.21785archive 2025-07-28

Yana Veitsman, Mayank Jobanputra, Yash Sarrof, Aleksandra Bakalova, Vera Demberg, Ellie Pavlick, Michael Hahn

Transformers have theoretical limitations in modeling certain sequence-to-sequence tasks, yet it remains largely unclear if these limitations play a role in large-scale pretrained LLMs, or whether LLMs might effectively overcome these constraints in practice due to the scale of both the models themselves and their pretraining data. We explore how these architectural constraints manifest after pretraining, by studying a family of retrieval and copying tasks inspired by Liu et al. [2024a]. We use a recently proposed framework for studying length generalization [Huang et al., 2025] to provide guarantees for each of our settings. Empirically, we observe an induction-versus-anti-induction asymmetry, where pretrained models are better at retrieving tokens to the right (induction) rather than the left (anti-induction) of a query token. This asymmetry disappears upon targeted fine-tuning if length-generalization is guaranteed by theory. Mechanistic analysis reveals that this asymmetry is connected to the differences in the strength of induction versus anti-induction circuits within pretrained transformers. We validate our findings through practical experiments on real-world tasks demonstrating reliability risks. Our results highlight that pretraining selectively enhances certain transformer capabilities, but does not overcome fundamental length-generalization limits.

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="2505.21785")

Code

Syntology Ran 0 of 12 code samples harvested from 1 repository linked to this paper; 12 have no recorded run.

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

lacoco-lab/always_a_transformer officialmentioned in paperpytorchMIT 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

12 samples harvested; 0 ran; 0 honoured the contract we drafted; 12 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.

12unverified

Licence: 0 of the 12 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 lacoco-lab/always_a_transformer. “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.

compute_means_stds lacoco-lab/always_a_transformer/copying/evaluation.py official repository unverified MIT (permissive) · 8e508289d57d70e2 · report
eval_collator lacoco-lab/always_a_transformer/finetuning/copy_str/finetune_copy.py official repository unverified MIT (permissive) · fbf6b639efd24db3 · report
find_adjacent_characters lacoco-lab/always_a_transformer/finetuning/inductionhead/generate_data.py official repository unverified MIT (permissive) · 68af3b0107b96e33 · report
generate_string lacoco-lab/always_a_transformer/finetuning/inductionhead/generate_data.py official repository unverified MIT (permissive) · 3270771efda2e25f · report
generate_valid_sample lacoco-lab/always_a_transformer/finetuning/inductionhead/generate_data.py official repository unverified MIT (permissive) · f1360f0d8bfa8542 · report
load_adv_accuracies lacoco-lab/always_a_transformer/visualisations/finetune_ood.py official repository unverified MIT (permissive) · 478f3d6762fd9674 · report
load_all_models lacoco-lab/always_a_transformer/copying/evaluation.py official repository unverified MIT (permissive) · ac77a3c20a83e890 · report
load_and_prepare_data lacoco-lab/always_a_transformer/finetuning/flipflop/finetune_flipflop.py official repository unverified MIT (permissive) · d2f2fdec627fb1b5 · report
load_data_from_file lacoco-lab/always_a_transformer/finetuning/copy_str/finetune_copy.py official repository unverified MIT (permissive) · a9ad18c47c5a8531 · report
load_data_from_file lacoco-lab/always_a_transformer/finetuning/flipflop/finetune_flipflop.py official repository unverified MIT (permissive) · ac35274d97750578 · report
read_accuracy lacoco-lab/always_a_transformer/visualisations/finetune_ood.py official repository unverified MIT (permissive) · 5e41c7d3af1343c9 · report
task_from_filename lacoco-lab/always_a_transformer/visualisations/finetune_ood.py official repository unverified MIT (permissive) · fe46d9a5ad18a011 · report

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

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