PreprintCited by 29Topic ModelingNatural Language Processing TechniquesDomain Adaptation and Few-Shot Learning

Language models need inductive biases to count inductively

Open access
Chang, Yingshan, Bisk, Yonatan·2024·arXiv

Abstract

Counting is a fundamental example of generalization, whether viewed through the mathematical lens of Peano's axioms defining the natural numbers or the cognitive science literature for children learning to count. The argument holds for both cases that learning to count means learning to count infinitely. While few papers have tried to distill transformer "reasoning" to the simplest case of counting, investigating length generalization does occur throughout the literature. In the "train short, test long" paradigm of NLP, length refers to the training sentence length. In formal language recognition, length refers to the input sequence length, or the maximum stack size induced by a pushdown automata. In general problem solving, length refers to the number of hops in a deductive reasoning chain or the recursion depth. For all cases, counting is central to task success. And crucially, generalizing counting inductively is central to success on OOD instances. This work provides extensive empirical results on training language models to count. We experiment with architectures ranging from RNNs, Transformers, State-Space Models and RWKV. We present carefully-designed task formats, auxiliary tasks and positional embeddings to avoid limitations in generalization with OOD-position and OOD-vocabulary. We find that while traditional RNNs trivially achieve inductive counting, Transformers have to rely on positional embeddings to count out-of-domain. As counting is the basis for many arguments concerning the expressivity of Transformers, our finding calls for the community to reexamine the application scope of primitive functions defined in formal characterizations. Finally, modern RNNs also largely underperform traditional RNNs in generalizing counting inductively. We discuss how design choices that enable parallelized training of modern RNNs cause them to lose merits of a recurrent nature.

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Integrity signals

Registry

DataCite · 10.48550/arxiv.2405.20131

Cites

63 of 63 references verified0 citation errors · 0 not checkable

Statistics

Claims the paper makes

The claims and statistics of this paper haven’t been checked yet.

Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.

A few free checks a day · papers already verified open instantly · results are public

Claims other papers make about this one

Each is checked against this paper’s own text: does it say what the citing paper says it does?

  • Counting is described as a notable fundamental challenge for LLMs, including reasoning models.

    “Despite its simplicity, counting poses a notable fundamental challenge for LLMs”

    From Large Language Model Reasoning Failures (2026) · cites this paper as Chang & Bisk, 2024

    The Conclusion says counting infinitely poses a significant challenge for induction and extrapolation, and the Abstract reports that Transformers need positional embeddings to count out of domain. This supports a challenge for the language-model architectures studied, but not an unqualified claim about counting for LLMs generally; the paper also does not establish the added characterization about reasoning models. (LLM, conf=0.84)

    Experimental — accuracy not yet measured
  • Webb et al. (2024) argue that solving the permuted task requires counting letter indices, which LLMs cannot do effectively without tools like a Python interpreter.

    “In response, Webb et al. (2024) argue that solving the permuted task requires counting letter indices, which LLMs cannot do effectively without tools like a Python interpreter (see Chang & Bisk 2024).”

    From Anthropocentric Bias in Language Model Evaluation (2026) · cites this paper as Chang & Bisk 2024

    The Introduction says Transformers do not learn to count inductively, which supports the general point that counting can be difficult for them. But Chang and Bisk do not address Webb et al.’s permuted task, counting letter indices, or the need for a Python interpreter; those specifics are not established by this source. (LLM, conf=0.81)

    Experimental — accuracy not yet measured
  • Counting poses a fundamental challenge for LLMs, including reasoning-specialized models.

    “Despite its simplicity, counting poses a notable fundamental challenge for LLMs (Xu & Ma, 2024; Chang & Bisk, 2024; Zhang & He, 2024; Fu et al., 2024; Conde et al., 2025; Yehudai et al., 2024), even the reasoning ones (Malek et al., 2025)”

    From Large Language Model Reasoning Failures (2026) · cites this paper as Chang & Bisk, 2024

  • Counting failures originate primarily from architectural and representational limits, including tokenization, positional encoding, and training data composition, rather than from superficial prompting or task framing.

    “much work suggest that they originate primarily from architectural and representational limits, including tokenization (Zhang et al., 2024f; Shin & Kaneko, 2024), positional encoding (Chang & Bisk, 2024), and training data composition (Allen-Zhu & Li, 2024), rather than from superficial prompting or task framing on the application-level.”

    From Large Language Model Reasoning Failures (2026) · cites this paper as Chang & Bisk, 2024

Self-check

Percentages, sums and reported differences re-computed from the paper’s own numbers.

The self-check needs the paper’s full text.

Cites

Flagged first, then by citations

Cited by

Sorted by citations

Authors
Chang, Y., & Bisk, Y.
Affiliations
Carnegie Mellon University (US)
Venue
arXiv
Publisher
arXiv
Published
2024
ISSN
2331-8422 (ISSN-L)
OpenAlex
W4399253050
Cited by
0
References
60
Type
posted content
Language
en
Open access
Locations
  • arXiv (Cornell University) (submittedVersion, cc-by)
  • arXiv (Cornell University) (cc-by)
Topics
  • Physical Sciences › Computer Science › Artificial Intelligence › Topic Modeling
  • Physical Sciences › Computer Science › Artificial Intelligence › Natural Language Processing Techniques
  • Physical Sciences › Computer Science › Artificial Intelligence › Domain Adaptation and Few-Shot Learning
Keywords
length generalization, out-of-domain generalization, inductive bias, positional encoding, transformer models, recurrent neural networks, state-space model, RWKV, formal language recognition

About these checks

Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.

Statistics and arithmetic are recomputed, not judged.

Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.

What counts as a claim ›How we measure confidence ›How we check this ›

Are you an author, or do you see a problem with this page? Request a review