When a ball bounces or a tossed cube strikes a table, the collision lasts about a millisecond. A camera at 150–180 frames per second sees the object before and after, and almost never during. Every quantity a physicist would use to write down an impact law is therefore hidden between two frames: the exact moment of contact, which corner touched, and the velocities just before and just after. Symbolic regression is the search for a short, closed-form equation that explains data. It needs exactly those hidden quantities as inputs and outputs, so the usual "estimate velocities by finite differences, then fit an equation" pipeline regresses on numbers that blur free flight and collision together. Meanwhile, the simulators used in robotics are measurably wrong at impacts. On the GAUGE benchmark, the best engine's bouncing-ball variance is 15.63 times worse than real-world variance (GAUGE). That points to a model whose form is wrong, not just one with badly tuned constants.
We propose to discover symbolic impact laws by placing a small, sparsely gated symbolic "impulse map" inside an event-driven differentiable simulator. The impulse map is an equation that takes the pre-collision state and returns the velocity change at contact. The simulator finds the contact instant between frames by root-finding and applies the map there. Gradients reach the equation's structure and constants through the sensitivity of the event time, rather than through stiff penalty springs. In two sentences: the simulator reconstructs what happened between camera frames, and the gradient of trajectory error with respect to a candidate equation tells us which terms the impact law needs. Our central and falsifiable claim is that this beats offline symbolic regression specifically when impacts are aliased by the frame rate. It should not beat offline regression when the needed quantities are directly measurable.
What exists and what is missing
Three lines of work each cover two of the three ingredients. Differentiable contact simulators calibrate constants inside a fixed, hand-written law. DiffMJX (Differentiable Simulation of Hard Contacts with Soft Gradients for Learning and Control) uses adaptive time-stepping and a straight-through "contacts from distance" trick to recover the cube's dimensions from the ContactNets toss data with about 5% error. It never questions the functional form of restitution or friction. ContactNets (ContactNets) learns contact geometry from the same cubes with a mechanics-based loss. Its 32 tosses beat a black-box model trained on 256, and it keeps penetration under 2%, but its representations are opaque neural networks. Symbolic regression has reached contact physics only offline. One study fits PySR, ParFam and uDSR to static KUKA joint-friction tables, reaching 0.033 Nm error versus 0.737 Nm for the symmetric textbook model (Interpretable Robotic Friction Learning via Symbolic Regression). It bans division to avoid singularities and never runs a simulator. Grammar-based constitutive discovery (The Language of Hyperelastic Materials) does put a solver in the loop, but it searches with a derivative-free evolution strategy and handles only smooth deformation.
The method we reuse comes from differentiable symbolic search. ESPL (Efficient Symbolic Policy Learning with Differentiable Symbolic Expression) relaxes operator choice with Gumbel-Sigmoid gates, which are random on/off switches whose probabilities are trained by gradient. It needs 1,000–4,000× fewer interactions than the non-differentiable DSP. ParFam (ParFam) shows that continuous global optimization of parametric families recovers exact laws on SRBench. Both assume clean gradients.
The constraint comes from the analysis of gradients through contact. First-order gradients through contact can be biased, zero across gaps, or explosive over long horizons (Do Differentiable Simulators Give Better Policy Gradients?). Fixed-step penalty contact produces oscillating gradients (Differentiable Simulation of Hard Contacts with Soft Gradients for Learning and Control). Feeding such gradients into structure gates is the obvious failure mode, and our design is built around avoiding it. Finally, Learning piecewise-smooth dynamical systems locates switching surfaces from velocity jumps but restricts them to flat planes and keeps black-box dynamics inside each regime. We instead take the switching surface as known (the object's geometry meeting the floor) and make the jump itself symbolic.
Core Claim
An impact law can be written as a map from the pre-contact state to an impulse, $\Delta v = g_\theta(v_n, v_t, \omega, r)$. Here $v_n$ and $v_t$ are the normal and tangential contact velocities, $\omega$ is the angular velocity, $r$ is the contact-point offset, and $\theta$ collects gate logits and constants. The map is applied at the event time $t^*$ where the contact signed-distance function hits zero. Because $t^*$ is defined implicitly by that condition, its sensitivity to $\theta$ follows from the implicit function theorem. The trajectory gradient is therefore exact for a fixed contact sequence, and there are no penalty stiffnesses to make it oscillate.
We make three choices together that we do not find in the file. First, the impact law is a sparse symbolic expression rather than a scalar coefficient or a neural network. Second, it is fit through an event-driven integrator rather than to finite-difference estimates. Third, its structure gates receive gradients aggregated over hundreds of independent impact events, using short windows of a few frames around each event. Short windows keep each gradient from exploding. Averaging over events lowers variance, much as a minibatch does.
Research Program
The symbolic layer is a library of candidate terms, combined through gated sums and products in the style of ESPL with product units for continuous exponents. Candidate terms include powers of $|v_n|$ with learned exponents, ratios such as $v_t/|v_n|$ that control the sliding-versus-sticking regime, couplings between spin and tangential velocity, and constant offsets. Physical admissibility is enforced by construction. The normal restitution is passed through a bounded output so that kinetic energy cannot increase. The tangential impulse is projected onto the Coulomb friction cone, so the sticking/sliding switch is a known hard nonlinearity rather than something the regression must invent. Denominators are restricted to positive-definite forms such as $|v_n|+\epsilon$. This addresses the singularity worry that led prior friction work to ban division outright.
Training alternates two phases. During coefficient fitting, gates are held fixed and constants are refined by gradient. During structure updates, gates move only when the event-averaged gradient is consistent in sign across events. After training, we prune to a discrete expression and refit its constants.
We also need a fallback for mode mismatch: cases where the simulated and real cube hit with different corners, so the true gradient across the gap is zero. For these events we borrow the contacts-from-distance surrogate from DiffMJX. We log how often it fires, because the cited paper reports that it produces artifacts in multi-contact geometry.
Baselines
The naive reference point is the default model a practitioner would use: constant restitution plus Coulomb friction, with constants calibrated by DiffMJX-style gradient descent on the same tosses. The strongest existing method on the real cube data is DiffMJX calibration of a fixed contact model. It reports roughly 5% error in recovered cube properties (Differentiable Simulation of Hard Contacts with Soft Gradients for Learning and Control). For prediction quality we also compare against ContactNets, the strongest learned model, using its reported 32-toss data efficiency and under-2% penetration (ContactNets). The file gives no per-horizon position-error number for ContactNets, so we will rerun it on our splits.
Two baselines address the obvious substitutes. The first is two-stage offline regression: estimate pre- and post-impact velocities by finite differences around detected impacts, then run PySR and ParFam on those pairs. The second is neural-then-distill: a neural impulse map is trained inside the same event-driven simulator and then distilled to symbols with the same regressors.
All methods see identical train, validation and test toss splits and the same contact geometry. Each gets the same GPU-hour budget, and hyperparameters are tuned on validation with an equal number of trials. Beating the field means two things. On held-out real tosses, our model must have lower multi-step pose error than calibrated DiffMJX and match ContactNets within noise, while producing an equation of fewer than about ten terms. On synthetic data with known laws, it must have a higher exact-recovery rate than the two-stage baseline.
Three ablations isolate the key ingredients. One replaces the event-driven integrator with fixed-step penalty contact. One trains on full trajectories instead of short event windows. One removes the event-averaged consistency rule for gate updates.
Why not just…?
Why not just finite-difference the impacts and run offline symbolic regression? This is the real threat. On the KUKA friction data, the inputs (joint velocity and load) and output (torque) are directly measured, and offline regression already works (Interpretable Robotic Friction Learning via Symbolic Regression). We expect no advantage there and will run it as a negative control. Our claim applies only when the frame interval is long relative to the collision and to sub-frame motion. In that regime, finite differences mix gravity and rotation into the "impulse" and misattribute which corner hit. The frame-rate sweep below settles the question directly. If two-stage recovery matches ours at 148 Hz on real cubes, the proposal's case for real data fails and narrows to lower frame rates.
Why not fit a neural impulse map in the simulator and distill it to a formula afterwards? This might work. However, the network is free to fit sensor artifacts, and distillation then compresses whatever the network learned rather than the physics. That is the same failure pattern ContactNets documents for black-box contact models, whose long-term penetration reaches 20% of cube width. The neural-then-distill baseline uses the identical simulator and budget, so any gap between the two isolates the effect of searching symbolically during the fit.
Why not keep the simulator in the loop but search with genetic programming or CMA-ES instead of gradients? For a ten-term library this is feasible, and it is what the hyperelastic grammar work does. Derivative-free search was far less efficient in ESPL's comparison and in the contact-planning results of Bundled Gradients through Contact via Randomized Smoothing. We still run PySR with simulator-rollout fitness under the same compute budget. If it reaches the same expressions, the contribution reduces to the event-window formulation, and we will report it that way.
Proposed Experiments
Synthetic ground truth comes first. We simulate cube and ball tosses whose true impact laws include velocity-dependent restitution and spin–friction coupling, render the pose at frame rates from 1 kHz down to 60 Hz, and add tracking noise matched to the AprilTag setup. The metrics are exact symbolic recovery after simplification, coefficient error, and held-out trajectory error at drop heights outside the training range. The decisive check is the curve of recovery rate against frame rate. We predict that two-stage regression degrades steeply once frames are sparser than the post-impact rotation time, while the in-simulator method stays flat.
Next we use real ContactNets tosses: 570 tosses at 148 Hz, trained on 32 and 256 tosses. Metrics are position and rotation error over 50- and 200-frame rollouts and penetration depth, compared against calibrated DiffMJX, ContactNets, and both substitute pipelines.
Finally, on GAUGE rigid-body tasks (180 Hz motion capture with characterized parameters), we ask whether a discovered bouncing-ball law shrinks the variance ratio relative to the 15.63× reported for the best engine. We count it as a meaningful result if the discovered law, inserted into a standard engine, brings bounce-height variance within a factor of two of the real baseline. A null result here would still be informative, because it would indicate that GAUGE's impulse gap comes from unmodeled sources such as ball deformation or surface variation rather than from the functional form of restitution.
Across all settings we log gate-flip frequency and how often the contacts-from-distance surrogate fires. These logs give a direct test of whether gradients through discontinuous contact destabilize symbolic structure search, which the file identifies as untested.
References
- GAUGE: A Measurement-Grounded Benchmark for Physical Fidelity in Simulation Engines and Video World Models
- Differentiable Simulation of Hard Contacts with Soft Gradients for Learning and Control
- ContactNets: Learning Discontinuous Contact Dynamics with Smooth, Implicit Representations
- Interpretable Robotic Friction Learning via Symbolic Regression
- The language of hyperelastic materials
- Efficient Symbolic Policy Learning with Differentiable Symbolic Expression
- ParFam -- (Neural Guided) Symbolic Regression via Continuous Global Optimization
- Do Differentiable Simulators Give Better Policy Gradients?
- Learning piecewise-smooth dynamical systems
- Bundled Gradients Through Contact Via Randomized Smoothing