How Many Dimensions Does Meaning Need?

Concepts

CHAPTER 07 — HOW MANY DIMENSIONS DOES MEANING NEED?

PART II — INSIDE THE SPACE

PURPOSE

Separate nominal dimension from the degrees of freedom a representation actually uses. Define and compute effective rank, participation ratio, intrinsic dimension, and stable rank, explain the gap, and show truncation economics.

CENTRAL QUESTION

How large is the space a representation actually occupies, and which “dimension” number should be reported?

UNIQUE CLAIM

Nominal dimension is a model spec, not a data property. Large redundancy is typical, so SOME compression is safe — but geometric redundancy predicts the DIRECTION of compressibility, not the MAGNITUDE: the safe truncation dimension is set by the most dimension-sensitive downstream task (classification/clustering compress to <1% of dims while retrieval/STS need 10–25% on identical embeddings — Tsukagoshi & Sasano 2025), the retention-curve knee is NOT the intrinsic-dimension estimate, and Johnson–Lindenstrauss does not predict it (JL bounds random-projection pairwise-distance distortion of a fixed point set only). Governing rule: geometry can suggest redundancy; only a task-preservation experiment can authorize compression.

THE OBJECT

Geometry — the variance spectrum and manifold dimension. MEASURED (Wave 2 rows 2.2-2.7, mpnet-base on RELATE v0.1): nominal 768 -> 95%-var 205 -> participation ratio 67 -> effective rank 387 -> MLE-ID 6.8 / TwoNN-ID 4.2. Per-task PCA-truncation knee (tol 5%): clustering 8, hard-negative 8, retrieval 24, STS-proxy 32 - task-set, not spectrum-set. knee/TwoNN-ID ratio 1.9x-7.6x (not constant). PCA > random projection > Matryoshka-prefix on dimension-efficiency; PCA does not trade away hard-negative structure at small d (there was none). Whitening (Ch8 row 2.9) hurts these normalized encoders.

CONCEPTS INTRODUCED

Nominal d; rank (uninformative, =d with noise); effective rank = exp(spectral entropy); participation ratio (Σσ²)²/Σσ⁴; intrinsic dimension via TwoNN / MLE local estimators (estimator- and task-dependent, can disagree 2x); stable/entropy rank ‖X‖_F²/‖X‖_2²; the three-way distinction (post-hoc PCA / Matryoshka prefix / learned compression — three degradation curves); a truncated space is a new derived space; JL lemma scoped precisely (random projection, pairwise distances, fixed point set — not a PCA spectrum, not task structure, not near-neighbour ordering); task-specific compressibility (ID by MTEB task family).

CONCEPTS DEVELOPED / REUSED

Anisotropy from Ch5 as a cause of the spectrum/effective-rank gap; variable local dimension from Ch6 formalized; low ID linked to mode collapse and the Hallucination book’s “safe but useless”; feeds Ch8 (shape comparison), Ch13 (model comparison), Ch22 (compression).

PREREQUISITES

Ch1–6. SVD, PCA, Shannon entropy, nearest-neighbor distance ratios.

LOCAL INVARIANTS

Never report nominal d as capacity; keep effective rank and intrinsic dimension distinct; never choose a storage dimension without a per-task retention curve; the knee is not the ID estimate; a truncated / whitened / prefix space is a new derived space (new space_hash, new calibration); do not cite JL to justify a PCA dimension; verify a big model actually uses its dimensions.

FAILURE MODES

Nominal-dimension-as-capacity; conflating effective rank with intrinsic dimension; truncating without a per-task retention curve (the knee is task-set, not spectrum-set, and not the ID); citing JL to justify a PCA dimension; treating a truncated index as “the same space, smaller”; assuming larger models use more of their dimensions.

DIAGNOSTIC METHOD

  1. Center matrix, run SVD, plot spectrum (log). 2. Compute effective rank, participation ratio, stable rank. 3. Estimate intrinsic dimension with two estimators + CI (note task-subset dependence). 4. PCA-truncation sweep scored SEPARATELY per task (retrieval, similarity, clustering, hard-negative); find each task’s knee; compare knee to effective rank / ID / 2·ID / 95%-variance d.

RESEARCH-DERIVED IDEAS

Effective rank (Roy & Vetterli, EUSIPCO 2007); participation ratio (condensed-matter physics origin — Bell & Dean 1970; ML/neuroscience use via Gao et al. 2017); intrinsic dimension estimators — TwoNN (Facco et al., Sci Rep 2017, doi:10.1038/s41598-017-11873-y), MLE (Levina & Bickel, NIPS 2004); ID of DNN representations predicts accuracy (Ansuini et al., NeurIPS 2019); ID of image datasets low despite pixel count (Pope et al., ICLR 2021); ID non-monotone across transformer depth (Valeriani et al., NeurIPS 2023); Johnson–Lindenstrauss lemma (1984) — scoped precisely; Matryoshka Representation Learning (Kusupati et al., NeurIPS 2022, 2205.13147); SMEC (Zhang et al., EMNLP 2025, 2510.12474); task-dependent compressibility + ID-by-task (Tsukagoshi & Sasano, Findings ACL 2025, 2506.01435); DR + quantization compose to 0.1% bytes, task-dependent (Kisako et al., 2606.01074).

EXPERIMENT / LAB

Lab 7 (PROPOSED): singular-value spectrum plot; effective rank / participation ratio / stable rank; two ID estimators compared; PCA-truncation sweep at {full, 256, 128, effRank, 2·ID, ID, ID/2} scored per task (retrieval R@10/MRR, similarity Spearman, clustering ARI, hard-negative agreement). Deliverable: a retention curve PER TASK, each knee, and each knee’s ratio to effective rank / ID / 2·ID / 95%-variance d — does any single geometric ratio predict the knee across tasks? Repeat on a second domain split and a second model.

COMPANION COMPONENT

dimensionality_report(space, corpus): nominal_d, effective_rank, participation_ratio, intrinsic_dim (+estimator +CI), spectrum, safe_truncation {task: d} (per-task table, NOT one number), binding {corpus_hash, space_hash, tolerance, method}. Observatory picks storage size from the tightest task served, registers the truncated space as a new derived space, flags low capacity utilization.

READER OUTCOME

Reader can compute the real dimensionality of any embedding space, run a per-task retention curve, and choose a storage dimension from a task-preservation experiment rather than from the model card or a spectrum statistic.

DEPENDENCIES

Ch1–6.

FORWARD BRIDGE

Ch8 “The Shape of an Embedding Space” — having counted the directions used, measure how they are used (anisotropy, concentration, dominant directions) and compare the geometry several models impose on one corpus.

ANTI-CLAIMS / LIMITS

No universal target dimension (corpus/task dependent); the knee is NOT claimed to be at the intrinsic dimension; PCA truncation to d=ID does not reconstruct a curved manifold; low intrinsic dimension is not always bad (tight domains); JL is not “the floor of meaning”; the per-task retention curves are MEASURED (Wave 2) on one corpus + primarily one model; the “task-restricted effective rank predicts the knee” idea remains a BOOK HYPOTHESIS — the between-relation-scatter rank (5.4) lands near the relation-separation knee but the retrieval-restricted rank overshoots, so it is a lead, not a law.

Explain this chapter with AI

Copy this prompt into ChatGPT, Claude, Gemini, a local model, or another AI.

Apply this chapter with AI

Copy this prompt into ChatGPT, Claude, Gemini, a local model, or another AI.

Part II — Inside the Space

A 1,536-number vector that isn’t

Your embedding model outputs 1,536 floats. Take 50,000 of its vectors, stack them, run SVD, and plot the singular values. Typically:

first ~20 singular values:     large, falling fast
next ~150:                     moderate, gentle slope
remaining ~1,350:              tiny, near the noise floor

Reconstruct every vector from just the top 200 components. Re-run retrieval. Recall@10 barely moves. The other ~1,300 dimensions were carrying almost no variance that mattered for the task.

The advertised dimension is 1,536. The number of directions the representation actually uses, on this corpus, is a few hundred.

How large is the space a representation actually occupies — and which of the many “dimension” numbers should you report?

Nominal vs. effective — six measures

  • Nominal dimension d. The length of the array. A model spec, not a property of the data.
  • Rank. The number of non-zero singular values. Almost always = d for real data (noise fills every direction), so rank alone is uninformative.
  • Effective rank (spectral entropy). exp(H(p)) where p are the normalized singular values and H is Shannon entropy. Answers “how many directions, weighted by how much variance they carry?” Typical contextual spaces: tens to low hundreds.
  • Participation ratio. (Σσᵢ²)² / Σσᵢ⁴. Another “how many directions matter” scalar, more sensitive to the tail. Often close to effective rank.
  • Intrinsic dimension (ID). The dimension of the manifold the data lies on, estimated locally (e.g. by the ratio of distances to the 1st and 2nd neighbors — the TwoNN / MLE estimators). Usually much smaller than effective rank — often 5–30 for sentence embeddings.
  • Entropy / stable rank. ‖X‖_F² / ‖X‖_2² — variance spread relative to the largest direction. A quick anisotropy-aware capacity proxy.

These measure different things. Effective rank is about the global variance spectrum. Intrinsic dimension is about the local geometry of the data cloud. A space can have effective rank 150 and intrinsic dimension 12.

Why the gap exists

  • Correlated features. Many learned directions co-vary; PCA collapses them.
  • Anisotropy (Chapter 5). A dominant direction eats a large share of variance, leaving less for the rest.
  • The manifold is thin. Real text does not fill the space; it traces a low-dimensional surface embedded in it.
  • Training does not penalize unused dimensions. There is no pressure to spread information across all d axes.

Why it matters practically

  • Large redundancy is typical; the safe amount of compression is task-specific. Modern embedding spaces carry far more nominal dimensions than any one task needs — keeping the first quarter of the dimensions is often near-lossless averaged over tasks (Tsukagoshi & Sasano, 2025). But “averaged over tasks” hides an order-of-magnitude spread: on the same embeddings, classification and clustering can survive reduction to under 1% of the dimensions while retrieval and semantic-similarity degrade at 10–25%. Redundancy tells you some compression is safe. Only a per-task retention curve (below) tells you how much.
  • Effective rank is a model comparison axis. Two models at d = 768 can have effective ranks of 90 and 300. The second is using its capacity; the first may be wasting it or may be more efficient — depends on task performance (Chapter 8, 13).
  • Low intrinsic dimension warns about redundancy and mode collapse. If ID drops to 3, the model may be mapping everything to a few templates (related to the “safe but useless” failure in the Hallucination book). The intrinsic dimension of a trained representation is tied to how well it does its job — in vision networks the last layer’s ID predicts test accuracy (Ansuini et al., 2019).
  • Johnson–Lindenstrauss is narrower than it looks. The JL lemma (1984) guarantees that a random linear projection to O(ε⁻² log n) dimensions preserves all pairwise Euclidean distances of a fixed set of n points within a factor 1 ± ε. That is all it guarantees. It does not describe a PCA spectrum (PCA is data-adaptive; JL is not), it does not bound the dimension a task needs, and — critically — a 1 ± ε distance distortion can still reorder near-neighbours (two candidates 0.02 apart can swap under a 10% distortion), and retrieval lives on that order. Use JL as a ceiling on random-projection index dimension, not as a floor on meaning.

Three operations people call “truncation”

They are not the same, and each produces a new embedding space with its own identity (Chapter 17):

operation what it is degradation
Post-hoc PCA / prefix truncation of an ordinary model SVD the corpus, keep the top-k components (or first k raw dims) graceful near the top, then a task-dependent knee; PCA discards low-variance directions first — often exactly where rare-but-decisive signal lives
Matryoshka prefix truncation first k dims of a model trained with a nested multi-granularity loss (Kusupati et al., 2022) graceful by construction at the trained sizes; aggressive prefixes still need care (SMEC, Zhang et al., 2025)
Learned compression train a small projection (autoencoder, adapter, SMEC) to k dims for a task can beat both when the objective matches the task; not invertible

Post-hoc PCA of an ordinary model and prefix truncation of a Matryoshka model are different operations with different curves — the dimensionality report treats each as a distinct method.

Compressibility is task-specific

The clearest evidence comes from Tsukagoshi & Sasano (2025), who measured intrinsic dimension and compression tolerance across eight embedding models on four MTEB task families. The intrinsic dimension is not one number for a model — it depends on what the embeddings are being asked to do:

task family        TwoNN intrinsic dimension (across 8 models)
classification            22 – 37
clustering                11 – 17
retrieval  (queries)      32 – 51
retrieval  (passages)     ~35
semantic similarity       34 – 42

Classification and clustering embeddings sit on a lower-dimensional, more anisotropic manifold and tolerate compression to under 1% of the nominal dimension. Retrieval and semantic-similarity embeddings occupy more of the space and degrade earlier. This is the same model, the same weights, the same singular-value spectrum — the compressibility changes because the task changes which directions matter.

Geometry can suggest redundancy. Only a task-preservation experiment can authorize compression.

Demonstration: RELATE’s real dimensionality

MEASURED on RELATE v0.1, Wave 2 rows 2.2–2.7 — artifacts under experiments/embeddings-from-first-principles/wave2/artifacts/. Primary model all-mpnet-base-v2 (768-d); STS uses a RELATE-native relation→similarity proxy, not human labels.

Embed all 1,173 RELATE items with all-mpnet-base-v2 and measure the space’s real size (row 2.2):

nominal dimension              768
95%-of-variance dimension      205
participation ratio             67
effective rank (spectral)      387
intrinsic dimension (MLE, k=10)  6.8
intrinsic dimension (TwoNN)     4.2

Five different “sizes,” spanning two orders of magnitude — and the two intrinsic-dimension estimators land at single digits, lower even than the ~10–40 the representation-manifold literature reports (RELATE’s templated items sit on unusually flat local patches).

Now the PCA-truncation sweep, scored per task (row 2.3), with the knee marked at the smallest d still within 5% of full:

d kept       retrieval nDCG@10   STS ρ   clustering ARI   hard-neg margin
768               0.952          0.634       0.392            0.113
256               0.953          0.639       0.392            0.113
 64               0.948          0.634       0.432            0.122
 32               0.927          0.607       0.438            0.132
 24               0.913  ← knee  0.576       0.435            0.141
 16               0.874          0.550       0.439            0.127
  8               0.722          0.525       0.435  ← flat     0.129
knee (tol 5%)      24             32          8                8

Read the knees: 8 for clustering and hard-negative discrimination, 24 for retrieval, 32 for the STS proxy — a task-specific spread of 24. Clustering ARI actually rises as you compress (the extra 700+ dimensions are noise for k-means); the hard-negative margin is flat-to-slightly-up (there was never fine polarity/role structure in the geometry to lose).

The knee is not any single geometric quantity (row 2.4). knee ÷ TwoNN-ID runs from 1.9× (clustering) to 7.6× (STS) — not a constant. knee ÷ effective-rank is 0.02–0.08; knee ÷ 95%-variance-dim is 0.04–0.16. PCA-truncating to d = ID (~5) gives retrieval nDCG 0.72 — a 24-point drop. A linear projection to the intrinsic dimension does not reconstruct a curved manifold.

The one predictor that does better than chance (row 2.5, still a BOOK HYPOTHESIS): the effective rank of the between-relation scatter — the subspace that separates the typed relations — is 5.4, close to the relation-separation knee (8) and far better than the full effective rank (387, ~48× too big). But the analogous retrieval-restricted rank (75) overshoots the retrieval knee (24) by 3×. A task-restricted rank is the most promising knee predictor found so far; it is not yet a law.

Operator choice matters too (rows 2.6–2.7). Retrieval knee by compression method: post-hoc PCA 24 < random Gaussian projection 48 < Matryoshka-prefix truncation 64 (the Matryoshka arm is mxbai-embed-large-v1, a different, more anisotropic model — so this compares operators on their native models). And PCA beats random projection on both retrieval and the hard-negative margin at every d — the hypothesis that PCA would sacrifice fine structure to variance did not hold, because that fine structure was never there.

MEASURED: quality is flat, then a knee, then collapse — and the knee is task-set, not spectrum-set. It is not the intrinsic dimension, not the effective rank, not the 95%-variance dimension. Some compression is always safe (clustering and hard-negative discrimination survive d = 8); how much is a per-task retention curve you have to run.

What this chapter establishes and what it does not

Establishes: nominal dimension is a spec, not a measurement; effective rank, participation ratio, and intrinsic dimension are distinct, computable quantities; the gap between them is large and explained; large redundancy is typical, so some compression is safe.

Does not establish: a universal target dimension (measured on RELATE it ranged from d = 8 for clustering to d = 32 for the STS proxy on one model); that low intrinsic dimension is always bad (tight domains legitimately have low ID); a spectrum ratio that predicts the knee (row 2.4 — none does; the knee/ID ratio is itself task-dependent, 1.9×–7.6×). It establishes that you must compute these numbers and run a per-task retention curve before choosing a storage dimension, and that post-hoc PCA is a stronger compressor than random projection or (on RELATE) Matryoshka-prefix truncation.

Lab 7: measure the real size of your space

PROPOSED, not executed.

Setup. Embed 2,000+ items. Center the matrix. Run SVD.

Task.

  1. Plot the singular-value spectrum (log scale).
  2. Compute effective rank, participation ratio, stable rank.
  3. Estimate intrinsic dimension with two estimators (TwoNN and MLE); compare — they can disagree by 2×, and the estimate depends on which subset of the data you feed them.
  4. PCA-truncation sweep: d ∈ {full, 256, 128, effRank, 2·ID, ID, ID/2}; score each task separately — retrieval Recall@10/MRR, similarity Spearman, clustering ARI vs full-dim, hard-negative agreement.
d kept variance retained retrieval R@10 similarity ρ clustering ARI hard-neg agree
full 1.00
effective rank
2 × intrinsic dim
intrinsic dim

Success criterion. A retention curve per task, the knee of each, and the ratio of each knee to (effective rank, TwoNN-ID, ID, 95%-variance d). On RELATE v0.1 with mpnet-base the answer was: no single geometric ratio predicts the knee across tasks — the knee/ID ratio alone spans 1.9×–7.6× (row 2.4). The one lead worth chasing is the effective rank of the task-restricted subspace (row 2.5). Repeat on a second RELATE domain split and a second model.

Companion component: the dimensionality report

dimensionality_report(space, corpus):
  nominal_d:          int
  effective_rank:     float
  participation_ratio: float
  intrinsic_dim:      float  (+ estimator, + CI)
  spectrum:           singular values
  safe_truncation:    { task: d_within_tolerance }     # per task, NOT one number
                      # e.g. {retrieval: 256, clustering: 96, sts: 300}  — from a measured retention curve
  binding:            { corpus_hash, space_hash, tolerance,
                        method: pca_posthoc | whitening_posthoc | matryoshka_prefix | learned_projection }

A single “safe dimension” is a category error: the d that holds retrieval within tolerance can destroy signal a clustering, classification, or hard-negative task needs (Tsukagoshi & Sasano, 2025), and the four methods above have four different degradation curves. The report therefore carries a table keyed by task, populated from a measured retention curve, bound to a specific corpus and space. The Observatory picks the storage dimension from the tightest task it must serve, registers the truncated space as a new derived space (Chapter 17) with its own space_hash and its own calibration, and flags a model whose effective rank is a small fraction of its nominal d as “low capacity utilization — verify it is not just inefficient.”

Failure modes

  • Reporting nominal dimension as capacity. “It’s a 1,536-dim model” says nothing about how much it uses.
  • Confusing effective rank with intrinsic dimension. Global spectrum vs. local manifold — different numbers, different uses.
  • Truncating without a per-task retention curve. The safe dimension for retrieval can be far too small for clustering or hard-negative discrimination, and vice versa. The knee is task-set, not spectrum-set — and it is not the intrinsic-dimension estimate.
  • Citing Johnson–Lindenstrauss to justify a PCA dimension. JL is about random projections and pairwise distances; PCA is data-adaptive and JL says nothing about it, nor about near-neighbour ordering.
  • Treating a truncated index as “the same space, smaller.” It is a new derived space (Chapter 17) — new space_hash, new calibration.
  • Assuming a bigger model uses its dimensions. Sometimes the opposite; measure.

What this chapter established

  • Six “dimension” quantities: nominal, rank, effective rank, participation ratio, intrinsic dimension, stable rank — and what each measures.
  • The gap between nominal and effective/intrinsic dimension is large, and explained by correlation, anisotropy, thin manifolds, and no training pressure to spread.
  • Large redundancy is typical, so some compression is safe — but the safe amount is task-specific (classification and clustering compress far harder than retrieval and similarity on identical embeddings), the knee of the retention curve is not the intrinsic-dimension estimate, and it must be measured per task.
  • Post-hoc PCA, Matryoshka prefix truncation, and learned compression are three different operations; each produces a new derived space.
  • Johnson–Lindenstrauss guarantees only that a random projection preserves pairwise distances of a fixed point set — not a PCA spectrum, not task structure, not near-neighbour ordering.
  • The dimensionality report, with a safe_truncation table keyed by task (from a measured retention curve) and a method field, that the Observatory uses to choose storage size.
  • Governing rule: geometry can suggest redundancy; only a task-preservation experiment can authorize compression.

Next

We have measured how many directions the space uses. The next chapter measures the shape of how it uses them — anisotropy, concentration, dominant directions, covariance structure — and compares what geometry several real models impose on the identical corpus.