# Analytical Variants Systematic exploration of analytically-derived detection heads on frozen EUPE-ViT-B features. Every weight is computed from closed-form least-squares — no gradient steps. ## Method Given cached backbone features X at positive spatial locations and target matrix Y: ``` W = (X^T X + λI)^{-1} X^T Y ``` Classification, regression, and centerness are solved independently. One pass over the training data accumulates sufficient statistics (X^T X, X^T Y), then one matrix inverse per task produces the optimal linear weights. ## Greedy Feature Selection Starting from zero dimensions, greedily add the single feature channel that maximizes classification accuracy. The ordering reveals which backbone dimensions carry the most detection-relevant information. Top 10 most important dimensions (EUPE-ViT-B): 665, 642, 200, 305, 498, 628, 67, 562, 426, 723. One dimension (dim 665) achieves 31.1% person classification accuracy. 100 dimensions reach 50.6%. Results: `greedy_forward_gpu.json` ## Evolved Circuits Evolutionary search over feature dimension subsets using batched GPU fitness evaluation. Population of 512 individuals, fixed-K genomes, tournament selection, uniform crossover, adaptive mutation. Fitness is F1 score from analytical person-vs-background classification. At 200 gen/s on GPU, 5000 generations complete in 25 seconds. | Dims | Gates | Greedy F1 | Evolved F1 | Speedup | |------|-------|-----------|------------|---------| | 10 | 850 | 0.628 | 0.761 | +21% | | 20 | 1700 | 0.646 | 0.775 | +20% | | 50 | 4250 | 0.696 | 0.801 | +15% | | 100 | 8500 | 0.728 | 0.823 | +13% | | 200 | 17000 | — | 0.832 | — | | 300 | 25500 | — | 0.845 | — | The evolved 10-dim circuit (850 gates) outperforms the greedy 100-dim circuit (8500 gates). Evolution finds synergistic dimension combinations that greedy selection is structurally blind to. Linear person detection ceiling: F1 ~ 0.846 at ~300 dims. Results: `evolved_extreme.json` in `circuit/` ## Exotic Features Tested on classification and regression independently: **Classification** (69.6% baseline at 768 dims): - Random Fourier Features (RBF kernel approximation): no improvement over raw features - Quadratic cross-terms on top-30 greedy dims: 58.4% at 495 dims - Random projections K=200: 56.2% at 200 dims - Conclusion: raw LayerNorm'd features are already optimal for linear classification **Regression** (0.626 baseline quality): - Sheaf H^1 boundary features (vertical + horizontal): 0.687 (+9.7%) - H^1 + quadratic combined: 0.698 (+11.5%) - Random Fourier Features: 0.654 (+4.5%) - Conclusion: directional boundary information (Cech 1-cocycles) is the most useful addition for localization Results: `exotic_gpu.json`, `exotic_reg_gpu.json` ## Spatial Context Variants Tested via the `analytical_one.py` single-variant builder: | Variant | Classification | Regression | Composite | |---------|---------------|------------|-----------| | Per-token baseline | 64.3% | — | 0.327 | | + 3x3 neighbor mean | 72.9% | 2.2% | 0.375 | | + high regularization (λ=0.1) | 71.2% | 62.9% | 0.518 | | + sheaf H^1 compact | 74.3% | 65.5% | 0.540 | Spatial context is essential: +8.6 points classification, unlocks nonzero regression. Results: `v001_baseline.json` through `v009_sheaf_h1_compact.json`