Work

Derivation of the Sample-Size Scaling of TWO-NN Intrinsic-Dimension Estimates from Molecular Dynamics Trajectories

Year: 2026
Type: preprint
Abstract: The intrinsic dimension of a dataset is the number of independent directions needed to describe the space occupied by its data. Nearest-neighbor estimators infer it from how the probability of finding a neighbor grows around each sampled point. Because the neighbor distances $r$ decrease as the sample grows, the estimated dimension can depend strongly on the number $N$ of available points, which in molecular dynamics is set by trajectory length and saving frequency. We derive the large-sample behavior of the TWO-NN estimator for data drawn from a smooth $d$-dimensional space. The typical nearest-neighbor distance scales as $N^{-1/d}$, and smooth deviations from local uniformity produce corrections in powers of $N^{-2/d}$. Isotropic noise adds a correction proportional to $N^{+2/d}$; for a five-dimensional hyperplane in 100 noisy features, the extended expansion recovers the dimension within a few percent when noise is moderate. We test the scaling on ten independent 100 $μ$s simulations of alanine dipeptide, represented by the pairwise distances among its ten heavy atoms, whose geometric dimension is $3n_{\mathrm{at}}-6=24$. Over the investigated range, the estimate does not depend systematically on the temporal spacing between configurations, but increases from $7.6$ to $15.6$ as $N$ grows from $10^2$ to $2\times10^5$. Extrapolations that retain corrections through $r^2$, $r^4$, and $r^6$ give limiting dimensions of $24.81$, $23.47$, and $25.30$, respectively. All three estimates lie within 6% of the known dimension and bracket it, and their spread measures the uncertainty due to truncation. The derived scaling provides a practical route from finite-sample estimates to the geometric dimension.
Institution: University of Milan
Language: English
Open Access status: green
OpenAlex ID: W7211870502
Cites: 5
Cited by:
Related to: 10