Papers

EventFlip:用跨开关有限差分训练含硬切换的物理模拟器

Flipping the Coins: Training Physical Simulators through Hard Switches

Why we picked it

做科学计算或神经混合模拟器的人应该看看这篇。像电网跳闸、爆燃点火这种突变场景,以前梯度下降基本没法训练,EventFlip 用反事实重放算出跳变处的梯度,在三个基准上都把最强基线甩开 1.4 倍以上。

论文提出 EventFlip,一种针对物理模拟器中硬切换的训练方法。这类切换在电网级联、爆轰波、皮质扩散去极化等场景中广泛存在,损失函数会在切换瞬间出现离散跳变,标准自动微分只能捕捉平滑部分,而梯度松弛会引入偏差、无导数方法则丢弃连续动力学路径梯度。

Body

EventFlip 的做法是:从存储状态出发翻转一个接近阈值的开关,重放原始求解器并测量两次运行的损失差,相当于跨开关的有限差分。通过给每个阈值注入小高斯噪声,把每个开关转化为随机二元决策,从而得到结合连续路径梯度与反事实推演跳变项的无偏梯度估计器。EventFlip-Hard 在部署时使用的确定性硬切换模拟器上运行,可证明地瞄准完整的不连续损失。

在相同前向评估预算下,EventFlip 在电网级联、爆轰波、皮质扩散去极化三个任务上对比 12 个基线方法,全部取得最低误差,分别将最强基线的误差降低 1.5 倍、1.4 倍和 1.4 倍。

Original · arXiv cs.LG

Flipping the Coins: Training Physical Simulators through Hard Switches

Hybrid simulators embed learnable components such as neural networks in physical solvers and train them on reference trajectories. Many scientific solvers feature hard switches, such as a tripping power line, an igniting grid cell, or depolarizing brain tissue, where the loss exhibits discrete jumps across switch flips, leaving standard automatic differentiation to capture only its smooth part. Existing training paradigms face a fundamentally challenging trade-off, as gradient-based relaxations smooth the switches and introduce bias across jumps, whereas derivative-free methods treat the solver as a black box and discard path gradients of the continuous dynamics. Here we introduce EventFlip, which flips a near-threshold switch from a stored state, replays the original solver, and measures the loss difference between the two runs, in effect a finite difference across the switch. By perturbing every threshold with small Gaussian noise, we cast each switch as a stochastic binary decision and derive an unbiased gradient estimator that combines the continuous path gradient with a jump term constructed from these counterfactual rollouts. EventFlip-Rand optimizes this noise-averaged objective, whereas EventFlip-Hard operates on the deterministic hard-switch simulator used at deployment and provably targets the complete discontinuous loss. Under an identical forward evaluation budget, we benchmark EventFlip against twelve baselines across a power-grid cascade, a detonation wave, and cortical spreading depolarization, achieving the lowest error on every task and reducing the strongest baseline's error by factors of 1.5, 1.4, and 1.4, respectively.

Industry Coordinates & Source Verification

This report is categorized under AITOP's "Papers" desk. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include EventFlip, physics simulation, gradient estimation.

Source attribution: curated from arXiv cs.LG (@Tianrun Gao, Ruiqi Feng, Haomin Wen, Tailin Wu, Liangqiong Qu, Xiaomeng Huang, Ruiqi Shu).