Algorithm Development in Neural Networks: Insights from the Streaming Parity Task

Loek van Rossem, Andrew M. Saxe
2/14/2026

No official code found. Best implementation: loekvanrossem/rnn_structure (3 stars, last commit 2025-08-06). 1 more below.

Abstract

Even when massively overparameterized, deep neural networks show a remarkable ability to generalize. Research on this phenomenon has focused on generalization within distribution, via smooth interpolation. Yet in some settings neural networks also learn to extrapolate to data far beyond the bounds of the original training set, sometimes even allowing for infinite generalization, implying that an algorithm capable of solving the task has been learned. Here we undertake a case study of the learning dynamics of recurrent neural networks (RNNs) trained on the streaming parity task in order to develop an effective theory of algorithm development. The streaming parity task is a simple but nonlinear task defined on sequences up to arbitrary length. We show that, with sufficient finite training experience, RNNs exhibit a phase transition to perfect infinite generalization. Using an effective theory for the representational dynamics, we find an implicit representational merger effect which can be interpreted as the construction of a finite automaton that reproduces the task. Overall, our results disclose one mechanism by which neural networks can generalize infinitely from finite training experience.

View on arXivView PDF

Code Implementations(2)

Replicating "Algorithm Development in Neural Networks: Insights from the Streaming Parity Task"

20Python, Jupyter NotebookJul 23, 20251 years ago

Code for our paper "Algorithm Development in Neural Networks: Insights from the Streaming Parity Task"

30Python, Jupyter NotebookOct 19, 20221 years ago

Similar Papers

Cite this paper

@article{rossem2026algorithm,
  title  = {Algorithm Development in Neural Networks: Insights from the Streaming Parity Task},
  author = {Loek van Rossem and Andrew M. Saxe},
  year   = {2026},
  eprint = {2507.09897},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2507.09897},
  journal = {ICML 2025 2025}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2507.09897.svg)](https://codeofpaper.com/paper/2507.09897)

Discussion