GitHub - lishiqianhugh/NeuralForceField: Learning Generalized Physical Representation from a Few Examples (original) (raw)

Neural Force Field: Few-shot Learning of Generalized Physical Reasoning

ICLR 2026

Project Page Paper Data Checkpoints Demo

πŸ“Š Project structure

NeuralForceField/
β”‚
β”œβ”€β”€ data/
β”‚   └──iphyre/game_seq_data/
β”‚       β”œβ”€β”€ activated_pendulum/
β”‚       β”œβ”€β”€ angle/
β”‚       β”œβ”€β”€ ...
β”‚       └── support_hole/
β”‚   └── nbody/
β”‚       β”œβ”€β”€ train_data.npy
β”‚       β”œβ”€β”€ val_data.npy
β”‚       β”œβ”€β”€ within_data.npy
β”‚       └── cross_data.npy
β”‚
β”œβ”€β”€ checkpoints/
β”‚   └── nbody/
β”‚       β”œβ”€β”€ nff/
β”‚       β”œβ”€β”€ in/
β”‚       β”œβ”€β”€ slotformer/
β”‚       └── segno/
β”‚           β”œβ”€β”€ model_best.pth
β”‚           └── train_args.json
β”‚   └── iphyre/
β”‚
β”œβ”€β”€ iphyre/             
β”‚   β”œβ”€β”€ configs/         # Configuration files
β”‚   β”œβ”€β”€ models/          # Model dir containing NFF, IN, SlotFormer
β”‚   β”œβ”€β”€ utils/           # Useful tools such as dataloader
β”‚   β”œβ”€β”€ planning.py      # Planning script
β”‚   β”œβ”€β”€ README.md        # An instruction for use
β”‚   β”œβ”€β”€ test.py          # Evaluation functions
β”‚   └── train.py         # Training functions
β”‚
β”œβ”€β”€ iphyre/             
β”‚   β”œβ”€β”€ configs/         # Configuration files
β”‚   β”œβ”€β”€ models/          # Model dir containing NFF, IN, SlotFormer
β”‚   β”œβ”€β”€ utils/           # Useful tools such as dataloader
β”‚   β”œβ”€β”€ generate_data.py # Data generation functions
β”‚   β”œβ”€β”€ planning.py      # Planning script
β”‚   β”œβ”€β”€ README.md        # An instruction for use
β”‚   β”œβ”€β”€ test.py          # Evaluation functions
β”‚   └── train.py         # Training functions

πŸ”§ Getting started

Make sure you have installed torch, torchdiffeq, iphyre, and rebound.

Go to the specific task directory to train and test the models. The instructions of running commands are provided for each task (README_iphyre and README_nbody). Download data here and checkpoin ts here.

or

πŸ“š Citation

If you find our work helpful, please consider citing:

@inproceedings{ li2026nff, title = {Neural Force Field: Few-shot Learning of Generalized Physical Reasoning}, author = {Li, Shiqian and Shen, Ruihong and Tao, Yaoyu and Zhang, Chi and Zhu, Yixin}, year = {2026}, booktitle = {ICLR}, url = {https://neuralforcefield.github.io/} }