TL;DR
When extracting embeddings from pretrained language models, defaulting to the final layer often leaves significant performance—and compute—on the table. By analyzing the unlabeled geometric shape of representations inside 25 different models, the authors introduce a simple, zero-parameter mathematical formula that pinpoints the best intermediate layer to use before you ever touch a downstream label. Better yet, sometimes that optimal layer is right near the bottom, meaning you can chop off the top 80% of your model, run inference 5× faster, and still get better accuracy.
What Problem Does This Paper Address?
Suppose you want to use a pretrained foundation model (like BERT, T5, or Qwen) as a feature extractor for a downstream task. Which layer do you pull embeddings from? Almost everyone grabs the final layer out of habit. Yet we have known for years that intermediate layers often hold richer, more transferable representations, while final layers get overly specialized for the model's pretraining objective.
The catch is that finding the "sweet spot" usually requires training a supervised classifier (a probe) on every single layer—an expensive brute-force sweep that defeats the purpose of quick, low-label transfer learning. The authors ask two fundamental questions: Where does representation quality actually live across different architectures and tasks, and can we find that optimal layer just by looking at the raw, unlabeled geometry of the embeddings?
Methods
Think of a layer’s embeddings across a small sample of inputs (just 10% of unlabeled data) as a high-dimensional point cloud. Intuitively, a great transfer layer shouldn't collapse all points onto a single line, nor scatter them into noisy chaos.
To formalize this without training any parameters, the authors propose the Stable Geometry Index (SGI). While previous methods relied on single metrics like effective rank or isotropy, SGI combines four distinct signals into a fixed, closed-form additive score ($G_\ell = R_\ell + C_\ell + S_\ell + P_\ell$) normalized across a model's layers:
- Spectral Capacity ($C_\ell$): Uses singular-value Shannon entropy (effective rank) to reward layers that spread information broadly across many orthogonal directions.
- Spectral Residual Structure ($R_\ell$): Fits a power law to the singular value spectrum and rewards deviations from a clean fit (low $R^2$), capturing structured, non-random information.
- Stability ($S_\ell$): Combines the spectral condition number (preventing extreme sensitivity to tiny directions) with the TwoNN estimator of local intrinsic dimensionality (ensuring points nicely populate their local neighborhoods).
- Depth Prior ($P_\ell$): A gentle mathematical nudge peaking at 80% depth ($d=4/5$) to break ties in favor of deeper features over shallow lexical ones.
Datasets
No new datasets were introduced; instead, the authors conducted a massive sweep across 13 established benchmarks from MTEB and GLUE spanning four task categories:
- Classification: SST-2, AG News, Emotion, Banking77
- Pair Classification: SNLI, MultiNLI, MRPC, QQP
- Semantic Textual Similarity (STS): STS-B, BIOSSES
- Multiple-Choice QA: ARC, HellaSwag, PIQA
Key Insights and Ideas
- Peak layers follow strict rules, not randomness: Where quality lives depends heavily on how you pool tokens and how the model was trained. For instance, mean-pooling token embeddings peaks in the first third of the model 61.1% of the time (capturing early token-level evidence), whereas
[CLS]token readouts peak late 66.8% of the time (relying on deep aggregation).
- Reversing a spectral-decay assumption: Literature on heavy-tailed self-regularization usually looks at the exponent of a spectrum's power-law decay. The authors discover that how poorly a single power law fits (the residual deviation) is actually a much stronger predictor of representation quality than the exponent itself.
- Free model pruning: Because SGI's depth prior pushes toward deeper layers, SGI only picks a shallow layer when the geometric evidence is overwhelming. In 22% of encoder evaluations, SGI selects a layer in the bottom 20% of the network—acting as a label-free pruning signal that lets you drop the upper 80% of layers for a 5× compute reduction while improving downstream accuracy.
Key Results
Evaluated across 25 models (66M–581M parameters across encoders, encoder-decoders, decoders, and Mamba) plus a scaling probe up to 4B parameters:
- Beating the final layer & single metrics: Across 383 encoder evaluation groups, SGI beats the final-layer baseline by +1.20 percentage points (pp), recovering 40% of the oracle gap without seeing a single label. It lifts Hit@3 (picking one of the top 3 layers) from 0.389 to 0.517, easily beating the best single-metric baseline, RankMe (0.428).
- Outperforming supervised layer mixing: On a matched
[CLS]subset ($n=191$), SGI's zero-label single-layer pick beats a supervised ELMo-style learned weighted average of all layers by 1.41 metric points (0.697 vs. 0.683), likely because supervised mixes can overfit or get diluted by noisy layers. - Cross-family & scaling wins: SGI shines brightest where representations reorganize heavily across depth, yielding +6.51 pp on encoder–decoders and +2.33 pp on sentence transformers. In the larger-model probe, it delivers +5.11 pp on DeBERTa-v3-large, +4.96 pp on Mamba-2.8B, and +0.89 pp on Qwen3.5-4B.
Limitations and Future Work
SGI is not magic on every task: on decoder-only models (+0.11 pp) and multiple-choice QA (+0.06 pp), the final layer is already well-aligned with endpoint answer scoring, leaving very little oracle gap to recover. Furthermore, geometry measures structural readiness, which does not strictly guarantee that downstream class labels are linearly separable. For future work, the authors suggest extending geometric selectors to open-ended text generation and retrieval, as well as using SGI not just as a hard single-layer selector, but as a smart initialization prior for lightweight layer-mixing and knowledge distillation.
Summary updated