Asymptotic-preserving terminal completion
Implementation & benchmark of arXiv:2607.04113 — Asymptotic Preservation and Uniform Accuracy of Diffusion and Flow-Matching Samplers
Source paper: Asymptotic Preservation and Uniform Accuracy of Diffusion and Flow-Matching Samplers arXiv:2607.04113 ⓘ · analyzed Aug 29, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Replace the final sequence of diffusion-sampler steps below a positive switching noise scale a with a single analytic normal-mode completion map. Run the existing solver only on [a, sigma_max], then use the denoiser at scale a to extrapolate to the requested terminal floor epsilon. This prevents the step count from growing like log(sigma_max/epsilon) and should preserve the base solver's order when a is coupled to the discretization size.
Formulas
Mathematical statement
The paper defines asymptotic preservation (AP) as stable, consistent zero-noise discretization with a number of updates bounded independently of the terminal noise floor epsilon. With bounded local log-noise steps and no terminal map, the required number of updates satisfies N >= c log(sigma_max/epsilon), where sigma_max is the starting noise scale, epsilon is the requested terminal scale, and c depends on the step-size bound. The proposed positive-scale completion uses a denoiser D(x,sigma), where x is the current noisy state and D estimates the clean/data component. The adapted normal-mode map is T_{a,epsilon}(x) = D(x,a) + (epsilon/a)(x-D(x,a)); it keeps the estimated clean component fixed and scales the residual normal component linearly from amplitude a to epsilon. On a smooth compact boundaryless data manifold, the exact-input terminal error is O(a^2-epsilon^2), with sharp zero-floor behavior Theta(a^2). If the base solver has a floor-uniform order-p endpoint error O(h^p) on [a,sigma_max], choosing a = O(h^(p/2)) makes the terminal error O(h^p), provided the terminal transfer factor remains bounded. Here h is the base solver resolution and p is its convergence order.
Implementation notes
1. Integration point: modify the sampler's final denoising segment, not the neural network weights. Given a pretrained diffusion model with denoiser output D_theta(x,sigma), choose a switching scale a larger than the requested terminal scale epsilon. Integrate the existing Euler, Heun, DPM-Solver, or flow-matching solver only down to sigma=a, then perform one terminal completion call. For a VE/EDM-style parameterization, use the residual r=x_a-D_theta(x_a,a) and return x_epsilon=D_theta(x_a,a)+(epsilon/a)r. For a sampler whose model predicts score or noise rather than x0, first convert that prediction to the equivalent denoiser D_theta using the model's standard preconditioning formulas.
2. Pseudocode:
input x, sigma_max, epsilon, base_resolution h, solver order p
choose a = clip(C_a * h**(p/2), epsilon, sigma_max)
while sigma > a:
sigma_next = base_grid_step(sigma, h)
x = base_solver_step(x, sigma, sigma_next, model)
D = denoiser(model, x, a)
x = D + (epsilon/a) * (x-D)
return x
If epsilon=0, return D directly. The formula above is the normal-mode terminal map; the O(a^2) estimate is the geometric truncation error on smooth compact boundaryless manifolds.
3. Compute versus estimate: the terminal map and cutoff scaling are prescribed mathematically. Estimate the unknown constant C_a and the bounded transfer factor empirically on a calibration batch by sweeping a; estimate the actual convergence order from endpoint errors at h, h/2, and h/4 using identical random seeds. Do not let a fall below epsilon.
4. First experiment: use CIFAR-10 or ImageNet-64 with a small EDM checkpoint, comparing the original sampler against Euler or Heun plus this completion at equal FID and equal same-seed endpoint error. Sweep NFE and epsilon, recording FID, reconstruction or Wasserstein proxy, and function evaluations. The falsifiable target is that NFE becomes essentially independent of epsilon, while log-log endpoint error versus h retains the baseline slope p and the terminal residual scales approximately quadratically with a.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Not tested
Stage 2 · Practical benchmark result: Not run
Methodology: Toy-system gate first; the benchmark stage runs only after a pass. How verification works
Stage 1 — Mechanism check agent confidence 8/10
Built and tested the asymptotic-preserving terminal completion map using a synthetic curved-manifold diffusion trajectory and nearest-manifold denoiser. The zero-floor error had log-log slope 1.95, residual gain was below 1, and completion reduced updates by about 9.5x at epsilon=1e-6 while improving endpoint error in this controlled test. This is a promising numerical signal, not validation on a learned image diffusion model.
- Agent confidence
- 8/10
- Baseline
- At h=0.04 and epsilon=1e-6: endpoint error 0.03810 with 346 updates; convergence slope 1.02.
- Idea
- At h=0.04 and epsilon=1e-6: endpoint error 0.001231 with 42 updates; convergence slope 1.98. At h=0.04, update count was 42 for epsilon=1e-2, 1e-4, and 1e-6; mean speedup was 9.46x.
Limitations: The test uses a synthetic unit-circle trajectory, an ideal nearest-circle denoiser, and a known vector field rather than a trained neural diffusion model or image dataset. It does not measure FID, wall-clock GPU speed, denoiser-call overhead, Heun or DPM-Solver behavior, learned-denoiser errors, or robustness when the residual transfer factor is not bounded.
How to run: python3 terminal_completion_experiment.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Super-audit (legacy) latest Failed ✗
Agent confidence: 9/10
Implemented and tested a learned-denoiser super-check on real sklearn handwritten digits with three seeds, Euler and Heun baselines, a no-map cutoff ablation, and the proposed terminal completion. The exact geometric check passed with quadratic slope 2.0000 and transfer factor 0.0005, but the learned experiment showed no meaningful difference between the idea and no-map ablation: RMSE 0.25159 ± 0.00238 versus 0.25159 ± 0.00238. The idea used 11 calls versus 10 for Euler-10, so the claimed learned-model speedup or accuracy attribution did not survive.
- Baseline
- Seeds 11,23,37: Euler-10 RMSE 0.27491 ± 0.00734, proxy 0.14526 ± 0.01732, 10 calls, 0.02508 ± 0.00825 s; Euler-20 RMSE 0.28379 ± 0.00802, proxy 0.15919 ± 0.02080, 20 calls, 0.04174 ± 0.01293 s; Euler-50 RMSE 0.28998 ± 0.00825, proxy 0.16899 ± 0.02307, 50 calls, 0.11270 ± 0.01111 s; Heun-10 RMSE 0.30392 ± 0.00861, proxy 0.19096 ± 0.02734, 20 calls, 0.02981 ± 0.00173 s; Heun-20 RMSE 0.29666 ± 0.00836, proxy 0.17970 ± 0.02534, 40 calls, 0.05474 ± 0.00329 s; no-map cutoff-10 RMSE 0.25159 ± 0.00238, proxy 0.08722 ± 0.00619, 11 calls, 0.02616 ± 0.00488 s.
- Idea
- Seeds 11,23,37: terminal completion-10 RMSE 0.25159 ± 0.00238, proxy 0.08719 ± 0.00619, 11 calls, 0.02458 ± 0.00995 s; terminal completion-20 RMSE 0.25156 ± 0.00237, proxy 0.08754 ± 0.00623, 21 calls, 0.03947 ± 0.00962 s. Exact math slope 2.0000; perturbation gain 0.9995; total run time approximately 3.76 s.
The requested MNIST two-block UNet/DDPM was not feasible because torchvision MNIST was not locally confirmed; this check used sklearn load_digits and a compact learned MLP instead. No official FID, image-scale MNIST, pretrained image diffusion checkpoint, DPM-Solver, or learned score/noise parameterization was tested. GPU timings are small-batch measurements and are not a production speed benchmark.
How to run: python3 supercheck_mnist.py
Artifacts
- report.md 1.4 KB View
- report_super_2026-08-30T102145.md 3.5 KB View
- results.json 4.4 KB View Raw
- supercheck_mnist.py 6.4 KB View Raw
- supercheck_report.md 3.7 KB View
- supercheck_results.json 11.6 KB View Raw
- terminal_completion_experiment.py 5.2 KB View Raw