Neural Encoders for Soft-Robot Simulation
Particle MLP, grid MLP and grid CNN encoders compressing a soft-robot simulation, compared on reconstruction and probe metrics.
My contribution
I generated the dataset from a 2D material point method walker whose actuation I first optimized, trained and swept three autoencoder families (particle MLP, grid MLP, grid CNN), and analyzed the results with reconstruction error and a ridge probe.
- Affiliation
- Computational Design of Cyber-Physical Systems
- Dates
- Spring 2026
- Role
- Individual assignment on course starter notebooks
- Topics
- Optimization and Simulation, Hardware–Algorithm Co-design
- Tools
- JAX, Python
Contents
01
The problem
Physics simulations are too slow to call millions of times inside a design search. I tested whether a neural network can compress a soft-robot simulation into 16 numbers that still carry its physics, the first step toward fast surrogate models, and whether the way the data is represented changes the answer.
02
My contribution
I generated the dataset from a 2D material point method walker whose actuation I first optimized, trained and swept three autoencoder families (particle MLP, grid MLP, grid CNN), and analyzed the results with reconstruction error and a ridge probe. I also answered the network-design problem on which activations, normalizations and optimizers fit a controller trained through a differentiable simulator. The course provided the simulator, training loop scaffold and plotting.
03
Constraints
The latent was fixed at 16 dimensions. I capped each model at roughly 1.2 M or 2.0 M parameters and swept two learning rates, which kept training to tens of seconds per model on Colab but limited how far the search could go. All data was synthetic, from one walker design.
04
Design decisions
I compared representations, not just model sizes: particles match how MPM stores the material, while grids match image-style networks. Beyond reconstruction error I added a linear ridge probe, W = (ZᵀZ + λI)⁻¹ZᵀY with λ chosen on validation data, because a latent can rebuild the input without organizing the physics in a usable way.
05
What was difficult
The grid CNN was close to the particle model in accuracy but took about 3× longer to train, so the most "image-like" choice was not the most efficient. The reconstructions also showed different failure modes: the particle model errs in the moving legs, while the grid model blurs the body and errs along its partly filled boundary.
06
Evidence
The particle MLP had the best reconstruction MSE (1.26 × 10⁻³) and probe MSE (1.38 × 10⁻⁴) with the fewest parameters (1.26 M), against 1.49 × 10⁻³ and 2.48 × 10⁻⁴ for the grid CNN (1.90 M, 89.6 s) and 1.89 × 10⁻³ and 2.54 × 10⁻⁴ for the grid MLP (2.02 M).
07
Current status
Simulation and machine learning study: a completed course assignment.
08
What I would change next
I would test whether the latent is useful downstream, for example by optimizing the walker inside the learned space, and add data from several walker designs so the encoder generalizes beyond one robot.
Related work