The Power of Next-Frame Prediction for Learning Physical Laws

Thomas Winterbottom, G. Thomas Hudson, Daniel Kluvanec, Dean L. Slack, Jamie Sterling, Junjie Shentu, Chenghao Xiao, Zheming Zhou, Noura Al MoubayedarXiv 2024 · DOI

Introduction

Just as Large Language Models (LLMs) learn the "logic" of language by predicting the next word, recent research demonstrates that vision models can learn the "logic" of the physical world—such as gravity and mass—simply by predicting the next frame in a video. By utilizing "linear probes" on frozen, pretrained models, this study shows that generative pretraining induces a latent understanding of physical constants without any explicit physics-based training.

The Core Challenge

Current computer vision often relies on supervised learning with extensive labeling or specialized physics-informed neural networks. This paper investigates whether a general-purpose generative model can develop an internal "world model" of physics—understanding the mechanics of falling objects or collisions—purely through self-supervised observation. If successful, this suggests that physical laws can be "absorbed" as a requirement for accurate visual prediction rather than being explicitly taught.

Methodology

The researchers employed a two-step experimental pipeline to test their hypothesis:

  1. Generative Pretraining: Two distinct architectures—a fully convolutional CNN (U-Net style) and a Patch Transformer—were trained to predict the $(m+1)^{th}$ frame of a video given the previous $m$ frames. Training utilized loss functions like Smooth-L1 (pixel-wise accuracy) and SSIM (structural similarity).
  2. Linear Probing: To evaluate the models' internal knowledge, the weights of the pretrained models were frozen. A simple linear regression layer was then attached to the internal latent representations and tasked with predicting specific physical constants, such as gravity or mass.
The two-step experimental pipeline: generative pretraining followed by linear probing to extract physical constants.

If a simple linear layer can accurately predict gravity from these frozen features, it demonstrates that the generative model encoded that physical information during its initial training phase.

Diagnostic Datasets

The study introduced six diagnostic simulation video datasets derived from fundamental physical laws. These environments allow for precise variation of physical constants:

  • 2D & 3D Bouncing Balls: Varying gravity strength and direction.
  • Pendulum: A point mass on a rod with varying gravity and length.
  • Roller Coaster with Flight: A ball on a curved track that can become airborne.
  • Colliding Blocks: Two blocks on a frictionless surface with varying mass ratios.
  • Mars Moon: A simplified orbital simulation for predicting planetary mass.
Visual examples of the six diagnostic physical simulation datasets used for training and evaluation.

Every video is backed by a ground-truth physical constant that the model must implicitly understand to predict future frames accurately.

Key Insights and Results

The most striking finding is that physical constants are "induced" as latent variables. The model does not merely learn to move pixels; it learns the underlying constraints dictating motion.

  • Architecture Performance: The Patch Transformer consistently outperformed the CNN, suggesting that global attention mechanisms are better suited for capturing the long-range spatial and temporal relationships inherent in physics.
  • Probing Success: Models trained on next-frame prediction predicted physical constants significantly better than random models or those trained on static images. The generative phase improved prediction loss by a factor of 1.28 to 6.24 compared to baselines.
  • Emergent Understanding: In the "Colliding Blocks" task, the model predicted the mass ratio of blocks simply by observing their velocities before and after impact.
  • Long-Term Stability: When forced to predict 20 frames into the future, the Patch Transformer maintained physically plausible trajectories, whereas the CNN often produced unrealistic accelerations or visual artifacts.

Limitations and Future Outlook

While promising, the current simulations use simple shapes on black backgrounds. Real-world video contains noise and complex lighting that might obscure pure physical signals. Additionally, the study is small-scale compared to modern LLMs. Future work could explore more complex predictive strategies, such as bidirectional or masked-frame prediction, to induce even deeper physical understanding.

Summary updated

Abstract

Next-frame prediction is a useful and powerful method for modelling and understanding the dynamics of video data. Inspired by the empirical success of causal language modelling and next-token prediction in language modelling, we explore the extent to which next-frame prediction serves as a strong foundational learning strategy (analogous to language modelling) for inducing an understanding of the visual world. In order to quantify the specific visual understanding induced by next-frame prediction, we introduce six diagnostic simulation video datasets derived from fundamental physical laws created by varying physical constants such as gravity and mass. We demonstrate that our models trained only on next-frame prediction are capable of predicting the value of these physical constants (e.g. gravity) without having been trained directly to learn these constants via a regression task. We find that the generative training phase alone induces a model state that can predict physical constants significantly better than that of a random model, improving the loss by a factor of between 1.28 to 6.24. We conclude that next-frame prediction shows great promise as a general learning strategy to induce understanding of the many `laws' that govern the visual domain without the need for explicit labelling.
BibTeX
@misc{winterbottom2024power,
  author = {Thomas Winterbottom and G. Thomas Hudson and Daniel Kluvanec and Dean L. Slack and Jamie Sterling and Junjie Shentu and Chenghao Xiao and Zheming Zhou and Noura Al Moubayed},
  title = {{The Power of Next-Frame Prediction for Learning Physical Laws}},
  year = {2024},
  eprint = {2405.17450},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2405.17450},
}
Figure