NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

JaSpec-LID: Local Intrinsic Dimension Estimation via Jacobian Spectra of ODE-based Generative Models

Hiro Ishii, Genki OsadaNeurIPS 2026

TL;DR

Real-world data like images live on low-dimensional surfaces tucked inside massive ambient spaces—and measuring that surface's "local intrinsic dimension" (LID) helps us catch everything from out-of-distribution inputs to verbatim training-data memorization. Until now, measuring LID required generative models with explicit probabilities or diffusion score functions, leaving modern vector-field models like Flow Matching and Stable Diffusion 3 in the dark. JaSpec-LID solves this by reading the geometry directly off the model's velocity field: it simply nudges a data point and counts in how many directions the generative flow barely flinches.

What Problem Does This Paper Address?

The manifold hypothesis tells us that a $1024 \times 1024$ image of a cat doesn't actually have a million degrees of freedom; it sits on a much smaller, curved surface (a manifold) of valid cat-like images. The Local Intrinsic Dimension (LID) at a specific point is the number of independent directions you can move while staying on that surface. Knowing the local LID is tremendously practical—for instance, when a generative model memorizes a training image verbatim, the manifold locally collapses around that point, causing a sharp, detectable drop in LID.

Classical nearest-neighbor LID estimators break down in high dimensions because distances between points concentrate and lose meaning. Recently, researchers figured out how to extract LID directly from trained generative models, such as normalizing flows or score-based diffusion models.

There is a catch, though: the generative AI world has largely moved on to ODE-based generators—like Flow Matching, Rectified Flows, and Stochastic Interpolants (the engines behind systems like Stable Diffusion 3). These models don't learn a log-likelihood or a score function ($\nabla_x \log p_t$); they only learn a velocity field $f_\theta(x_t, t)$ that transports noise into data. Existing model-based LID estimators simply cannot run on them.

Methods

The authors introduce JaSpec-LID (Jacobian Spectrum Local Intrinsic Dimension), a model-agnostic estimator that requires only a differentiable velocity field $f_\theta(x_t, t)$—making it compatible with flow matching, rectified flows, and diffusion models (via their probability-flow ODE).

The core intuition is wonderfully physical. Imagine the generative ODE pulling scattered probability mass onto a thin data manifold:

  • If you nudge a point along the manifold (a tangent direction), the generator doesn't need to "do work" to correct you; the velocity vector barely changes.
  • If you nudge a point off the manifold into empty ambient space (a normal direction), the velocity field must push back hard and fast to pull you back onto the surface.

Mathematically, how much the velocity changes under tiny state nudges is captured by the Jacobian matrix $J_t = \partial f_\theta(x_t, t) / \partial x_t$. JaSpec-LID simply counts how many singular values $\sigma_i(J_t)$ fall below a threshold $\tau$. Small singular values correspond to the lazy tangent directions—giving you the LID!

Figure 1: Jacobian-normal-dominance signature on L10+80+200, D=1024. (a) Empirical singu- lar spectrum of Jt under VP-SDE: a low-σ cluster whose size matches the local LID is separated by a clean gap from a high-σ normal bulk; aggregating the per-sample low-σ mass recovers the {10, 80, 200} components (OT-CFM in Appendix B). (b) Transition mass T (t, τ; ε = 0.2): the dark bands mark high-mass regions; the broad light valley between them is the empirical zero-mass region that satisfies Jacobian-normal dominance. JASPEC-LID selects (t⋆, τ) in the interior of this valley.

To make this practical and parameter-free, the authors introduce two computation paths and an automatic tuning diagnostic:

  • Exact SVD Path (Novel default for $D \lesssim 3000$): Materializes $J_t$ at the clean data point $x_0$ (slightly offset in time $t_\star$ to avoid noise variance), computes the exact SVD in $\mathcal{O}(D^3)$, and applies a hard threshold $\sigma_i \le \tau$.
  • Scalable SLQ Path (Adapted for huge $D$): Replaces the hard step threshold with a smooth Hill filter and estimates the matrix trace in linear cost using Hutchinson Rademacher probes and Stochastic Lanczos Quadrature (requiring only forward/reverse Jacobian-vector products, never forming $J_t$).
  • Unsupervised Gap Selection: Instead of guessing evaluation time $t_\star$ and cutoff $\tau$, JaSpec-LID scans a grid to minimize "transition mass"—finding a clean spectral gap (the light grey valley in Figure 1b) with zero singular values hovering near $\tau$.

Datasets

No new datasets are introduced; the authors evaluate on established synthetic and natural-image benchmarks:

  • Synthetic Manifold Mixtures (from Osada, 2026): Disjoint affine ($\mathcal{L}$) and curved/squiggly nonlinear ($\mathcal{F}$) manifolds with known ground-truth LIDs across ambient dimensions $D \in \{3, 100, 784, 1024, 3072\}$, including an MNIST-shaped $1\times28\times28$ image embedding (IDR).
  • Natural Images: CIFAR-10, LAION-Aesthetics (evaluated via Stable Diffusion 1.5), and 20 classes of ImageNet/ILSVRC2012 (evaluated via DiT-XL/2). Because natural images lack ground-truth LID, lossless PNG file size is used as a relative proxy for visual complexity.

Key Insights and Ideas

  • Dynamics alone aren't enough—you need a verifiable gap: The authors prove (Proposition 2) that infinitely many ODE velocity fields can generate the exact same probability path $p_t$ while having wildly different Jacobian spectra (just stir the probability around with divergence-free curls!). Thus, no estimator can work blindly on every possible ODE. JaSpec-LID succeeds because generative training naturally compresses mass into thin normal tubes (Proposition 1), creating a Jacobian-normal dominance gap that you can visually verify in the spectrum before trusting the output.
  • Built-in failure detection: The transition-mass heatmap acts as a self-diagnostic. If a model is undertrained or operating at too high a noise level, the zero-mass valley disappears—warning the user not to trust the LID estimate.
  • Unifying old and new: On linear diffusion models, JaSpec-LID mathematically recovers prior Hessian-based LID estimators as a special case, while swapping expensive second-order Hessian-vector products for cleaner first-order Jacobian-vector products.

Key Results

  • Near-perfect diffusion accuracy: On VP-SDE synthetic benchmarks up to $D=3072$, exact JaSpec-LID achieves MAE = 0.00 on the vast majority of settings where no prior generative baseline hits zero. On the hardest 3072D nonlinear mixture ($\mathcal{F}^{10+80+200}$), JaSpec-LID gets an MAE of 0.49, beating the strongest baseline (LHSD-Exact at 5.45) by over an order of magnitude, while score-divergence methods like FLIPD collapse (1240.89).
Main VP-SDE diffusion results showing JaSpec-LID achieving zero or near-zero MAE across dimensions up to D=3072.
  • First generative LID on Flow Matching: On OT-CFM models—where FLIPD, NB, and LHSD cannot run at all—exact JaSpec-LID achieves 0.00 MAE on 100D and 1024D affine mixtures, and 2.00 to 4.86 MAE on 3072D affine and squiggly mixtures (compared to >75 MAE for model-free k-NN baselines).
  • Natural image complexity ordering: Across CIFAR-10, LAION, and ImageNet, JaSpec-LID achieves higher Spearman rank correlation with lossless PNG size (0.856, 0.560, and 0.656, respectively) than all diffusion and model-free baselines, cleanly separating simple silhouettes from rich, cluttered textures.

Limitations and Future Work

  • Garbage-in, garbage-out: Like all model-based estimators, JaSpec-LID relies on how well the generator learned the manifold. Underfitting, scarce data, or high-noise regimes can blur the tangent-normal spectral gap.
  • Coupling curvature in Flow Matching: Optimal-Transport Conditional Flow Matching (OT-CFM) exhibits slightly higher error on squiggly nonlinear manifolds than VP-SDE diffusion (e.g., 3.84 vs. 2.61 MAE at 1024D) because OT couplings induce narrower spectral gaps.
  • SLQ scale vs. ranking: While the fast SLQ approximation ranks images almost identically to higher-budget runs, its absolute LID scale converges more slowly—making the exact SVD path preferable whenever $D \lesssim 10^3$.
  • Future directions: Applying JaSpec-LID directly to detect training-data memorization in production flow-matching models (like Stable Diffusion 3), tracking how Rectified Flows sharpen the Jacobian gap across straightening iterations, and designing coupling-aware $(t_\star, \tau)$ schedules for OT-CFM.

Summary updated

BibTeX
@inproceedings{ishii2026jaspec,
  author = {Hiro Ishii and GENKI OSADA},
  title = {{JaSpec-LID: Local Intrinsic Dimension Estimation via Jacobian Spectra of ODE-based Generative Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=otXI54Uzfq},
}
Figure