Skip to content

Repository files navigation

Code: self-contained verification of the block-term operator theory

This is the public deposit root for the theory paper. The paper is theory-first (theorems + proofs); the only code is four self-contained scripts that verify the theorems in the paper's own Gaussian model. They need no external data, no GPU, and no cluster - each draws its own targets, fits least squares, and checks a stated prediction. Constants can be matched exactly here precisely because the model IS the theorem's model, which real data structurally cannot do; the real-data corroboration lives in the sibling BT-FNO project (PDEBench), not here.

What is here

  • synthetic_separation.py - the single-layer generalization separation (Theorem 1). Fixed-channel Gaussian model. Verifies (Panel A) excess risk equals sigma^2 * dim / n for both the CP and block-term classes, with the CP/block-term risk ratio approaching RL / mu_band; and (Panel B) the advantage is L-gated, with an exact collapse to a tie at L = 1 under full band overlap. Writes figures/fig_synthetic.pdf.
  • depth_amplification.py - the conditional depth-amplification result (the depth proposition). A faithful depth-D Fourier neural operator toy (spectral band mixing, a full-rank pointwise-local map, a tanh nonlinearity that spreads frequency content). Measures the estimation dimension dim(M_D) = rank J of each format by analytic autograd, and shows it is exactly linear in depth in the non-saturated regime, then saturates at the predicted boundary D* ~ C^2 / (RL). Writes figures/fig_depth.pdf.
  • four_format_ordering.py - the complete variance-ordering theorem (all four formats). Fixed-channel reduction, where each format is a nested linear subspace of the CP frequency-coefficient space. Verifies that the least-squares excess risk of each format equals sigma^2 * dim / n and that the dimensions realize the ordering block-term (K) <= Tucker/TT (RK) <= CP (RLK), with the measured risk ratios approaching R and RL. Writes figures/fig_ordering.pdf.
  • proportional_regime.py - the proportional-regime (random-matrix) result. Sweeps the sample size n across both formats' interpolation thresholds and checks the exact inverse-Wishart / ridgeless risk formulas, that the CP risk peaks at its threshold n = d_CP while block-term stays smooth (double-descent avoidance), and that the separation ratio diverges near n = d_CP and recovers the classical RL/mu_band at large n. Writes figures/fig_proportional.pdf.

Reproduce

pip install numpy matplotlib torch
python3 synthetic_separation.py
python3 depth_amplification.py
python3 four_format_ordering.py
python3 proportional_regime.py

Each script prints the measured numbers it verifies and writes its figure into code/figures/ (self-contained; the scripts never write into manuscript/). The manuscript keeps its own committed copies in manuscript/figures/; to refresh them after a run, from the project root:

cp code/figures/*.pdf manuscript/figures/

code/figures/*.pdf are generated output (listed in .depositignore); the scripts themselves are part of the deposit. Expected headline numbers (as reported in the manuscript):

  • synthetic_separation.py: Panel B full-overlap CP/block-term ratio by L = [1,2,3,4] is [1.0, 1.99, 2.79, 4.34] against theory [1,2,3,4] (exact collapse to 1.0 at L = 1).
  • depth_amplification.py: for D <= 4, CP dim(M_D) = 168, 336, 504, 672 and block-term 76, 152, 228, 304 (each exactly D times the single-layer value, so the gap is 92 D); saturation sets in exactly at D* = C^2 / RL = 4.
  • four_format_ordering.py: at K = 12, R = 3, L = 2, the dimensions are block-term 12, Tucker/TT 36, CP 72 (that is K, RK, RLK), and the measured risk ratios versus block-term are 2.93 (theory R = 3) and 5.43 (theory RL = 6), the small undershoot being the finite-sample and O(1/K) correction.
  • proportional_regime.py: at K = 8, R = 3, L = 2 (so d_BT = 8, d_CP = 48), the CP-to-block-term risk ratio is about 60 near the CP interpolation threshold and recovers the classical RL/mu_band = 6 (measured 6.42) at large n, and the CP risk peaks at n = 48 while block-term stays smooth.

Determinism

All four scripts seed their generators, so the printed numbers are reproducible run to run. synthetic_separation.py, four_format_ordering.py, and proportional_regime.py are pure NumPy; depth_amplification.py uses PyTorch in float64 on CPU (no GPU needed) for a clean Jacobian-rank threshold.

About

Block-Term Operator Theory: why block-term rank-(L,L,1) neural operators generalize better than CP / Tucker / TT at matched capacity, not by more expressivity but as a tighter inductive bias. A least-squares generalization separation Theta((RL - mu_band) K / n), a complete variance-ordering theorem across all four tensor formats, an adaptive for...

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages