# Doubled-angle orientation order pooling

- ID: 1157
- Canonical URL: https://synthcore.org/idea/1157/doubled-angle-orientation-order-pooling
- API JSON: https://synthcore.org/api/idea/1157.json
- API Markdown: https://synthcore.org/api/idea/1157.md
- Verification status: failed_benchmark
- Source: [arXiv:2607.19681](https://arxiv.org/abs/2607.19681)
- Category: architecture
- Solves: accuracy, stability, sample-efficiency
- ML areas: cnn, embedding, transformer, loss
- Math tags: harmonic-analysis, geometry, linear-algebra
- Ratings: usefulness 7/10; difficulty 4/10; novelty 6/10

## Idea description

Add a differentiable orientation-pooling layer after steerable filters or an orientation-bin expansion. It aggregates unoriented line evidence using doubled-angle vectors, so a feature at angle θ is identical to one at θ+π, while symmetric orientations cancel naturally instead of producing an arbitrary mean angle. Feed the network both the Cartesian order parameter and its magnitude-based confidence.

## Mathematical statement

The paper models orientation energy as E(θ)=Σ_j A_j κ(θ−γ_j) on the half-circle [0,π), where A_j≥0 is the effective salience of inducer j, γ_j is its unoriented angle, and κ is an even, π-periodic tuning profile. Its first circular moment is c_1=Σ_j A_j exp(i2γ_j), and the perceived orientation is φ=(1/2)arg(c_1). The factor of two is required because γ≡γ+π, making the representation invariant to reversing a line. The resultant magnitude |c_1| measures agreement or confidence: it is large for aligned orientations and zero for exact cancellation, such as an equal pair at ±45°. For a neural feature with orientation-bin energies e_b≥0, use z=Σ_b e_b exp(i2θ_b), normalized confidence q=|z|/(Σ_b e_b+ε), and Cartesian channels (Re z, Im z, q); avoid differentiating through arg when |z| is small.

## Key formulas

- $$E(\theta)=\sum_j A_j\,\kappa(\theta-\gamma_j),\qquad \theta\in[0,\pi),$$
- $$c_1=\sum_j A_j e^{i2\gamma_j},\qquad \phi=\tfrac{1}{2}\arg c_1,$$
- $$z(x)=\sum_{b=0}^{B-1} e_b(x)e^{i2\theta_b},\qquad q(x)=\frac{|z(x)|}{\sum_b e_b(x)+\varepsilon},$$

## Implementation notes

Integrate this at one or more early or mid CNN stages, or before converting patch features into transformer tokens. First create B orientation-energy maps e_b(x)≥0, using fixed steerable convolutions, learned oriented kernels followed by softplus, or an existing filter bank; the bin centers are θ_b=bπ/B. Compute per spatial location: (1) r=Σ_b e_b; (2) z_R=Σ_b e_b cos(2θ_b); (3) z_I=Σ_b e_b sin(2θ_b); and (4) q=sqrt(z_R²+z_I²)/(r+ε). Concatenate [z_R/(r+ε), z_I/(r+ε), q] to the ordinary feature map, or replace the original orientation-bin channels with these three channels followed by a 1x1 projection. If an explicit angle is needed, calculate φ=(1/2)atan2(z_I,z_R) only when q>q_min, and use a zero angle plus a confidence mask otherwise. The mathematical quantities z_R, z_I, and q are computed exactly from the learned or fixed energies; no circular statistics need to be estimated. Optionally add an equivariance check by rotating an input by α and verifying that (z_R,z_I) rotates by 2α. The first experiment should use CIFAR-10 or MNIST-C with synthetic line and bar images and a small ResNet baseline. Train baseline angle-bin pooling, ordinary scalar averaging, and doubled-angle pooling at equal parameter count. Measure classification accuracy under line reversal, random 180-degree orientation flips, and mixtures of opposing orientations, plus calibration of q. Success is higher accuracy and lower orientation error on reversed and canceling stimuli without materially increasing FLOPs.

## Verification

- Status: failed_benchmark
- Mechanism evidence: yes
- Mechanism confirmed: no
- Practical verdict: inconclusive
- Verdict: Built differentiable doubled-angle pooling returning normalized Cartesian order channels and confidence, plus confidence-gated orientation recovery. Three predicted mechanisms were confirmed: exact π-reversal invariance (maximum error 0), equal-pair confidence q=|cos(delta)| (maximum discretization error 0.00619), and weighted resultant confidence (maximum error 0.00405); cancellation at 90° gives q≈5.6e-17. On the toy reversal-prototype task, pooling achieved 1.0 accuracy versus 0.03125 for directed-bin and scalar-average baselines, but no trained CNN or image benchmark was run.

### Mechanism check

- Verdict: Built differentiable doubled-angle pooling returning normalized Cartesian order channels and confidence, plus confidence-gated orientation recovery. Three predicted mechanisms were confirmed: exact π-reversal invariance (maximum error 0), equal-pair confidence q=|cos(delta)| (maximum discretization error 0.00619), and weighted resultant confidence (maximum error 0.00405); cancellation at 90° gives q≈5.6e-17. On the toy reversal-prototype task, pooling achieved 1.0 accuracy versus 0.03125 for directed-bin and scalar-average baselines, but no trained CNN or image benchmark was run.
- Confidence: 9/10
- Limitations: The experiment uses idealized orientation impulses and nearest-bin discretization, not natural images, learned steerable filters, or a trained CNN. FLOPs, optimization behavior, calibration, rotation equivariance under image transforms, and accuracy on CIFAR-10/MNIST-C were not tested.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 0.54375
- Paired wins: 4/8
- Benchmark verdict: no significant win

## Artifacts

- [bench_report.json](https://synthcore.org/code/462/bench_report.json)
- [custom_orientation_lines.py](https://synthcore.org/code/462/custom_orientation_lines.py)
- [orientation_pooling.py](https://synthcore.org/code/462/orientation_pooling.py)
- [report.md](https://synthcore.org/code/462/report.md)
- [report_bench_2026-08-31T125208.md](https://synthcore.org/code/462/report_bench_2026-08-31T125208.md)
- [results.json](https://synthcore.org/code/462/results.json)
- [run_experiment.py](https://synthcore.org/code/462/run_experiment.py)
- [stage2_orientation_bench.py](https://synthcore.org/code/462/stage2_orientation_bench.py)
- [Download all files as ZIP](https://synthcore.org/download/462)

## Disclaimer

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