Attention guides stable shock movement in fluid simulations
Attention Is All You Need (to Avoid Spurious Oscillations)
Machine LearningArtificial Intelligence
Summary
When simulating waves or shocks in fluids on a fixed grid, it’s tricky to move these shocks accurately without distorting them. The authors created a method where an attention mechanism chooses how to pull information from upstream cells based on the current time step and flow direction. This approach lets the simulation take larger time steps without losing sharp shock details. They tested it on fluid equations in one and two dimensions, showing the attention method adapts well and conserves important quantities during shock transport.
What this means in practice
- •For computational fluid dynamics teams: Use attention-guided fluxes to run simulations with larger time steps while preserving sharp shocks without extra computational stages.
- •For numerical weather prediction developers: Improve numerical methods for transport in weather models by adapting information stencils dynamically to maintain accuracy with fewer steps.
Authors
Jinyoung Jeong, Joseph B. Choi, Xinlun Cheng, H. S. Udaykumar, Sanghun Choi, Stephen S. Baek
Abstract
Can attention move a shock across several cells in one update without breaking it? We develop a conservative, fixed grid finite-volume scheme in which a CFL-conditioned attention flux selects upstream information according to the transport required by the current time step. One-dimensional inviscid Burgers transport is used as the central mechanism test: the same learned flux remains reliable in the conventional small-step regime and, with a time step four times larger, preserves sharp shocks while using one stage per update. A standard fifth-order WENO scheme with third-order strong-stability-preserving Runge-Kutta time integration (WENO-5+SSP-RK3) is included alongside controlled Forward Euler comparisons to separate flux selection from time integration. The learned attention shifts upstream with the local transport reach and becomes more selective near shocks; inference-time interventions and retrained ablations show that transport-scale information and state-dependent selection contribute directly to performance. Directional two-dimensional scalar Burgers transport and the one-dimensional shallow-water system then test whether the conservation-scale-selection principle transfers beyond the original scalar setting. The results support attention as a learnable information stencil for conservative large-step shock transport, while identifying finite candidate reach and problem-dependent robustness as the present limits.