AAAI 2027 / Research project
Optimality Diagnostics
Optimality Diagnostics for Corrected Diffusion and Flow Models
School of Electrical and Information Engineering, Tianjin University, Tianjin, China
Could a sampler reach the same distribution at a lower cost?
01 / Overview
What can a final sample tell us?
In image inpainting, a sampler can enforce the observed pixels at every step or concentrate its corrections near the end. Checking the observed region tells us how well each sampler satisfies the constraint. It leaves open how much extra work the sampler did along the way.
We call this extra work the own endpoint defect. Take the initial and final distributions produced by a particular correction. Compare its transport cost with the least cost achievable between those same distributions, under the same reference dynamics. The difference is the defect. Each correction supplies its own endpoints, even when its final distribution is unknown in closed form.
02 / Method
How do we score a recorded trajectory?
Record candidate corrections under matched conditions
Run each schedule on paired pilot inputs. Keep its transitions or velocities and measure its final constraint error. A fixed tolerance determines which candidates qualify for selection.
With noise, test what the endpoints explain
Compare the likelihood of a path under the correction and the reference sampler. For an optimal bridge, their ratio factors into a function of the start and a function of the end, conditional on the input. A Hellinger residual measures the error in fitting this factorization. When the two path laws are equivalent, we can sum the transition log ratios and fit an additive endpoint model on separate trajectories.
Without noise, compare action with a dual bound
Recorded velocities give the control action, the integrated squared correction to the base velocity with a factor of one half. A fitted scalar potential gives a lower bound on the minimum action when it satisfies the Hamilton–Jacobi–Bellman inequality. The gap measures how much action the potential leaves unexplained. We check the inequality on held-out points.
When does the score certify optimality or an ordering?
Under the paper’s assumptions, the population Hellinger residual vanishes exactly at the own endpoint bridge when the reference law dominates the corrected law. The log-ratio version additionally requires equivalence. A local residual measures departures near the optimum. For a global ranking, the paper derives bounds on the true defects and compares candidates whose intervals separate.
At zero noise, a globally feasible potential yields an upper bound on the action defect, with equality at dual attainment. The experiments enforce feasibility on a finite collocation set. The convergence theorem connects the noise-scaled entropy defect to the action defect under variational convergence and recovery assumptions.
03 / Calibration
Can the diagnostic recover a known cost?
The Gaussian example in Figure 1 has an exact answer, so we can check the estimator as dimension grows from 1 to 1,024. Increasing the number of training trajectories per endpoint parameter from 24 to 48 to 96 reduced the mean absolute relative error from 4.75% to 2.25% to 1.08%. At the true optimum, every estimated defect was below 1.14 × 10−9.
What happens as noise approaches zero?
On one frozen SiT-XL/2 backbone, we hold initial latents, conditions and integration settings fixed. For each schedule shown, the stochastic score approaches its independently fitted zero-noise action score. The fitted log–log slopes range from 1.87 to 1.94 for noise intensities up to ¼.
04 / Experiments
Which corrections work on unseen inputs?
On ImageNet at 256 pixels, we select a feasible correction for each task and noise level on a frozen SiT model. Relative to relaxed correction, the chosen policy lowers FID from 60.6 to 34.7 for inpainting and from 60.0 to 47.0 for 4× super-resolution. Full correction achieves the smallest constraint error in both tasks.
| Policy | Inpainting FID | Inpainting error | 4× SR FID | 4× SR error |
|---|---|---|---|---|
| Diagnostic selection | 34.7 | 0.042 | 47.0 | 0.038 |
| Fixed full | 39.4 | 0.006 | 52.1 | 0.001 |
| Action only | 42.8 | 0.061 | 50.9 | 0.044 |
| Relaxed correction | 60.6 | 0.073 | 60.0 | 0.041 |
| DPS | 60.0 | 0.189 | 58.9 | 0.172 |
SD3 Medium at 1,024 pixels
We tested the frozen schedules on 64 unseen COCO conditions with two seeds. All three selected schedules met the relative constraint-error tolerance of 0.3. Compared with full projection, LPIPS fell by 0.0083 for center-mask inpainting, 0.0233 for irregular masks and 0.0178 for 4× super-resolution.
Timing guidance on EDM2
On ImageNet at 512 pixels, early, uniform and late guidance at the same strength of 0.4 scored 26.0, 2,293.7 and 30,982.1 on the path diagnostic. The terminal metrics showed no statistically significant differences after Holm correction. Guidance timing was visible in the paths even where the final metrics could not resolve it.
Scope. None of the 70 tested SiT corrections passed its optimality test. The experiments identify better choices among the feasible schedules tested. The uncorrected process illustrates why the feasibility check matters. Its defect is zero, yet it fails the task constraint.
05 / Reference
Cite this work
Accepted to AAAI 2027 · Camera-ready manuscript
@inproceedings{li2027optimality,
title={Optimality Diagnostics for Corrected Diffusion and Flow Models},
author={Li, Jialin and Zhang, Zhuo and Lan, Guipeng and Cao, Yue and Xiao, Shuai and Yang, Jiachen},
booktitle={AAAI Conference on Artificial Intelligence},
year={2027},
note={Accepted, camera-ready version}
}