{
 "artifacts": [
  {
   "name": "bench_front_tokens.py",
   "url": "https://synthcore.org/code/1136/bench_front_tokens.py"
  },
  {
   "name": "bench_report.json",
   "url": "https://synthcore.org/code/1136/bench_report.json"
  },
  {
   "name": "front_tokens_experiment.py",
   "url": "https://synthcore.org/code/1136/front_tokens_experiment.py"
  },
  {
   "name": "report.md",
   "url": "https://synthcore.org/code/1136/report.md"
  },
  {
   "name": "report_bench_2026-09-02T122451.md",
   "url": "https://synthcore.org/code/1136/report_bench_2026-09-02T122451.md"
  },
  {
   "name": "results.json",
   "url": "https://synthcore.org/code/1136/results.json"
  }
 ],
 "category": "architecture",
 "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.",
 "download_zip": "https://synthcore.org/download/1136",
 "formulas_latex": [
  "$$\\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|.$$"
 ],
 "id": 2925,
 "implementation": "(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.",
 "math_summary": "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.",
 "math_tags": [
  "pde",
  "dynamical-systems",
  "numerical-analysis"
 ],
 "ml_areas": [
  "transformer",
  "attention",
  "world-model",
  "training"
 ],
 "paper": {
  "arxiv_id": "2607.23143",
  "arxiv_url": "https://arxiv.org/abs/2607.23143",
  "summary_what_math_gives_to_ml": "The transferable asset is not the Schwarzschild-specific fluid model, but the separation of discontinuity dynamics from smooth-field reconstruction. A neural operator or transformer can represent each shock as an explicit front token whose position is advanced by a Rankine–Hugoniot update, while a learned branch predicts only the smooth residual and finite-resolution error. This hybrid inductive bias should reduce shock smearing and make long-horizon propagation more stable than asking a network to infer both front location and field values implicitly. The extracted mathematics only exposes the general balance-law form, so the proposed transfer uses the standard local jump law as an explicit adaptation rather than relying on unavailable model-specific invariants.",
  "title": "Physics-informed token transformer methodology for nonlinear balance laws. I. Schwarzschild--Burgers fluid flows",
  "year": "2026"
 },
 "ratings": {
  "difficulty": 6,
  "novelty": 6,
  "usefulness": 7
 },
 "solves": [
  "accuracy",
  "stability",
  "sample-efficiency"
 ],
 "title": "Rankine–Hugoniot Front Tokens",
 "url": "https://synthcore.org/idea/2925/rankine-hugoniot-front-tokens",
 "verification": {
  "benchmark": {
   "track": "burgers_periodic_split",
   "model": "cnn_shared",
   "n_seeds": 8,
   "metric_direction": "lower is better",
   "comparison": {
    "baseline_mean": 0.0001909858247017837,
    "idea_mean": 0.0022266772139118984,
    "delta_mean": 0.0020356913892101147,
    "per_seed_diffs": [
     0.0018292729218956083,
     0.003018081944901496,
     0.0014681292814202607,
     0.0013283590378705412,
     0.0012354588834568858,
     0.0012568471502163447,
     0.003530025278450921,
     0.0026193566154688597
    ],
    "idea_wins": 0,
    "n_pairs": 8,
    "p_value": 0.0081,
    "mde": 0.000751264160788154,
    "mde_rel_pct": 393.36121513794086,
    "verdict": "idea worse (significant)",
    "system_worked": false
   },
   "baseline": {
    "best_cfg": {
     "epochs": 15,
     "lr": 0.006
    },
    "sweep": [
     {
      "cfg": {
       "epochs": 15,
       "lr": 0.0015
      },
      "mean": 0.0002808531244227197
     },
     {
      "cfg": {
       "epochs": 15,
       "lr": 0.003
      },
      "mean": 0.0002247071788588073
     },
     {
      "cfg": {
       "epochs": 15,
       "lr": 0.006
      },
      "mean": 0.00017973236390389502
     }
    ],
    "full": {
     "mean": 0.0001909858247017837,
     "std": 0.00004899876337576311,
     "per_seed": [
      0.00019845497445203364,
      0.00017688231309875846,
      0.00018345325952395797,
      0.00016013890854083002,
      0.00018341024406254292,
      0.00011085406731581315,
      0.000293802673695609,
      0.00022089015692472458
     ],
     "n": 8
    }
   },
   "idea": {
    "mean": 0.0022266772139118984,
    "std": 0.0008782478931862389,
    "per_seed": [
     0.002027727896347642,
     0.0031949642580002546,
     0.0016515825409442186,
     0.0014884979464113712,
     0.0014188691275194287,
     0.001367701217532158,
     0.00382382795214653,
     0.0028402467723935843
    ],
    "n": 8
   },
   "mechanism_signature": {
    "confirmed": false,
    "observed_mean_displacement": 0,
    "predicted_mean_speed_displacement": -0.00025935691202875956,
    "relative_error": 259.35691202875955
   },
   "custom_track": null
  },
  "mechanism_confirmed": false,
  "peer_reviewed": false,
  "practical_verdict": "harms",
  "stage1_mechanism_check": {
   "worked": true,
   "confidence": 7,
   "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.",
   "metrics": {
    "baseline": "Mean over N={64,128,256}: front-position L1=0.00867 and terminal field L1=0.00557; per-resolution front errors=[0.01468,0.00760,0.00373].",
    "idea": "Mean over N={64,128,256}: front-position L1=5.22e-16 and terminal field L1=0.0; RH identity maximum error=0.0; one-step position errors were 0.0 for dt={0.002,0.004,0.008}."
   },
   "how_to_run": "python3 front_tokens_experiment.py",
   "files": [
    "front_tokens_experiment.py",
    "results.json"
   ],
   "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."
  },
  "status": "failed_benchmark",
  "status_label": "Failed on benchmark",
  "updated_at": "2026-09-02T12:30:10",
  "verdict_source": "deterministic test code (paired-seed permutation statistics)",
  "verification_axes": {
   "benchmark_mechanism": {
    "confirmed": false,
    "tested": true
   },
   "practical_benchmark": {
    "beats_baseline": false,
    "tested": true,
    "verdict": "harms"
   },
   "toy_mechanism_gate": {
    "confirmed": true,
    "tested": true
   }
  }
 }
}
