Abstract
The manifold hypothesis asserts that data of interest in high-dimensional ambient spaces, such as image data, lies on unknown low-dimensional submanifolds. Diffusion models (DMs)—which operate by convolving data with progressively larger amounts of Gaussian noise and then learning to revert this process—have risen to prominence as the most performant generative models and are known to be able to learn distributions with low-dimensional support. For a given datum in one of these submanifolds, we should thus intuitively expect DMs to have implicitly learned its corresponding local intrinsic dimension (LID). Kamkari et al. (2024b) recently showed that this is indeed the case by linking this LID to the rate of change of the log marginal densities of the DM with respect to the amount of added noise, resulting in an LID estimator known as FLIPD. However, the theoretical underpinnings of FLIPD were incomplete, as correctness was only proven under the assumption of affine submanifolds. In this work, we bridge this gap by formally proving the correctness of FLIPD under realistic, curved manifold assumptions and show that an analogous result holds for uniform convolutions.
Introduction
High-dimensional data, such as a $1024 \times 1024$ pixel image, often resides on a much lower-dimensional "surface" or manifold within its ambient space. Identifying the dimension of this surface—the Local Intrinsic Dimension (LID)—is a fundamental task in machine learning. LID estimation is critical for detecting outliers, identifying adversarial attacks, and distinguishing AI-generated content from human-authored work.
Recently, the FLIPD estimator was developed to leverage the power of Diffusion Models (DMs) for LID estimation. FLIPD operates by analyzing how the density of data changes as infinitesimal amounts of noise are added. While empirically successful, the initial theoretical justification for FLIPD relied on the "highly unrealistic" assumption that these manifolds are perfectly flat (affine). This paper provides the necessary mathematical rigor to justify FLIPD's use on the complex, curved manifolds encountered in natural data.
Theoretical Framework
The research employs differential geometry and stochastic calculus to analyze the relationship between the log marginal density of a distribution and the standard deviation of added noise. By modeling data as living on smooth $d$-dimensional submanifolds embedded in $\mathbb{R}^D$, the authors evaluate the behavior of the distribution in the limit as the noise standard deviation ($\delta$) approaches zero.
Overcoming Curvature
A central challenge in this proof is accounting for manifold curvature. The authors demonstrate that as noise levels become infinitesimally small, the local curvature of a manifold becomes negligible. This allows the estimator to treat a complex, curved surface as locally flat in the limit, providing the formal justification for FLIPD’s performance on natural datasets like images.
The Score Function and LID
The core finding confirms that the rate of change of the log-density is exactly the difference between the intrinsic dimension ($d$) and the ambient dimension ($D$). This provides a clean, plug-and-play formula for any model that can estimate a score function (the gradient of the log-density), which is precisely what diffusion models are trained to do.
Key Results
The paper establishes two major theoretical milestones:
- Theorem 1 (Gaussian Case): The authors formally prove that for a smooth submanifold, the limit of the derivative of the log-density under Gaussian convolution is exactly $d - D$. This bridges the gap between the original affine proof and real-world applications.
- Theorem 2 (Uniform Case): The authors prove an analogous result for uniform noise (noise distributed over a ball). This is significant because it links LID directly to the probability mass assigned to Euclidean balls, a fundamental concept in classical density estimation that previously lacked this specific rigorous backing in the context of DMs.
Additionally, the authors show that these results hold even if the data is a "union of manifolds." This means the estimator can correctly identify the local dimension for a specific point even if different clusters of data have different intrinsic dimensions (e.g., a dataset containing both 1D lines and 2D spheres).
Discussion and Future Work
While this work provides a robust theoretical foundation, it assumes access to the true score function of the data. In practice, diffusion models use neural networks to approximate this function. Errors in this approximation can lead to inaccurate LID estimates.
Future research directions include:
- Quantifying Approximation Error: Determining how much an imperfectly learned score function impacts the final LID estimate.
- Flow Matching: Extending these proofs to "Flow Matching" models, which are emerging as popular alternatives to standard Diffusion Models.
- Generalized Noise: Investigating whether these results hold for any noise distribution following specific decomposition properties beyond Gaussian and Uniform noise.
Summary updated