# Tangent-Branch Neural Evasion Layer

- ID: 1218
- Canonical URL: https://synthcore.org/idea/1218/tangent-branch-neural-evasion-layer
- API JSON: https://synthcore.org/api/idea/1218.json
- API Markdown: https://synthcore.org/api/idea/1218.md
- Verification status: mech_ok_no_baseline
- Source: [arXiv:2607.21087](https://arxiv.org/abs/2607.21087)
- Category: architecture
- Solves: stability, accuracy, sample-efficiency
- ML areas: rl, world-model, graph-nn
- Math tags: dynamical-systems, control-theory, geometry, optimization
- Ratings: usefulness 7/10; difficulty 5/10; novelty 7/10

## Idea description

Wrap a neural multi-agent policy with an analytic planner that generates turn-straight trajectories tangent to pursuer surveillance disks, then selects the branch with the smallest predicted completion time. The network supplies high-level preferences or residual corrections, while the geometric layer prevents unnecessarily entering exclusion regions and exposes an explicit branch-switching signal for training.

## Mathematical statement

For a pursuer-centered exclusion disk of radius r_e with center C_q and a target point kappa, let d_q=\lVert C_q-\kappa\rVert and assume d_q>r_e. The tangent construction uses \bar{\alpha}_q=\arcsin(r_e/d_q), the planar rotation matrix R(    heta), and tangent point \bar{S}_q=\kappa+(\sqrt{d_q^2-r_e^2}/d_q)R(\alpha_q)^{-q}(C_q-\kappa), where q\in\{-1,+1\} selects clockwise or counterclockwise passage. A candidate trajectory consists of a circular turning arc from the current evader state to \bar{S}_q followed by a straight segment. For candidate branch b, estimate its completion time T_b; the planner selects k=\arg\min_b T_b. The neural controller is constrained to follow the selected tangent corridor, with residual actions projected onto the feasible side of each disk.

## Key formulas

- $$R(\theta)=\begin{bmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{bmatrix}$$
- $$\bar{\alpha}_q=\arcsin\left(\frac{r_e}{\lVert C_q-\kappa\rVert}\right),\qquad \lVert\bar{S}_q-\kappa\rVert=\sqrt{\lVert C_q-\kappa\rVert^2-r_e^2}$$
- $$\bar{S}_q=\kappa+\frac{\sqrt{\lVert C_q-\kappa\rVert^2-r_e^2}}{\lVert C_q-\kappa\rVert}R(\alpha_q)^{-q}(C_q-\kappa),\qquad q\in\{-1,+1\}$$
- $$k=\arg\min_{b\in\mathcal{B}}T_b,\qquad T_b=T_{\mathrm{turn},b}+T_{\mathrm{straight},b}$$

## Implementation notes

Use this as a differentiable planning and safety layer between a neural policy and a simulator in multi-agent RL, or as a trajectory-proposal layer for a learned world model. At each timestep, represent every pursuer by a disk center C_i and radius r_e. Let the network output a desired goal point kappa, nominal speed, and residual steering command. For every pursuer i and side q in {-1,+1}, compute d=norm(C_i-kappa); discard the branch if d<=r_e; compute alpha=asin(r_e/d), then S=kappa+sqrt(d^2-r_e^2)/d times R(alpha)^(-q)(C_i-kappa). Estimate the turn-arc duration from the current evader heading and the angular turn-rate limit, estimate the straight duration from norm(S-kappa)/v_e, and set T_b equal to their sum. Select b*=argmin_b T_b, construct the tangent-plus-line reference velocity, and project the network velocity onto the half-space that does not decrease distance to the active disk below r_e. Add the projected residual and clip to the evader speed limit. During training use T_soft=-tau log(sum_b exp(-T_b/tau)) to avoid discontinuous gradients; use hard argmin at inference. The geometric quantities are computed analytically, while turn duration, opponent-motion corrections, and model mismatch can be estimated from rollouts. First test on synthetic 2D episodes with two constant-speed pursuers and random initial states. Compare PPO, PPO plus velocity projection, and PPO plus the tangent layer using escape rate, path length, and samples to success. The predicted signature is a branch switch when two candidate times become equal, and a feasibility transition near v_e/v_p=2, the paper's analytically tractable speed-ratio boundary. The measured transition should lie within 20% of 2, and disk penetration should remain at numerical integration error rather than increasing with policy residual magnitude.

## Verification

- Status: mech_ok_no_baseline
- Mechanism evidence: yes
- Mechanism confirmed: yes
- Practical verdict: inconclusive
- Verdict: Built a readable tangent-branch planner with analytic tangent points, hard/soft branch timing, and timestep-aware half-space velocity projection. The mechanism manifested: tangent distance and disk-clearance identities matched to 7.1e-16 and 2.2e-15 maximum error, the predicted symmetric branch switch occurred at 0 radians exactly, and the canonical speed-ratio threshold approached the predicted supremum of 2. Projection changed raw clearance from about -0.80 to nonnegative clearance in the residual sweep.

### Mechanism check

- Verdict: Built a readable tangent-branch planner with analytic tangent points, hard/soft branch timing, and timestep-aware half-space velocity projection. The mechanism manifested: tangent distance and disk-clearance identities matched to 7.1e-16 and 2.2e-15 maximum error, the predicted symmetric branch switch occurred at 0 radians exactly, and the canonical speed-ratio threshold approached the predicted supremum of 2. Projection changed raw clearance from about -0.80 to nonnegative clearance in the residual sweep.
- Confidence: 8/10
- Limitations: This is a deterministic geometric toy experiment, not PPO or multi-agent RL. It uses stationary disks and a simple Euler integrator; it does not test moving pursuers, learned residuals, training sample efficiency, path length or completion-time gains, GPU execution, model mismatch, or full two-pursuer interaction.

### Practical benchmark

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

## Artifacts

- [bench_report.json](https://synthcore.org/code/493/bench_report.json)
- [bench_tangent_stage2.py](https://synthcore.org/code/493/bench_tangent_stage2.py)
- [report.md](https://synthcore.org/code/493/report.md)
- [report_bench_2026-08-31T154844.md](https://synthcore.org/code/493/report_bench_2026-08-31T154844.md)
- [results.json](https://synthcore.org/code/493/results.json)
- [tangent_evasion.py](https://synthcore.org/code/493/tangent_evasion.py)
- [Download all files as ZIP](https://synthcore.org/download/493)

## Disclaimer

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