Contact
Algeria - National academic platform
...
Prepare your scientific stay

Host laboratory · Invitation letter · Application guidance

Learn more

AI & Research · arXiv Machine Learning · publications

Transformers Learn Two Competing Sorting Algorithms, and Only One Length-Generalizes

Source excerpt

This page presents AI and research content to help researchers, students and AI tools read, cite and verify the information.

arXiv:2610.26974v1 Announce Type: new Abstract: We show that two-layer transformers trained to near-zero loss on a sorting task converge to one of two mechanistically distinct solution classes depending on their initialization. One solution class consists of solutions that do not use the second attention layer to sort, but also fail to length-generalize. The other, which uses both attention layers, length-generalizes perfectly, despite only being trained to sort sequences of a fixed length. By carefully choosing the weight initialization, we demonstrate that we can steer the model toward learning one solution or the other. We identify input types that are rare at the training length but increasingly common at longer sequence lengths as a source of this disparity in length-generalization, and find that layer-wise specialization of the second class of solutions allows them to handle these rare sequences more accurately. In the second class, we discover a mechanism by which the second layer attention can use the contextual information gathered by the first layer attention to reduce its search space. On the related task of finding the minimum of a sequence, we find a similar two solution-type phenomenon, but with the opposite generalization pattern, where a different form of layer-wise specialization causes the two-layer solution to length-generalize worse than the single-attention solution.

Your DzCademia workshop

Check a publication method or promise

A video or journal-finding tool can shortlist titles, not guarantee acceptance. Check identity, scope, author instructions and possible fees at official sources. Do not choose solely on speed promises or one indicator.

A practical exercise

Compare two journals against your research question: fit, article types, instructions and verified terms. Keep unknowns as questions rather than assumptions.

Record reference points
Topic
Transformers Learn Two Competing Sorting Algorithms, and Only One Length-Generalizes
Source website
arxiv.org
Publication date at source
2026-10-21
Collection date on DzCademia
2026-10-21
My preparation plan

An indicative personal list, separate from official documents or requirements. Checkmarks stay on this device; no account needed.

0 / 5 steps checked

Read the source

DzCademia advice and exercises are separate from the source summary and requirements. This structured aid uses automated assistance and is neither scientific validation nor a selection promise. Source consulted on 2026-10-28.

intelligence artificielle
View the original source

Official or original source: arXiv Machine Learning. Always check the details against the primary source.

Back to AI & Research
369
Listed events
1419441
Total visits
2147
Visits today