Horizontal oblique reflection for constrained diffusion
Implementation & benchmark of arXiv:2607.17904 — Reflected Schrodinger Bridge Problem over Sub-Riemannian Manifold
Source paper: Reflected Schrodinger Bridge Problem over Sub-Riemannian Manifold arXiv:2607.17904 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Modify a diffusion or score-based sampler so that boundary reflection is aligned with the model's admissible noise and control directions instead of using the Euclidean normal. At a boundary hit, reflect through the sub-Riemannian diffusion Gram matrix, preserving the anisotropic dynamics and preventing constraint corrections from injecting motion into inaccessible directions.
Formulas
Mathematical statement
The domain is \(\mathcal X=\{x\in\mathbb R^d:\xi(x)>0\}\), with inward Euclidean unit normal \(n(x)=\nabla\xi(x)/\|\nabla\xi(x)\|\) on \(\partial\mathcal X\). The admissible horizontal distribution is \(\mathrm D(x)=\operatorname{span}\{g_1(x),\ldots,g_m(x)\}\), and its positive-semidefinite Gram matrix is \(G(x)=\sum_{i=1}^m g_i(x)g_i(x)^\top\). The intrinsic reflection direction is \(r(x)=G(x)n(x)/(n(x)^\top G(x)n(x))\), assuming the non-characteristic boundary condition \(n(x)^\top G(x)n(x)>0\). It satisfies \(n(x)^\top r(x)=1\), so it removes outward normal displacement, while \(r(x)\in\mathrm D(x)\), so the correction is generated by admissible directions. The associated backward boundary condition is the oblique Neumann condition \(r(x)^\top\nabla u(x)=0\). In the paper's torus example, \(g_1=(1,0,-2\alpha x_2)^\top\), \(g_2=(0,1,2\alpha x_1)^\top\), and \(G(x)\) is the displayed rank-two horizontal Gram matrix.
Implementation notes
Integrate this at the state-update step of a score-based diffusion sampler, probability-flow ODE, or learned controlled diffusion. Represent the valid domain with a differentiable signed function \(\xi(x)\), positive inside, and expose the model's noise or control vectors \(g_i(x)\); if the model currently uses anisotropic covariance, set \(G=\sum_i g_i g_i^\top\) from its actual diffusion factor. For each Euler-Maruyama step, compute the unconstrained proposal \(y=x+b_\theta(x,t)\Delta t+\sum_i g_i(x)\sqrt{\Delta t}z_i\). If \(\xi(y)\geq0\), accept it. If \(\xi(y)<0\), project to the boundary by Newton iterations \(y\leftarrow y-\xi(y)\nabla\xi(y)/\|\nabla\xi(y)\|^2\), compute \(n=\nabla\xi/\|\nabla\xi\|\), \(r=Gn/(n^\top Gn+\varepsilon)\), and add the inward correction \(y\leftarrow y-\xi(y)r\); repeat until the point is inside. A closer reflected-process discretization records the signed outward displacement \(\delta=\min(0,\xi(y))\) and applies \(y\leftarrow y-\delta r\). Estimate \(G\) from the supplied vector fields; the reflection formula and oblique boundary condition are the mathematical components transplanted from the paper. First test on a 2D annulus or 3D torus with a small score model, comparing Euclidean reflection, rejection, and horizontal reflection. Measure boundary violation probability, endpoint likelihood or sliced Wasserstein error, and score loss near the boundary. Success means lower constraint violation and better endpoint matching at equal function evaluations, particularly when \(G\) is strongly anisotropic or rank deficient.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Confirmed ✓
Stage 2 · Practical benchmark result: Inconclusive
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
Stage 1 — Mechanism check agent confidence 9/10
Built and ran a constrained diffusion toy experiment comparing horizontal oblique and Euclidean reflection. The core predictions were confirmed: n^T r=1 to machine precision (<1.4e-15), r lies in range(G) to machine precision (<1.4e-15), and the measured tangent/normal ratios exactly matched 1/k for k in {0.05,0.1,0.25,0.5,1,2,4}; oblique inaccessible correction was ~1e-18 while Euclidean correction was nonzero. The promised mechanism manifested clearly, although this is not evidence of improved sample quality in a learned diffusion model.
- Agent confidence
- 9/10
- Baseline
- Euclidean reflection: zero tangential correction, but mean inaccessible correction per step ranged from 1.08e-4 (k=0.05) to 3.94e-3 (k=4); boundary violation after correction was 0.
- Idea
- Horizontal oblique reflection: tangent/normal correction ratio exactly matched 1/k (20, 10, 4, 2, 1, 0.5, 0.25); inaccessible correction was approximately 1e-18 for every sweep value; boundary violation after correction was 0.
Limitations: Only a half-space Euler toy diffusion was tested, with analytically supplied vector fields and exact linear boundary correction. No score network, annulus/torus geometry, endpoint likelihood, sliced Wasserstein distance, convergence rate, runtime/FLOP comparison, or finite-step curved-boundary Newton projection was evaluated.
How to run: python3 oblique_reflection_experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2607.17904)
Ahead of the baseline (−7.9%) but not statistically significant (p=0.1328, wins 4 / 8 paired seeds).
- Benchmark
- Horizontal_reflection_dynamics
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0476
- Idea mean
- 0.0439
- Effect (Δ)
- -0.0037 (−7.9%; negative = idea better)
- Wins
- 4 / 8 paired seeds
- p-value
- 0.1328 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±10.8%
- Mechanism
- Confirmed ✓
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 3 configs
A custom controlled-diffusion track was required because the built-in dynamics target cannot expose inaccessible-direction corrections. The intervention was evaluated as constrained prediction/rollout postprocessing rather than end-to-end learned score-based diffusion sampling. Curved boundaries, larger models, alternative anisotropies, and external real-world data were not tested.
How to run: python3 stage2_bench.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Failed ✗
Agent confidence: 9/10
Implemented a local custom controlled-diffusion dynamics track with a shared rnn_small model, Euclidean baseline reflection, and Gram-matrix horizontal oblique reflection. The NN-scale mechanism signature was quantitatively confirmed: n^T r error 0, tangent/normal ratio 0.5 as predicted, and inaccessible oblique correction 3.25e-17 versus 0.0587 for Euclidean reflection. Endpoint MSE improved from 0.04761 to 0.04387, but the paired permutation test was not significant (p=0.13285), so this is not a validated benchmark win.
- Baseline
- Mean endpoint MSE 0.0476127423 over 8 paired seeds; best lr=0.01, epochs=15.
- Idea
- Mean endpoint MSE 0.0438726173 over 8 paired seeds; best lr=0.014, epochs=15; delta=-0.0037401250, p=0.13285, 4/8 paired wins.
Benchmark result
Ahead of the baseline (−7.9%) but not statistically significant (p=0.1328, wins 4 / 8 paired seeds).
- Benchmark
- Horizontal_reflection_dynamics
- Model
- rnn_small
- Paired seeds
- 8
- Baseline mean
- 0.0476
- Idea mean
- 0.0439
- Effect (Δ)
- -0.0037 (−7.9%; negative = idea better)
- Wins
- 4 / 8 paired seeds
- p-value
- 0.1328 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±10.8%
- Mechanism
- Confirmed ✓
- Practical effect
- Inconclusive
- Baseline tuning
- swept over 3 configs
A custom controlled-diffusion track was required because the built-in dynamics target cannot expose inaccessible-direction corrections. The intervention was evaluated as constrained prediction/rollout postprocessing rather than end-to-end learned score-based diffusion sampling. Curved boundaries, larger models, alternative anisotropies, and external real-world data were not tested.
How to run: python3 stage2_bench.py
Artifacts
- bench_report.json 3.0 KB View Raw
- oblique_reflection_experiment.py 3.9 KB View Raw
- report.md 1.6 KB View
- report_bench_2026-08-30T195705.md 4.3 KB View
- results.json 5.2 KB View Raw
- stage2_bench.py 5.5 KB View Raw