A Number Sense as an Emergent Property of the Manipulating Brain

Neehar Kondapaneni, Pietro Perona · DOI

TL;DR

Researchers at Caltech have demonstrated that a "number sense"—the ability to perceive and estimate quantities—can emerge spontaneously in a neural network trained simply to predict the effects of physical actions like picking up or dropping objects. Remarkably, a model trained only on scenes with up to three objects naturally develops a "mental number line" that allows it to estimate quantities for up to 30 objects, mimicking human-like subitization and estimation patterns.

What Problem Does This Paper Address?

How do we learn to count? While there is a consensus that humans possess an innate "number sense," the mechanism by which we develop an abstract understanding of quantity from raw sensory input remains a mystery.

Existing computational models often rely on explicit supervision (telling the model exactly how many objects are in a scene) or show that quantity-sensitive units appear randomly. This paper explores a more biologically plausible middle ground: cross-modal learning. The authors ask whether the simple act of a child playing with toys—manipulating objects and observing the visual consequences—is enough to bootstrap a sophisticated, abstract representation of number without any explicit "counting" lessons.

Methods

The authors developed a model that simulates the interplay between action and perception. The core architecture is a Siamese Neural Network consisting of two main modules:

  1. Perception Module: A hybrid network (CNN + FCN) that maps a visual scene ($x_t$) into a low-dimensional internal representation or "embedding" ($z_t$).
  2. Classification Module: A network that compares two sequential embeddings ($z_t$ and $z_{t+1}$) to "post-dict" which action occurred between them.

The model is trained on three distinct operations:

  • Put (P): Adding one object to the scene.
  • Take (T): Removing one object.
  • Shake (S): Randomizing the positions of existing objects without changing their number.

Crucially, the supervision comes from the motor system (knowing which action was performed), not from numerical labels. The network learns by minimizing the error between its predicted action and the actual action taken.

Schematic of the Siamese architecture and the action-prediction loop.

Datasets

The study utilizes synthetic image sequences ($244 \times 244$ pixels) featuring randomly positioned squares. To ensure the model wasn't just "counting pixels" or measuring total brightness, they used two distinct datasets:

  • Model A: Identical squares (fixed size and 100% contrast).
  • Model B: Squares with variable size ($10-30$ px) and variable contrast ($9.8\% - 100\%$).

In Model B, mean image intensity is a poor predictor of the number of objects, forcing the network to find a more abstract representation. Training was limited to scenes containing $0-3$ objects, while testing extended up to 30 objects.

Sample training sequences for identical (A) and variable (B) object statistics.

Key Insights and Ideas

  • The Emergent 1D Embedding Line: Even though the embedding space was two-dimensional (or higher in some tests), the representations of images naturally organized themselves along a one-dimensional, monotonic line. This is a striking computational emergence of the "mental number line" hypothesized in psychology.
  • Zero as a Point: The "zero" state (an empty bowl) naturally collapses to a single point in the embedding space because all empty scenes look identical, providing a natural origin for the number line.
  • Subitization vs. Estimation: For small numbers ($0-6$), the embeddings formed distinct "islands" or clusters. This allows for subitization—the ability to recognize exact small quantities at a glance. For larger numbers, the clusters merge into a continuous line, enabling numerosity estimation (approximate counting).
  • Extrapolation, Not Just Interpolation: This is perhaps the most significant finding for AI. While standard supervised learning usually fails on data outside its training range, this model—trained only on $0-3$ objects—successfully extrapolated its number sense to 30 objects.

Key Results

  • Action Classification: The model achieved $<1\%$ error in predicting actions within its training range ($0-3$ objects). Performance degraded gracefully as the number of objects increased beyond the training set.
  • Human-like Estimation: When tasked with comparing two quantities, the model's performance closely matched human psychophysical data. It showed a systematic (and human-like) tendency to slightly underestimate very large quantities.
  • Robustness: The 1D structure emerged regardless of the embedding dimension (tested from 1 to 256) and was reproducible across different random initializations.
The embedding space showing the 1D organization and clusters for small numbers.

Limitations and Future Work

The authors acknowledge several simplifications:

  • Vision-Centric: The model ignores other sensory inputs like the sound of objects hitting a bowl or the tactile sensation of holding them, which likely contribute to a child's development.
  • Pre-existing Object Detection: The model assumes the agent can already detect and locate objects to manipulate them. A more complete model would learn objecthood and number sense simultaneously.
  • Synthetic Data: The use of simple squares is a far cry from the visual complexity of the real world. Future work could involve training on more complex, photorealistic environments.

Ultimately, this research suggests that the "abstract" concept of number isn't necessarily a separate module in the brain, but a powerful byproduct of learning how our actions change the world around us.

Summary updated

Abstract

The ability to understand and manipulate numbers and quantities emerges during childhood, but the mechanism through which humans acquire and develop this ability is still poorly understood. We explore this question through a model, assuming that the learner is able to pick up and place small objects from, and to, locations of its choosing, and will spontaneously engage in such undirected manipulation. We further assume that the learner's visual system will monitor the changing arrangements of objects in the scene and will learn to predict the effects of each action by comparing perception with a supervisory signal from the motor system. We model perception using standard deep networks for feature extraction and classification, and gradient descent learning. Our main finding is that, from learning the task of action prediction, an unexpected image representation emerges exhibiting regularities that foreshadow the perception and representation of numbers and quantity. These include distinct categories for zero and the first few natural numbers, a strict ordering of the numbers, and a one-dimensional signal that correlates with numerical quantity. As a result, our model acquires the ability to estimate numerosity, i.e. the number of objects in the scene, as well as subitization, i.e. the ability to recognize at a glance the exact number of objects in small scenes. Remarkably, subitization and numerosity estimation extrapolate to scenes containing many objects, far beyond the three objects used during training. We conclude that important aspects of a facility with numbers and quantities may be learned with supervision from a simple pre-training task. Our observations suggest that cross-modal learning is a powerful learning mechanism that may be harnessed in artificial intelligence.
BibTeX
@inproceedings{kondapaneni2024number,
  author = {Neehar Kondapaneni and Pietro Perona},
  title = {{A Number Sense as an Emergent Property of the Manipulating Brain}},
  booktitle = {Scientific},
  year = {2024},
  doi = {10.1038/s41598-024-56828-2},
}
Figure