Learning Representations that Support Extrapolation

Taylor W. Webb, Zachary Dulberg, Steven M. Frankland, Alexander A. Petrov, Randall C. O'Reilly, Jonathan D. Cohen

Introduction

Current neural networks are excellent "interpolation machines" but often fail when asked to extrapolate—to reason about data outside the range of their training experience. This paper introduces context normalization (CN), a simple architectural modification that encourages models to learn relational symmetries. By focusing on relative rather than absolute features, models can generalize to novel, out-of-distribution scenarios far more effectively than standard techniques.

The Challenge of Extrapolation

In standard machine learning, we assume training and test data are independent and identically distributed (i.i.d.). While effective for many tasks, this assumption limits models to interpolation—making predictions within the "convex hull" of their training data. Humans, however, excel at extrapolation: if we learn a rule using small, dim objects, we can easily apply it to large, bright ones. Neural networks typically see their performance collapse when faced with values outside their training range because their representations are often tied to absolute magnitudes.

Methods: Context Normalization

The authors propose Context Normalization (CN) to address this. Unlike Batch Normalization, which calculates statistics across a batch of different samples, CN calculates the mean ($\mu$) and standard deviation ($\sigma$) across a task-relevant temporal window (e.g., the sequence of images in an analogy problem).

By normalizing features within the current context, the model "zeros out" absolute magnitudes, forcing it to focus on relations (e.g., "Object B is twice as large as Object A"). This acts as an inductive bias, compelling the "upstream" encoder to organize its internal representational space linearly to support these relative comparisons.

Experimental Setup

The method was evaluated on several tasks, most notably the Visual Analogy Extrapolation Challenge (VAEC). In this benchmark, models solve analogies ($A : B :: C : D$) across two regimes:

  1. Translation Extrapolation: Training on objects in one region of the feature space and testing on increasingly distant regions (divided into Regions 1–6).
  2. Scale Extrapolation: Testing the ability to handle larger differences between objects than seen during training.
The VAEC benchmark defines training and test distributions across different regions and scales of the feature space.

Results and Discussion

Context Normalization significantly outperformed standard methods in extrapolation tasks. On the VAEC benchmark, as the test data moved further from the training distribution (Region 6), CN maintained much higher accuracy than its competitors.

Performance comparison on the VAEC benchmark across increasingly distant test regions.

Key findings include:

  • Superior Extrapolation: In Region 6 of the VAEC, CN achieved 61.6% accuracy, while Batch Normalization dropped to 30.8% and models with no normalization managed only 16.7%.
  • State-of-the-Art on Existing Benchmarks: On the Hill et al. (2019) dataset, applying CN led to a 32% decrease in test error compared to the previous baseline.
  • The "Upstream" Effect: PCA analysis showed that the presence of a downstream CN layer forces the encoder to learn a linear latent space that mirrors the input dimensions (size, brightness, etc.), even for data it has never seen.
  • Alignment is Critical: The normalization window must be aligned with the task boundaries. Misaligned windows or overlapping sliding windows significantly degrade performance.

Conclusion

Context Normalization provides a practical way to bake physical symmetries like translation and scale invariance into neural networks. While currently requiring manual definition of the "context" window, future work could automate this using event segmentation. Moving beyond simple 2D shapes to complex 3D environments and exploring other symmetries like rotation remain important next steps for developing truly robust, human-like AI.

Summary updated

Abstract

Extrapolation -- the ability to make inferences that go beyond the scope of one's experiences -- is a hallmark of human intelligence. By contrast, the generalization exhibited by contemporary neural network algorithms is largely limited to interpolation between data points in their training corpora. In this paper, we consider the challenge of learning representations that support extrapolation. We introduce a novel visual analogy benchmark that allows the graded evaluation of extrapolation as a function of distance from the convex domain defined by the training data. We also introduce a simple technique, temporal context normalization, that encourages representations that emphasize the relations between objects. We find that this technique enables a significant improvement in the ability to extrapolate, considerably outperforming a number of competitive techniques.
BibTeX
@inproceedings{webb2020learning,
  author = {Taylor W. Webb and Zachary Dulberg and Steven M. Frankland and Alexander A. Petrov and Randall C. O'Reilly and Jonathan D. Cohen},
  title = {{Learning Representations that Support Extrapolation}},
  booktitle = {International Conference on Machine Learning},
  year = {2020},
  url = {https://openreview.net/forum?id=oaYgZ66SEt},
}
Figure