Kernel-Aligned Distillation for Resolution-Adjustable Particle Fluid Surrogates

Learned fluid simulators that move particles, rather than grid cells, are now accurate enough to replace expensive physics solvers for many flows. Their cost, however, grows with the number of particles and the neighbor connections between them. There is currently only one way to make them faster: skip time steps. We propose making them faster by using fewer particles, with a knob that sets how many. A coarse "student" network runs on a thinned-out particle set at any chosen ratio. It is trained to match a fine-resolution "teacher" network. The teacher's internal features are carried onto the coarse particles with the same smoothing kernels that particle hydrodynamics already uses to move quantities between irregular point sets. The result is a single surrogate whose accuracy-versus-latency curve can be read off and set at deployment time.

The underlying method is smoothed particle hydrodynamics (SPH), a simulation method that represents a fluid as moving particles and rebuilds smooth fields from them by kernel-weighted averaging over neighbors within a radius $h$. The key point is that, for particles, the resolution-latency tradeoff has no counterpart to bilinear resampling of a feature map. Cross-resolution distillation in vision works because feature grids line up across octaves. In particle space, alignment has to come from the physics' own interpolation operator. We will test whether that operator makes distillation work at arbitrary, non-dyadic coarsening ratios.

Core Claim

A graph neural network (GNN) surrogate running on $N/r$ particles can be trained to recover most of the accuracy of the same architecture running on $N$ particles, at a fraction of the wall-clock cost. This holds when the training signal comes from a fine-resolution teacher whose node features are restricted onto the coarse particles by a normalized SPH kernel. Here $r$ is a continuous coarsening ratio, for example between 1.5 and 4 in 2D. The student is conditioned on $r$, so one model covers a whole latency range.

The new element is the combination of three things: spatial rather than temporal coarsening, a teacher-student transfer between two unstructured point sets, and a continuous ratio. No work in our file does all three.

Relation to Prior Work

Four papers motivate the gap without closing it.

LagrangeBench provides seven SPH datasets and trains GNS, SEGNN and related GNNs under 100× temporal subsampling. It keeps particle count fixed, and it shows that position error alone misses physical failure, which is why it adds kinetic-energy error and a Sinkhorn distance between particle distributions.

JAX-SPH couples a coarse solver with a learned corrector, called Solver-in-the-Loop. The corrector coarsens time by 20× on 2D reverse Poiseuille flow and beats both the solver alone and GNS alone on a 20-step error. The coarsening is again temporal only.

diffSPH handles variable smoothing lengths and trains GNN correctors with unrolling. It does not transfer knowledge between resolutions.

Resolution-adjusted boundary particles for adaptive SPH shows the size of the prize: 81% fewer particles and a 4.3× per-frame speedup. It also shows the danger: naive coarse boundaries leak and produce spurious forces. It solves this with hand-designed splitting and buffer zones inside a classical solver, not with learning.

Two further papers supply parts of the method.

Multi-Scale Aligned Distillation for Low-Resolution Detection supplies the teacher-student template. Its key trick is that a 2× downsampled student's pyramid level lines up spatially with the teacher's next level. This lifts a 400px FCOS student from 38.2 to 41.6 AP against an 800px teacher at 42.8 AP on COCO. The trick is tied to dyadic strides on grids, and we replace it with kernel restriction on point sets.

Sparse Inpainting with Smoothed Particle Hydrodynamics supplies a constraint: plain SPH sums cannot even reproduce a constant field on irregular samples. Shepard normalization and a first-order correction are needed. We therefore build the restriction operator with these corrections rather than raw kernels.

Research Program

We first build multi-resolution data. Using JAX-SPH, we re-simulate the LagrangeBench scenarios: 2D and 3D Taylor-Green vortex, reverse Poiseuille flow, lid-driven cavity, and 2D dam break. The coarse particle set is defined as a Lagrangian subset of the fine one. We select it by farthest-point sampling at ratio $r$ and give each coarse particle the kernel-aggregated mass of its fine neighbors. Coarse trajectories then exist exactly inside the fine simulation, so no second solver run is needed for targets. Coarse-resolution SPH runs are also produced at matched particle counts as a physics reference.

The teacher is a GNS trained on fine data as in LagrangeBench. The student uses the same architecture on the coarse graph, with $r$ fed as an input feature and the neighbor radius scaled with coarse spacing. Let $H_j$ be the teacher's latent feature at fine particle $j$ with position $\mathbf{x}_j$, and let $\mathbf{x}_i$ be a coarse particle. The distillation target is the Shepard-normalized kernel restriction

$$\tilde H_i = \frac{\sum_j W(\mathbf{x}_i - \mathbf{x}_j, h_r)\, H_j}{\sum_j W(\mathbf{x}_i - \mathbf{x}_j, h_r)},$$

where $W$ is the SPH kernel and $h_r$ is a smoothing length proportional to coarse particle spacing. We also include a first-order-corrected variant following the inpainting paper. The student loss combines two terms: its own acceleration error on coarse targets, and $\lVert P(S_i) - \tilde H_i \rVert^2$ at each message-passing layer, where $S_i$ is the student feature and $P$ is a learned linear projection. The same operator restricts teacher-predicted accelerations, giving an output-level distillation term.

Boundaries receive specific treatment because both LagrangeBench and the adaptive-boundary paper flag them as the failure point. We compare two options. In the first, wall particles are coarsened with the fluid. In the second, walls stay at fine resolution, which is cheap because they are static. The second option tests whether the leakage reported for classical solvers reappears in learned surrogates.

Latency is measured as end-to-end GPU wall-clock per rollout step, including neighbor-list construction. Both SPH papers identify neighbor search as a dominant constant-factor cost, so a FLOP count alone would flatter coarse models.

Baselines

Naive reference. The simplest reference is the fine teacher itself. It fixes the accuracy ceiling and the latency cost we are trying to cut. Alongside it we run a classical SPH solver at the coarse particle count, which is the "just simulate coarsely" answer. For the teacher, LagrangeBench reports GNS and SEGNN results per dataset, but the file does not contain them: no reported result found on Lacuna for GNS position, kinetic-energy, or Sinkhorn error on the LagrangeBench datasets. We therefore reproduce the teacher with the released LagrangeBench code and its tuning protocol.

Direct coarse training. The strongest competitor is a GNS trained directly on the coarse Lagrangian-subset data with no teacher. It sees the same particles, the same compute and the same targets, and differs only in the missing distillation signal. It gets the same hyperparameter search budget as our student, and a separately tuned model per ratio, which is an advantage over our single conditioned model. Beating it means lower kinetic-energy error and Sinkhorn distance at equal measured latency, on a majority of the seven datasets, averaged over three seeds with non-overlapping intervals.

Spatial Solver-in-the-Loop. The third baseline extends JAX-SPH's Solver-in-the-Loop from time to space: a coarse SPH solver plus a GNN corrector at the same particle count. The only reported number here is qualitative: lower MSE20 than GNS alone on 2D reverse Poiseuille flow, with no value in the file.

Ablations. Four ablations isolate the key ingredient. Replacing the kernel restriction with nearest-fine-neighbor feature copying tests whether the kernel matters. Dropping Shepard normalization tests whether consistency matters. Distilling outputs only tests whether feature distillation matters. Training separate per-ratio students tests whether ratio conditioning costs accuracy.

Why not just…?

Why not just train the GNN directly on coarse particles? This is the real threat. If coarse data already contains everything a coarse model can use, the teacher adds nothing. The evidence that it may help is indirect. In vision, aligned distillation closes about three quarters of the resolution gap (38.2 to 41.6 AP, against a 42.8 AP teacher) beyond what the low-resolution model learns alone. In our setting, the teacher's features encode sub-coarse-scale structure, such as vortex cores and near-wall shear, that coarse targets only reflect indirectly. The direct-coarse baseline at matched tuning settles this. If it ties our method, we report the multi-resolution benchmark and Pareto curves as the contribution and drop the distillation claim.

Why not just make the fine model cheaper by using fewer layers, narrower MLPs, or larger time steps? Model shrinking and temporal coarsening reduce cost per edge or per step. They leave the edge count, and hence neighbor-search cost, untouched. We plot shrunken fine models and 2× or 4× temporally coarser fine models on the same measured-latency axis. If they dominate our curve, spatial coarsening is not worth doing for these problem sizes. We expect this to be most likely in small 2D cases and least likely in 3D.

Why not just run a coarse SPH solver, optionally with a learned corrector? The adaptive-boundary paper documents leakage and spurious wall forces from coarse resolution in classical solvers. It fixes them with hand-built machinery, and JAX-SPH shows that solver-only coarsening drifts. The spatial Solver-in-the-Loop baseline is included precisely because a physics prior might beat a pure network at the same particle count, especially on dam break. If it wins there, that suggests hybrid students, and we will say so.

Proposed Experiments and Decisive Checks

The main experiment sweeps $r$ across the seven datasets and plots kinetic-energy error, Sinkhorn distance and 20-step position error against measured latency for all baselines. Fine-scale observables are also scored: the density field and the velocity field reconstructed from coarse particles onto fixed probe points by kernel interpolation, compared against the fine simulation. This checks that coarse particles still yield usable fields and not just plausible trajectories.

The first decisive check is the matched-latency comparison against direct coarse training described in the Baselines section. The second is the boundary check on lid-driven cavity and dam break. These are the cases where LagrangeBench found equivariant models unstable, and where coarse resolution is most likely to cause leakage. Here we count wall penetrations per rollout and compare coarsened walls with fine walls. The third is generalization in the ratio: we train on $r \in \{1.5, 2, 3\}$ and test at 2.5 and 4. If the conditioned student degrades smoothly, the continuous-ratio claim holds. If it collapses off the training ratios, the kernel view offers no advantage over discrete, per-ratio models.