Intrinsic vs. Embedding Dimensionality#
A central question in neural signal analysis is: how many independent degrees of freedom generate the observed signal?
Two fundamentally different approaches give different — and differently useful — answers:
Approach |
Measures |
Method |
Mechanistic insight? |
|---|---|---|---|
Embedding dimensionality |
Variance components needed to represent the signal |
PCA on windowed time series |
✗ Captures variance, not dynamics |
Intrinsic dimensionality |
Number of oscillatory modes generating the signal |
Delay embedding → AR root analysis |
✓ Maps directly to oscillatory generators |
This tutorial demonstrates the distinction using synthetic LFP signals with known ground truth. We show that PCA embedding dimensionality can mislead — especially with \(1/f\) noise and nonstationarity — while intrinsic dimensionality via delay embedding reveals the true dynamical structure and provides mechanistic insight into the generating process.
1. Synthetic LFP with Controlled Oscillatory Content#
We construct stationary AR processes where the number of oscillatory modes \(K\) is exactly controlled. Each mode \((f_k, r_k)\) contributes a pair of complex conjugate poles to the AR characteristic polynomial, producing a spectral peak at frequency \(f_k\) with sharpness governed by the pole radius \(r_k\).
Three signals are generated with increasing oscillatory complexity:
K = 1 — single alpha-band oscillation (10 Hz)
K = 2 — alpha + low-gamma (10, 30 Hz)
K = 3 — theta + beta + gamma (8, 20, 45 Hz)
/tmp/ipykernel_3768243/3016928409.py:70: UserWarning: This figure includes Axes that are not compatible with tight_layout, so results might be incorrect.
plt.tight_layout()
2. PCA Embedding Dimensionality#
The standard approach to estimating “dimensionality” of a neural time series is to construct a Hankel matrix (sliding windows of length \(L\)) and apply PCA. The number of principal components needed to explain 95 % of variance is taken as the embedding dimensionality.
This measures how many linear components are needed to represent the signal’s covariance structure — but it does not directly reveal the number of dynamical modes generating the signal. In particular:
Each oscillatory mode contributes two variance directions (sine + cosine), so PCA systematically overestimates.
Background noise adds further components, inflating the estimate.
PCA embedding dimensionality (95% threshold):
K = 1 (10 Hz) → True K = 1, PCA dim = 5
K = 2 (10, 30 Hz) → True K = 2, PCA dim = 5
K = 3 (8, 20, 45 Hz) → True K = 3, PCA dim = 5
3. Intrinsic Dimensionality via Delay Embedding#
Our approach reconstructs the state-space manifold of the signal using Takens delay embedding:
The resulting trajectory lies on a low-dimensional manifold whose topology reflects the number of oscillatory modes:
K = 1 mode → 1-torus (ring / limit cycle)
K = 2 modes → 2-torus (donut)
K = 3 modes → 3-torus (nested loops)
This intrinsic dimensionality (\(= K\)) is a property of the dynamics, not of the variance structure. It directly answers: how many independent oscillatory generators produced this signal?
AR Root Analysis — Recovering Oscillatory Modes#
Fitting an AR model and examining the roots of the characteristic polynomial directly identifies individual oscillatory modes. Complex conjugate root pairs near the unit circle correspond to sustained oscillations; their angular positions give the frequencies:
This is the core of intrinsic dimensionality: we recover which oscillatory generators produced the signal and at what frequencies — mechanistic insight that PCA cannot provide.
Intrinsic dimensionality (AR root analysis):
K = 1 (10 Hz) → True K = 1, recovered K = 1
K = 2 (10, 30 Hz) → True K = 2, recovered K = 2
K = 3 (8, 20, 45 Hz) → True K = 3, recovered K = 3
4. The \(1/f\) Noise Challenge#
Real neural recordings contain broadband \(1/f^\alpha\) background activity. This “aperiodic” component has dramatic effects on PCA-based dimensionality estimates: it adds slowly decaying eigenvalues that inflate the apparent dimensionality.
By contrast, delay embedding is robust: the \(1/f\) background adds thickness to the manifold but does not change its topology. The torus structure — and hence the intrinsic dimensionality — is preserved.
We demonstrate this on the K = 2 signal with additive noise of increasing spectral exponent α.
PCA dimensionality with noise (K = 2, true modes = 2):
White ($\alpha=0$) → PCA dim = 85
Pink ($\alpha=1$) → PCA dim = 34
Brown ($\alpha=2$) → PCA dim = 5
5. Nonstationary Dynamics: Time-Varying AR#
Real LFP signals are nonstationary — the spectral content changes over time as brain states evolve. PCA on the full signal’s Hankel matrix conflates different time epochs, producing a blurred dimensionality estimate that reflects neither the early nor the late dynamics.
Delay embedding, by contrast, traces a continuous trajectory on the manifold. As the AR coefficients evolve, the trajectory smoothly deforms, but the manifold topology is preserved as long as the number of oscillatory modes remains constant.
6. Summary: Embedding vs. Intrinsic Dimensionality#
We now compare all dimensionality estimates side-by-side. For each signal, we report:
PCA dim (white noise) — clean signal driven by white noise
PCA dim (\(1/f\) noise) — signal contaminated with pink (\(1/f\)) background
AR roots (intrinsic) — number of oscillatory modes recovered from AR root analysis
True K — ground-truth number of modes
Signal True K PCA (white) PCA (1/f) AR roots
───────────────────────────────────────────────────────────────────────────
K = 1 (10 Hz) 1 5 33 1
K = 2 (10, 30 Hz) 2 5 34 2
K = 3 (8, 20, 45 Hz) 3 5 34 3
Key Takeaways#
PCA Embedding Dimensionality |
Intrinsic Dimensionality (Ours) |
|
|---|---|---|
What it captures |
Number of variance components |
Number of oscillatory modes |
Mechanistic? |
✗ — purely statistical |
✓ — identifies physical generators |
Robust to \(1/f\) noise? |
✗ — inflated by aperiodic background |
✓ — topology preserved |
Nonstationary signals? |
✗ — conflates time epochs |
✓ — tracks evolving dynamics |
Output |
A number (dim = N) |
K modes at specific frequencies |
Bottom line: Embedding dimensionality (PCA) answers “how many components explain the variance?” — a descriptive question. Intrinsic dimensionality via delay embedding and AR root analysis answers “how many oscillatory generators drive the signal, and at what frequencies?” — a mechanistic question that reveals the dynamical architecture of the system.
For real neural recordings where the goal is to understand the underlying circuit dynamics, intrinsic dimensionality provides the more informative and robust characterisation. See the model tutorial for how DeepLagField recovers time-varying AR coefficients from real data to reconstruct these manifolds.