Audited (legacy) 2026

Spectral Budgeted Embeddings

Implementation & benchmark of arXiv:2608.24592 — Optimal Allocation of Embedding Dimensions under Finite-Sample Constraints

Usefulness7/10
Difficulty4/10
Novelty6/10

Source paper: Optimal Allocation of Embedding Dimensions under Finite-Sample Constraints arXiv:2608.24592 ⓘ · analyzed Aug 29, 2026

AI-generated research hypothesis, automatically tested. Not peer-reviewed.

Idea description

Replace uniform embedding dimensions with a globally budgeted allocation based on the estimated spectral complexity of each categorical feature. Tables whose category representations have large leading singular-value energy receive more dimensions, while high-cardinality tables are penalized because each extra dimension consumes more parameters.

Formulas

$$f(\mathbf{x};\Theta)=\mathbf{w}^{\top}\boldsymbol{\phi}(\mathbf{x})+b,$$
$$\boldsymbol{\phi}(\mathbf{x})=\Bigl[\mathbf{z}(\mathbf{x})^{\top},\;\mathbf{u}_{1}(c_{1}(\mathbf{x}))^{\top},\;\ldots,\;\mathbf{u}_{m}(c_{m}(\mathbf{x}))^{\top}\Bigr],$$
$$\min_{d_1,\ldots,d_m>0}\;\sum_{j=1}^{m}\frac{V_j}{d_j}\quad\text{s.t.}\quad\sum_{j=1}^{m}c_jd_j\le B,\qquad d_j^{\star}=\frac{B\sqrt{V_j/c_j}}{\sum_{\ell=1}^{m}\sqrt{V_\ell c_\ell}},$$
$$A_j(d)=\sum_{k>d}\sigma_{j,k}^{2},\qquad \Delta_j(d)=A_j(d)-A_j(d+1)=\sigma_{j,d+1}^{2}.$$

Mathematical statement

The model represents a categorical input using f(x;Theta)=w^T phi(x)+b, where x is an input, b is an intercept, w is the downstream linear coefficient vector, and phi(x) concatenates numerical features z(x) with category embeddings u_j(c_j(x)); c_j(x) is the category of predictor j and u_j(c) is its embedding vector. For predictor j, let sigma_{j,1} >= sigma_{j,2} >= ... >= 0 be singular values of a category-representation matrix, and let V_j=sum_k sigma_{j,k}^2 be its total spectral energy. Approximate the truncation error at dimension d_j by A_j(d_j)=V_j/d_j, or estimate A_j directly from a pilot SVD. If c_j is the parameter cost per embedding dimension, typically c_j=N_j for a table with N_j categories, the continuous allocation solves min_{d_j>0} sum_j V_j/d_j subject to sum_j c_j d_j <= B. The Lagrange multiplier calculation gives d_j=B*sqrt(V_j/c_j)/sum_l sqrt(V_l c_l). Thus the square-root rule balances approximation value against per-dimension parameter cost. The exact finite-dimensional implementation can replace V_j/d_j with the measured singular-value tail A_j(d_j)=sum_{k>d_j} sigma_{j,k}^2 and use marginal-gain greedy rounding under the same budget.

Implementation notes

Integrate this at model construction for every categorical embedding table, before full training. Let table j have N_j categories and maximum candidate dimension D_max. First train a cheap pilot model with all tables at D_max for a small number of steps, or initialize each table with a random or learned matrix E_j in R^{N_j x D_max}. Compute a truncated SVD E_j=U_j diag(sigma_j)V_j^T; if a pilot table is unreliable, use category-conditioned hidden-state means or target/residual statistics instead. Set c_j=N_j, or set c_j=N_j multiplied by the number of optimizer states if the budget is intended to count training memory rather than weights. Estimate V_j=sum_k sigma_{j,k}^2, then compute the continuous dimensions using d_j=B*sqrt(V_j/c_j)/sum_l sqrt(V_l c_l). Clamp each dimension to [d_min,D_max], round to integers, and repair the budget by repeatedly adding one dimension to the table with largest marginal gain sigma_{j,d_j+1}^2 per cost c_j, or removing one from the smallest such ratio. Pseudocode: inputs are E_j, N_j, B; obtain singular values; initialize d_j=max(d_min,round(B*sqrt(V_j/c_j)/Z)); while sum_j c_j d_j>B remove argmin_j sigma_{j,d_j}^2/c_j; while budget remains add argmax_j sigma_{j,d_j+1}^2/c_j; replace each embedding table by its selected-width parameter matrix and train normally. The paper-derived quantities are the spectral-tail approximation proxy, parameter budget, and square-root allocation; the pilot spectrum, minimum dimensions, and rounding policy are empirical engineering choices. Start with a small Transformer or tabular MLP on Criteo, Avazu, or a synthetic task with heterogeneous category effects. Compare uniform dimensions and common cardinality heuristics at exactly equal total embedding parameters. Success is higher validation accuracy or lower log loss at fixed parameter count, especially when tables have different category counts and spectral decay; also measure calibration and whether the pilot allocation remains stable across random seeds.

Verification

Audited (legacy)

Stage 1 · Toy mechanism gate: Passed ✓

Stage 2 · Mechanism transferred to benchmark: Not tested

Stage 2 · Practical benchmark result: Not run

Methodology: Toy-system gate first; the benchmark stage runs only after a pass. How verification works

Stage 1 — Mechanism check agent confidence 7/10

Built Spectral Budgeted Embeddings with square-root allocation, exact singular-tail greedy repair, CUDA execution, and CPU fallback. The math check selected the exhaustive integer optimum with objective 21.5083 and dimensions [4,3,4]. In the equal-budget synthetic experiment, spectral allocation [9,6,6,2,2] reduced test MSE from 0.03197 to 0.02741, a 14.3% improvement, and reduced the spectral-tail proxy from 7.1470 to 5.8331. This is promising but was demonstrated on only one synthetic seed.

Agent confidence
7/10
Baseline
Uniform dimensions [3,3,3,3,3], embedding budget 1860, test MSE 0.0319728, spectral-tail proxy 7.14705
Idea
Spectral dimensions [9,6,6,2,2], embedding budget 1860, test MSE 0.0274103, spectral-tail proxy 5.83312; equal embedding parameter count

Limitations: The pilot model is trained, but the synthetic diagnostic uses known ground-truth category matrices for spectrum estimation instead of extracting spectra from learned pilot embeddings. Only one random seed and one synthetic regression task were tested; no real tabular dataset, repeated-seed confidence interval, calibration, wall-clock, or memory comparison was performed.

How to run: python3 spectral_budgeted_embeddings.py

Verdict computed by deterministic test code from paired-seed statistics — not by the language model.

Super-audit (legacy) latest Failed ✗

Agent confidence: 10/10

Implemented and evaluated learned-pilot spectral allocation on MovieLens 100K with five seeds, uniform and random baselines, equal target embedding budget, CUDA execution, and paired t-tests. The spectral method selected [6,6] for every seed, exactly matching uniform; mean test MSE was 0.962901 ± 0.006674 versus 0.965322 ± 0.013679, with paired p=0.7354. The promised effect did not survive the harder real-data check.

Dataset
MovieLens 100K u1.base/u1.test: 943 users, 1682 movies, 80000 train and 20000 test ratings
Math
Repaired dimensions [4,3,4] exactly matched the exhaustive integer optimum; objective 21.508333
Random
MSE 0.967264736 ± 0.013808637; tail 25017.868 ± 316.356; paired versus uniform p=0.800155
Runtime
20.49 seconds on CUDA
Spectral
MSE 0.962900531 ± 0.006674471; tail 24343.625 ± 125.449; dimensions [6,6] on all seeds; 15750 parameters; paired p=0.735372
Uniform
MSE 0.965321529 ± 0.013678865; tail 24343.625 ± 125.449; dimensions [6,6]; 15750 parameters
Limitations:

Only MovieLens 100K and its fixed u1 split were tested; no Adult benchmark, ranking loss, calibration, or deep tabular MLP comparison was run. Random allocations were budget-feasible but not exactly equal-parameter for every draw due to discrete table costs.

How to run: python3 supercheck_movielens.py

Artifacts

Implementation overview ⬇ Download all as ZIP 7 files · code, reports and structured results