NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learning To Simulate

Nataniel Ruiz, Samuel Schulter, Manmohan Chandraker

TL;DR

Instead of painstakingly hand-tuning simulators to look "real," why not let the AI decide what it needs to see? This paper introduces a reinforcement learning framework that automatically adjusts simulator parameters to maximize the performance of a model on real-world tasks. Interestingly, it discovers that the most effective training data isn't necessarily the most realistic.

The Reality Gap in Simulation

Training deep neural networks requires massive amounts of labeled data. While simulators (like game engines) can generate infinite data for "free," they come with a catch: the reality gap. Traditionally, researchers try to bridge this gap by manually tuning simulation parameters—such as lighting, weather, or object density—to make the synthetic data look as much like the real world as possible.

However, this manual tuning is labor-intensive and relies on human intuition about what a model "needs" to learn. The authors ask a provocative question: Is mimicking reality actually the best use of a simulator? Perhaps a model learns better from "exaggerated" or specific distributions of data that a human wouldn't naturally think to design.

Methodology: A Bi-Level Optimization Approach

The authors frame the problem as a bi-level optimization problem solved via Reinforcement Learning (RL).

Learning to Simulate Framework

The framework consists of three main interacting components:

  1. The Policy (The Teacher): An RL agent (using the REINFORCE algorithm) acts as a "meta-learner." It outputs a set of simulation parameters $\psi$ (e.g., "make it rainy," "add more trucks," "change the sun angle").
  2. The Simulator: A black-box engine (like CARLA or a Gaussian Mixture Model) takes these parameters and generates a synthetic dataset.
  3. The Main Task Model (The Student): A neural network is trained on this synthetic data.

Once the student is trained, it is evaluated on a small, held-out real-world validation set. The accuracy it achieves serves as the reward for the teacher. If the student performs well, the teacher learns to produce more parameters like those; if the student fails, the teacher explores other settings. Crucially, because simulators are usually non-differentiable (you cannot backpropagate through a game engine), the use of policy gradients allows the system to optimize the simulator's settings without needing to know how the engine works internally.

Datasets and Environments

The researchers evaluated their approach across three distinct environments:

  • Toy GMM: A 2D binary classification task using Gaussian Mixture Models to understand the core mechanics.
  • Modified CARLA / Unreal Engine 4: A high-fidelity traffic simulator. The authors extended CARLA to allow the RL policy to control scene generation, including car types, weather, and road layout.
  • KITTI: A famous real-world computer vision dataset for autonomous driving. This was used as the "real-world" benchmark to see if a model trained on "learned" simulation parameters could actually perform on real streets.

Key Insights

  • Optimizing for Accuracy vs. Realism: The most striking insight is that the optimal simulation parameters for training often do not match the distribution of the real world. The RL agent might learn to generate "harder" cases or more diverse scenarios that force the model to be more robust, rather than just copying the validation set's appearance.
  • Efficiency Knobs: Training a full model inside an RL loop is computationally expensive. The authors found they could "cheat" by only training the task model for a few epochs in each iteration. Even a noisy, partially trained model provides enough of a signal for the RL agent to learn which data is helpful.
  • The "Accumulated" Model: Instead of resetting the task model every time, "fine-tuning" the model on new data generated by the evolving policy led to much higher final rewards and faster convergence.

Experimental Results

  • Outperforming Randomness: In car-counting tasks, the "Learning to Simulate" (LTS) approach significantly outperformed models trained on randomly sampled simulation parameters.
  • Real-World Success (KITTI): When tested on the real-world KITTI dataset for semantic segmentation (identifying cars at the pixel level), the LTS-trained model achieved a Car IoU (Intersection over Union) of 0.579. This outperformed both random simulation parameters (0.480) and a sophisticated random search (0.407).
  • Stability: Despite the stochastic nature of RL, the method proved stable across different random seeds, consistently converging to high-performing simulation settings.

Limitations and Future Directions

While the paper proves that we can "learn to simulate," some hurdles remain:

  • The Sim-to-Real Gap: Even with optimized parameters, there is still a performance gap compared to training on massive amounts of real, human-annotated data (which achieved 0.778 IoU on KITTI). The simulator's inherent graphical limitations still matter.
  • Computational Cost: Running a high-end game engine in an RL loop is heavy. Future work could look into more sample-efficient RL algorithms or surrogate models of the simulator.
  • Label Space: The current work focuses on a limited set of parameters. Expanding this to control every aspect of a complex world—like pedestrian behavior or complex architectural styles—remains a challenge.

In short, this research suggests that the future of "Data Engineering" might not be humans clicking boxes in a simulator, but rather an AI "teacher" figuring out exactly which virtual lessons its "student" needs to pass the final exam in the real world.

Summary updated

BibTeX
@inproceedings{ruiz2019learning,
  author = {Nataniel Ruiz and Samuel Schulter and Manmohan Chandraker},
  title = {{Learning To Simulate}},
  booktitle = {International Conference on Learning Representations},
  year = {2019},
  url = {https://openreview.net/forum?id=c2-ww2qBLmb},
}
Figure