SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.11984 · 2023

From Interpolation to Extrapolation: Complete Length Generalization for Arithmetic Transformers

arXiv · PDF · Open in the Atlas

Code that ran

8 of 9 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; 1 honoured the contract we drafted, 3 violated it and 0 have no contract verdict; 4 failures of our instrument; 1 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/2310.11984.json · badge: /api/ran/2310.11984.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
shaoxiongduan/attentionbiascalibration canonical (classifier label)
classifier basis: census
8 ran · 1 no recorded run
FunctionStatusWhere it lives
base_to_dec Ran
ran, honoured the contract we drafted
shaoxiongduan/attentionbiascalibration/src/utility.py
pointer only (licence: NONE) · get_code("85f9fedf9c68aca7")
How it ran

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

build_vocab_from_iterator Ran
ran; our contract draft was wrong, not the code
shaoxiongduan/attentionbiascalibration/src/vocab.py
pointer only (licence: NONE) · get_code("a61341f3f2a4e142")
How it ran

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

dec_to_base Ran
ran; our contract draft was wrong, not the code
shaoxiongduan/attentionbiascalibration/src/utility.py
pointer only (licence: NONE) · get_code("81452af0649e120a")
How it ran

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

dropoffCondition Ran
ran, violated the contract we drafted
shaoxiongduan/attentionbiascalibration/src/calcBias.py
pointer only (licence: NONE) · get_code("d4c00ff11add431b")
How it ran

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

dropoffConditionSelf Ran
ran, violated the contract we drafted
shaoxiongduan/attentionbiascalibration/src/calcBias.py
pointer only (licence: NONE) · get_code("95095979355cf792")
How it ran

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

is_expression Ran
ran, violated the contract we drafted
shaoxiongduan/attentionbiascalibration/src/config.py
pointer only (licence: NONE) · get_code("635a467b8c22ef9d")
How it ran

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

read_config Ran
ran; our contract draft was wrong, not the code
shaoxiongduan/attentionbiascalibration/src/config.py
pointer only (licence: NONE) · get_code("1daf463ac4d1ded1")
How it ran

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

vocab Ran
ran; our contract draft was wrong, not the code
shaoxiongduan/attentionbiascalibration/src/vocab.py
pointer only (licence: NONE) · get_code("5d8daeb025ae0e70")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, shaoxiongduan/attentionbiascalibration 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_square_subsequent_mask Not yet run
unverified (harvested, no recorded run)
shaoxiongduan/attentionbiascalibration/src/utility.py
pointer only (licence: NONE) · get_code("82664ea4e7034723")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, shaoxiongduan/attentionbiascalibration 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 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 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 8 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
generate_square_subsequent_mask 4 other papers
2 dated earlier, 1 later, 1 same year, order not determinable
2006.10369 (2020-06)
Deep Encoder, Shallow Decoder: Reevaluating Non-autoregressive Machine Translation
2211.07727 (2022-11)
Logical Tasks for Measuring Extrapolation and Rule Comprehension
aaai_25328 (2023 (year only))
Text-DIAE: A Self-Supervised Degradation Invariant Autoencoder for Text Recognition and Document Enhancement
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

In this paper, we investigate the inherent capabilities of transformer models in learning arithmetic algorithms, such as addition and parity. Through experiments and attention analysis, we identify a number of crucial factors for achieving optimal length generalization. We show that transformer models are able to generalize to long lengths with the help of targeted attention biasing. In particular, our solution solves the Parity task, a well-known and theoretically proven failure mode for Transformers. We then introduce Attention Bias Calibration (ABC), a calibration stage that enables the model to automatically learn the proper attention biases, which we show to be connected to mechanisms in relative position encoding. We demonstrate that using ABC, the transformer model can achieve unprecedented near-perfect length generalization on certain arithmetic tasks. In addition, we show that ABC bears remarkable similarities to RPE and LoRA, which may indicate the potential for applications to more complex tasks.

For agents

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

get_harvested_code_for_paper("2310.11984")
get_code_for_paper("2310.11984")
have("2310.11984")

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

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

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

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

Connect an agent — have() is free.