# Should the Boundary Term Be Learned in Reflected Diffusion? Conormal Trace and Reflection Masking

arXiv: https://arxiv.org/abs/2608.03469 · HTML: https://mlsanity.com/paper/2608.03469/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 8 of its 12 references that are in the map.
- First posted on arXiv 4 Aug 2026.

## Builds on (most cited first, 8 of 8)

- [Score-Based Generative Modeling through Stochastic Differential Equations](https://mlsanity.com/paper/2011.13456/) (2020)
- [Generative Modeling by Estimating Gradients of the Data Distribution](https://mlsanity.com/paper/1907.05600/) (2019)
- [Mirror Diffusion Models for Constrained and Watermarked Generation](https://mlsanity.com/paper/2310.01236/) (2023)
- [Estimating Density Models with Truncation Boundaries using Score Matching](https://mlsanity.com/paper/1910.03834/) (2019)
- [Constrained Diffusion Models via Dual Training](https://mlsanity.com/paper/2408.15094/) (2024)
- [Generalized Score Matching for General Domains](https://mlsanity.com/paper/2009.11428/) (2020)
- [Score matching for compositional distributions](https://mlsanity.com/paper/2012.12461/) (2020)
- [Score-based constrained generative modeling via Langevin diffusions with boundary conditions](https://mlsanity.com/paper/2510.23985/) (2025)

## Abstract (arXiv)

We study score learning for reflected diffusion on bounded domains. Reflection keeps trajectories feasible but does not ensure that the learned score satisfies the boundary behavior implied by the forward process. With implicit score matching, integration by parts leaves a boundary term, and we show that it depends on one scalar at each boundary point: the diffusion- weighted normal component of the score, or conormal trace. The no-flux condition fixes this value while leaving the re- maining boundary components unrestricted; under anisotropic diffusion it generally differs from the ordinary normal score component. On hyperrectangles, our parametrization enforces the required trace without additional trainable parameters or a stochastic boundary estimator and, under regularity assump- tions, can represent the true score, whereas fixing an incorrect value creates an error that more data cannot remove. We ex- tend the construction to simplices and polygonal domains and identify reflection masking: hard reflection can keep samples feasible even when the learned trace is wrong, so post-reflection metrics may hide the error. Experiments show the clearest separation with less frequent reflection, anisotropic diffusion, and mass near intersections of constraints; under full reflection, final sample placement improves inconsistently, illustrating how hard repair can mask boundary-score errors and decouple score accuracy from downstream generation quality.
