Finite-Splitting Directional Attention
Implementation & benchmark of arXiv:2608.23871 — Directional maximal operators in the plane
Source paper: Directional maximal operators in the plane arXiv:2608.23871 ⓘ · analyzed Aug 29, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Construct a directional attention head whose admissible slopes are leaves of an M-adic interval tree with a prescribed finite splitting number. Instead of evaluating all K directions independently at every spatial location, route each query through only the branch decisions of the tree and share feature projections among directions that remain in the same multiscale angular interval.
Formulas
Mathematical statement
The paper defines the planar directional maximal operator D_Omega f(x) = sup over omega in Omega and h greater than zero of (2h)^(-1) times the integral from -h to h of |f(x+t(1,omega))| dt, where x is a point in R^2, Omega is a slope set, h is a segment half-length, and f is a feature field. A lacunary sequence A=(a_j) with constant lambda in (0,1) satisfies |a_(j+1)-alpha| <= lambda |a_j-alpha| for a limit point alpha. A set U belongs to Lambda(N,lambda) when it is contained in the span of a controlling monotone lacunary sequence and its intersection with every gap interval belongs to Lambda(N-1,lambda); order zero means cardinality at most one. The admissible class Lambda(N,lambda;R) permits a cover by at most R such sets. The associated M-adic tree T(Omega;M) has M-adic intervals as vertices, and split(T) is the largest number of splitting vertices encountered on any root-to-ray path. The paper establishes that finite splitting is equivalent to admissible finite-order lacunarity. The neural adaptation uses split(T) as a routing budget, so each query makes at most N genuine angular branch decisions while unary chains are compressed into shared operators.
Implementation notes
Integrate this into a vision Transformer or CNN as a directional line-attention block operating on a feature map X with shape batch by height by width by channels. Choose K slopes in [0,1], quantize them into an M-adic interval tree, and prune or learn the tree so every root-to-leaf path has at most N splitting vertices; represent long unary chains by one shared node operator. At each node v, store its interval [l_v,r_v], a shared projection W_v, and child-routing logits. For a spatial query x, compute q_v(x)=W_v X(x), then select the top b children using p(v,c|x)=softmax_c(g(v,c,x)/tau). At each selected leaf with slope omega, sample features at offsets t in {-L,...,L} along x+t(1,omega), apply standard dot-product attention, and combine leaf outputs using the product of routing probabilities along the path. Add beta times max(0,splits(x)-N)^2 to the loss, where splits(x) is the number of visited non-unary nodes. Compute the M-adic tree, gap intervals, path split counts, and lacunarity ratios exactly; learn routing logits and node projections by backpropagation. Start with CIFAR-100 or ImageNet-100, K=32, M=2, N=3, and beam width b=2. Compare against dense 32-direction line attention and random sparse selection at equal width. Measure accuracy, directional-sampling FLOPs, visited leaves, and latency. Success means at least 2x fewer directional samples with no more than 0.5 percentage-point accuracy loss, or higher accuracy at equal FLOPs.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Confirmed ✓
Stage 2 · Practical benchmark result: No measurable effect
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
Stage 1 — Mechanism check agent confidence 7/10
Built a finite-splitting binary M-adic tree, exact path split accounting, lacunarity verification, directional line responses, proxy-guided top-2 routing, and a random sparse control. The geometric ratio check exactly produced 0.5, and routed target sampling used 16x fewer expensive directional samples than dense attention while having lower relative error than random selection (2.91% vs 5.31%). This is a promising signal, not a demonstrated deployment win: the proxy still evaluates all 32 directions, so end-to-end latency is not improved, and K=32 with M=2 cannot satisfy N=3 for distinct leaves.
- Agent confidence
- 7/10
- Baseline
- Dense: 32 directions, 18,432 target samples, relative error 0 by definition, approximately 3.0 s on the tiny Python reference benchmark.
- Idea
- Proxy-guided top-2: 2 directions per location, 1,152 target samples, 16.0x target-sample reduction, 2.91% relative error; random top-2 had 5.31% relative error. Tree had 32 leaves and exactly 5 splits on every route; geometric lacunarity ratio was exactly 0.5.
Limitations: No CIFAR/ImageNet classification experiment, learned projections, CUDA kernel, true per-query tree routing, or end-to-end latency/FLOP measurement was tested. The current proxy scans all 32 directions, so only expensive target directional samples—not total computation—are reduced. The requested M=2, K=32, N=3 configuration is structurally incompatible for a full binary tree with 32 distinct leaves.
How to run: python3 finite_splitting_attention.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2608.23871)
Ahead of the baseline (−1.3%) but not statistically significant (p=0.1875, wins 4 / 8 paired seeds).
- Benchmark
- Vision (image classification)
- Model
- directional_cnn
- Paired seeds
- 8
- Baseline mean
- 0.8506
- Idea mean
- 0.8394
- Effect (Δ)
- -0.0112 (−1.3%; negative = idea better)
- Wins
- 4 / 8 paired seeds
- p-value
- 0.1875 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±2.0%
- Mechanism
- Confirmed ✓
- Practical effect
- No effect
- Baseline tuning
- swept over 3 configs
Only the fixed vision track was tested, using 400 training and 200 test CIFAR-10 examples, K=8 rather than the proposed K=32, beam width 2, and 5 epochs. The implementation uses differentiable grid sampling rather than a production fused routing kernel; end-to-end wall-clock speedup was not established. The mechanism prediction was confirmed, but it did not produce a statistically significant task-metric win under the required 8-seed protocol.
How to run: python3 stage2_bench.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Failed ✗
Agent confidence: 9/10
Implemented an end-to-end finite-splitting directional CNN on the structurally matched CIFAR-10 vision track, with dense and top-2 routed systems sharing the same architecture and training protocol. The mathematical check passed exactly: lacunarity ratio 0.5 and binary-tree split bound 3 for K=8, N=3. Routing confirmed 4x fewer directional samples, but the task-metric improvement was not significant (paired delta -0.01125, permutation p=0.18755), so there is no demonstrated benchmark win.
- Baseline
- CIFAR-10 error mean 0.850625, std 0.038523; best lr=0.001 after sweep over 0.001, 0.003, 0.005.
- Idea
- Top-2 routed directional CNN error mean 0.839375, std 0.035920; best lr=0.003; paired delta=-0.011250; 4/8 paired wins; permutation p=0.18755; observed directional-sample reduction 4.0x versus dense and predicted 4.0x.
Benchmark result
Ahead of the baseline (−1.3%) but not statistically significant (p=0.1875, wins 4 / 8 paired seeds).
- Benchmark
- Vision (image classification)
- Model
- directional_cnn
- Paired seeds
- 8
- Baseline mean
- 0.8506
- Idea mean
- 0.8394
- Effect (Δ)
- -0.0112 (−1.3%; negative = idea better)
- Wins
- 4 / 8 paired seeds
- p-value
- 0.1875 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- ±2.0%
- Mechanism
- Confirmed ✓
- Practical effect
- No effect
- Baseline tuning
- swept over 3 configs
Only the fixed vision track was tested, using 400 training and 200 test CIFAR-10 examples, K=8 rather than the proposed K=32, beam width 2, and 5 epochs. The implementation uses differentiable grid sampling rather than a production fused routing kernel; end-to-end wall-clock speedup was not established. The mechanism prediction was confirmed, but it did not produce a statistically significant task-metric win under the required 8-seed protocol.
How to run: python3 stage2_bench.py
Artifacts
- README.md 1.0 KB View
- bench_report.json 4.1 KB View Raw
- finite_splitting_attention.py 6.4 KB View Raw
- report.md 1.8 KB View
- report_bench_2026-09-03T021155.md 4.0 KB View
- results.json 1.4 KB View Raw
- stage2_bench.py 5.4 KB View Raw