SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2409.15647 · ICLR · 2025

Looped Transformers for Length Generalization

Yilun Du, Kannan Ramchandran, Kangwook Lee, Ying Fan

arXiv · PDF · Open in the Atlas

Code that ran

14 of 17 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; 6 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 7 failures of our instrument; 3 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/2409.15647.json · badge: /api/ran/2409.15647.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
UW-Madison-Lee-Lab/looped-tf canonical (classifier label)
classifier basis: census
14 ran · 3 no recorded run
FunctionStatusWhere it lives
build_general_model Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
UW-Madison-Lee-Lab/looped-tf/src/models.py
pointer only (licence: NONE) · get_code("b87d86c9476163f8")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, UW-Madison-Lee-Lab/looped-tf 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.

check_number_comma Ran
ran, violated the contract we drafted
UW-Madison-Lee-Lab/looped-tf/src/transformers/convert_slow_tokenizer.py
pointer only (licence: NONE) · get_code("a727df5fd2f5599a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, UW-Madison-Lee-Lab/looped-tf 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.

convert_to_one_hot Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
UW-Madison-Lee-Lab/looped-tf/src/utils.py
pointer only (licence: NONE) · get_code("2b0656642339e6c3")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, UW-Madison-Lee-Lab/looped-tf 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.

decimal_to_binary Ran
ran, honoured the contract we drafted
UW-Madison-Lee-Lab/looped-tf/src/generate_training_data.py
pointer only (licence: NONE) · get_code("8093f1fb3f100aa2")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, UW-Madison-Lee-Lab/looped-tf 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.

ensure_valid_input Ran
ran; our contract draft was wrong, not the code
UW-Madison-Lee-Lab/looped-tf/src/transformers/convert_graph_to_onnx.py
pointer only (licence: NONE) · get_code("d770e1dd1d799a47")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, UW-Madison-Lee-Lab/looped-tf 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.

exact_match_accuracy Ran
ran; our contract draft was wrong, not the code
UW-Madison-Lee-Lab/looped-tf/src/utils.py
pointer only (licence: NONE) · get_code("13826a704319bc71")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, UW-Madison-Lee-Lab/looped-tf 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
UW-Madison-Lee-Lab/looped-tf/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, UW-Madison-Lee-Lab/looped-tf 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.

generate_identified_filename Ran
ran; our contract draft was wrong, not the code
UW-Madison-Lee-Lab/looped-tf/src/transformers/convert_graph_to_onnx.py
pointer only (licence: NONE) · get_code("7efe3db5c9e2f94d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, UW-Madison-Lee-Lab/looped-tf 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.

generate_prompt_matrix_parity Ran
ran; our contract draft was wrong, not the code
UW-Madison-Lee-Lab/looped-tf/src/generate_training_data.py
pointer only (licence: NONE) · get_code("e8bfa1d05b93d145")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, UW-Madison-Lee-Lab/looped-tf 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.

generate_prompt_matrix_sum_reverse Ran
ran; our contract draft was wrong, not the code
UW-Madison-Lee-Lab/looped-tf/src/generate_training_data.py
pointer only (licence: NONE) · get_code("c4d0ba9418abbc31")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, UW-Madison-Lee-Lab/looped-tf 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_final_var Ran
ran, honoured the contract we drafted
UW-Madison-Lee-Lab/looped-tf/src/curriculum.py
pointer only (licence: NONE) · get_code("3c24ac252fef0868")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, UW-Madison-Lee-Lab/looped-tf 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
UW-Madison-Lee-Lab/looped-tf/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, UW-Madison-Lee-Lab/looped-tf 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.

one_hot_to_int Ran
ran, honoured the contract we drafted
UW-Madison-Lee-Lab/looped-tf/src/utils.py
pointer only (licence: NONE) · get_code("e427721d61f5277d")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, UW-Madison-Lee-Lab/looped-tf 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
UW-Madison-Lee-Lab/looped-tf/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, UW-Madison-Lee-Lab/looped-tf 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.

convert_slow_tokenizer Not yet run
unverified (harvested, no recorded run)
UW-Madison-Lee-Lab/looped-tf/src/transformers/convert_slow_tokenizer.py
pointer only (licence: NONE) · get_code("11edc6c69e396f6c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, UW-Madison-Lee-Lab/looped-tf 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.

get_configuration_file Not yet run
unverified (harvested, no recorded run)
UW-Madison-Lee-Lab/looped-tf/src/transformers/configuration_utils.py
pointer only (licence: NONE); the stored copy get_code serves, from VITA-Group/READ-ME, is pointer only (licence: NONE) · get_code("dd3166a87bc972ff")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, UW-Madison-Lee-Lab/looped-tf 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.

infer_shapes Not yet run
unverified (harvested, no recorded run)
UW-Madison-Lee-Lab/looped-tf/src/transformers/convert_graph_to_onnx.py
pointer only (licence: NONE) · get_code("3449d7d975edfb89")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, UW-Madison-Lee-Lab/looped-tf 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 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 10 are also present in other papers whose code we hold (10 with at least one paper dated earlier, 0 the same month, 5 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.

FunctionAlso present inEarliest-datedOthers named
mish 25 other papers
22 dated earlier, 2 later, 1 same year, order not determinable
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
16 dated earlier, 2 later, 1 same year, order not determinable
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
13 dated earlier, 2 later, 1 same year, order not determinable
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
ensure_valid_input 14 other papers
14 dated earlier
2007.07779 (2020-07)
AdapterHub: A Framework for Adapting Transformers
2107.00910 (2021-07)
Learned Token Pruning for Transformers
2111.00160 (2021-11)
DSEE: Dually Sparsity-embedded Efficient Tuning of Pre-trained Language Models
and 11 more not named here
generate_identified_filename 14 other papers
14 dated earlier
2007.07779 (2020-07)
AdapterHub: A Framework for Adapting Transformers
2107.00910 (2021-07)
Learned Token Pruning for Transformers
2111.00160 (2021-11)
DSEE: Dually Sparsity-embedded Efficient Tuning of Pre-trained Language Models
and 11 more not named here
infer_shapes 14 other papers
14 dated earlier
2007.07779 (2020-07)
AdapterHub: A Framework for Adapting Transformers
2107.00910 (2021-07)
Learned Token Pruning for Transformers
2111.00160 (2021-11)
DSEE: Dually Sparsity-embedded Efficient Tuning of Pre-trained Language Models
and 11 more not named here
check_number_comma 13 other papers
13 dated earlier
2007.07779 (2020-07)
AdapterHub: A Framework for Adapting Transformers
2107.00910 (2021-07)
Learned Token Pruning for Transformers
2111.00160 (2021-11)
DSEE: Dually Sparsity-embedded Efficient Tuning of Pre-trained Language Models
and 10 more not named here
convert_slow_tokenizer 13 other papers
13 dated earlier
2007.07779 (2020-07)
AdapterHub: A Framework for Adapting Transformers
2107.00910 (2021-07)
Learned Token Pruning for Transformers
2111.00160 (2021-11)
DSEE: Dually Sparsity-embedded Efficient Tuning of Pre-trained Language Models
and 10 more not named here
get_configuration_file 11 other papers
10 dated earlier, 1 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 8 more not named here
get_final_var 8 other papers
5 dated earlier, 3 later
2306.04891 (2023-06)
In-Context Learning through the Bayesian Prism
2310.17086 (2023-10)
Transformers Learn to Achieve Second-Order Convergence Rates for In-Context Linear Regression
2402.03170 (2024-02)
Is Mamba Capable of In-Context Learning?
and 5 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 work has shown that Transformers trained from scratch can successfully solve various arithmetic and algorithmic tasks, such as adding numbers and computing parity. While these Transformers generalize well on unseen inputs of the same length, they struggle with length generalization, i.e., handling inputs of unseen lengths. In this work, we demonstrate that looped Transformers with an adaptive number of steps significantly improve length generalization. We focus on tasks with a known iterative solution, involving multiple iterations of a RASP-L operation-a length-generalizable operation that can be expressed by a finite-sized Transformer. We train looped Transformers using our proposed learning algorithm and observe that they learn highly length-generalizable solutions for various tasks. Recently, there has been growing interest in using recurrent architectures for reasoning (Dehghani

For agents

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

get_harvested_code_for_paper("2409.15647")
get_code_for_paper("2409.15647")
have("2409.15647")

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

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

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

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

Connect an agent — have() is free.