# Rankine–Hugoniot Front Tokens

- ID: 2925
- Canonical URL: https://synthcore.org/idea/2925/rankine-hugoniot-front-tokens
- API JSON: https://synthcore.org/api/idea/2925.json
- API Markdown: https://synthcore.org/api/idea/2925.md
- Verification status: failed_benchmark
- Source: [arXiv:2607.23143](https://arxiv.org/abs/2607.23143)
- Category: architecture
- Solves: accuracy, stability, sample-efficiency
- ML areas: transformer, attention, world-model, training
- Math tags: pde, dynamical-systems, numerical-analysis
- Ratings: usefulness 7/10; difficulty 6/10; novelty 6/10

## Idea description

Augment a 1D neural operator or transformer with explicit tokens for detected discontinuities. Advance each front analytically using the local Rankine–Hugoniot speed and train the network only to reconstruct smooth regions and the residual caused by source terms and grid resolution.

## Mathematical statement

The paper formulates a one-dimensional balance law as $\partial_t u+\partial_r F(u,r)=S(u,r)$, where $u(t,r)$ is the state, $F(u,r)$ is a possibly geometry-dependent flux, $S(u,r)$ is a source term, $t$ is time, and $r$ is space. For a discontinuity at position $x_j(t)$ with left and right traces $u_j^-$ and $u_j^+$, the adapted local Rankine–Hugoniot law is $\dot{x}_j=s_j=[F(u_j^+,x_j)-F(u_j^-,x_j)]/(u_j^+-u_j^-)$ when the source is bounded and does not contain a delta mass at the front. The source changes the states on either side but not the instantaneous jump speed; it can therefore be handled by the learned or numerical smooth branch. The proposed module exploits the exact kinematic constraint $x_j^{n+1}=x_j^n+\Delta t\,s_j^n$ while predicting only a residual field. For multiple fronts, the token set is $\{(x_j,u_j^-,u_j^+)\}_{j=1}^K$, and attention supplies each front with local context used to estimate its traces and resolve interactions.

## Key formulas

- $$\frac{\partial u}{\partial t}+\frac{\partial}{\partial r}(F(u,r))=S(u,r).$$
- $$s_j=\dot{x}_j=\frac{F(u_j^+,x_j)-F(u_j^-,x_j)}{u_j^+-u_j^-},\qquad x_j^{n+1}=x_j^n+\Delta t\,s_j^n.$$
- $$\widehat{u}^{\,n+1}(r)=u_{\mathrm{front}}\!\left(r;\{x_j^{n+1},u_j^{-,n+1},u_j^{+,n+1}\}_{j=1}^K\right)+R_\theta\!\left(u^n,r,\{x_j^n,u_j^-,u_j^+\}_{j=1}^K\right).$$
- $$\mathcal{L}=\|\widehat{u}^{\,n+1}-u_{\mathrm{target}}^{n+1}\|_1+\lambda_{\mathrm{RH}}\sum_{j=1}^K\left|\frac{x_j^{n+1}-x_j^n}{\Delta t}-\frac{F(u_j^+,x_j^n)-F(u_j^-,x_j^n)}{u_j^+-u_j^-}\right|.$$

## Implementation notes

(1) Integration point: insert the module between the encoder and decoder of a 1D Fourier neural operator or token transformer for time stepping. Given a grid state $u^n\in\mathbb{R}^N$, detect candidate fronts using $|u_{i+1}^n-u_i^n|$ above a threshold, cluster adjacent flagged cells, and create one token per cluster containing position $x_j^n$, estimated traces $u_j^-$ and $u_j^+$, and local pooled features. Use cross-attention from grid points to front tokens. (2) Pseudocode: compute front tokens; for each token evaluate $s_j=(F(u_j^+,x_j)-F(u_j^-,x_j))/(u_j^+-u_j^-)$; set $x_j\leftarrow x_j+\Delta t s_j$; use a small MLP to update $u_j^-$ and $u_j^+$ from attended context; render a piecewise front field; predict a smooth residual $R_\theta$ with the FNO; return front field plus residual. Merge or delete tokens when fronts collide or their jump falls below a threshold. (3) Computed from the mathematics: the balance-law interface and the front speed. Estimated empirically: front locations, traces, detection threshold, and the residual network. If $F$ is known, evaluate it exactly; otherwise use a differentiable supplied flux model. (4) First experiment: train on scalar Burgers data $F(u)=u^2/2$, optionally with a spatial source $S(r,u)$, using 64–256 grid points and randomly varying shock/rarefaction initial conditions. Compare against an equal-parameter FNO, a transformer without front tokens, and a standard residual physics-informed model. Equalize training steps, batch size, and rollout FLOPs. Measure $L^1/L^2$ field error, shock-position error, and error after 10–50 autoregressive steps. (5) Pre-register mechanism tests: at fixed grid resolution, the proposed model must reduce median shock-position error by at least 30% relative to the FNO while having no more than 10% worse smooth-region error; its one-step front-speed error must scale approximately linearly with $\Delta t$ over three step sizes, with log-log slope in $[0.8,1.2]$; and removing only the analytical update, replacing $x_j^{n+1}$ by a learned position head, must increase long-rollout front error by at least 25%. Falsification occurs if the analytical update gives no improvement over learned positions, violates the measured Rankine–Hugoniot speed by more than 10% on clean shocks, or improves field loss only through substantially higher compute.

## Verification

- Status: failed_benchmark
- Mechanism evidence: yes
- Mechanism confirmed: no
- Practical verdict: harms
- Verdict: Built a self-contained Burgers front-token MVP with jump detection, local Rankine–Hugoniot speed evaluation, analytical front propagation, piecewise rendering, and a Godunov finite-volume baseline. The RH identity was reproduced to machine precision, and analytical tokens had essentially zero front and field error on the clean shock while the baseline errors decreased with resolution. This is a clear toy signal, but it is not evidence yet for learned residuals, attention, source terms, front interactions, or a fair equal-compute neural comparison.

### Mechanism check

- Verdict: Built a self-contained Burgers front-token MVP with jump detection, local Rankine–Hugoniot speed evaluation, analytical front propagation, piecewise rendering, and a Godunov finite-volume baseline. The RH identity was reproduced to machine precision, and analytical tokens had essentially zero front and field error on the clean shock while the baseline errors decreased with resolution. This is a clear toy signal, but it is not evidence yet for learned residuals, attention, source terms, front interactions, or a fair equal-compute neural comparison.
- Confidence: 7/10
- Limitations: The test uses a single clean scalar Burgers shock with exact constant traces, so the token branch is effectively oracle-like and does not train a neural residual or attention module. It does not test source terms, rarefactions, multiple interacting fronts, noisy detection, autoregressive learned rollouts, equal-parameter/FLOP neural baselines, or the learned-versus-analytic position ablation.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 0.0081
- Paired wins: 0/8
- Benchmark verdict: idea worse (significant)

## Artifacts

- [bench_front_tokens.py](https://synthcore.org/code/1136/bench_front_tokens.py)
- [bench_report.json](https://synthcore.org/code/1136/bench_report.json)
- [front_tokens_experiment.py](https://synthcore.org/code/1136/front_tokens_experiment.py)
- [report.md](https://synthcore.org/code/1136/report.md)
- [report_bench_2026-09-02T122451.md](https://synthcore.org/code/1136/report_bench_2026-09-02T122451.md)
- [results.json](https://synthcore.org/code/1136/results.json)
- [Download all files as ZIP](https://synthcore.org/download/1136)

## Disclaimer

AI-generated research hypothesis, automatically tested. Not peer-reviewed.
