# Rotation-Invariant Turning-Angle Matching

- ID: 1969
- Canonical URL: https://synthcore.org/idea/1969/rotation-invariant-turning-angle-matching
- API JSON: https://synthcore.org/api/idea/1969.json
- API Markdown: https://synthcore.org/api/idea/1969.md
- Verification status: unverified
- Source: [arXiv:2608.07975](https://arxiv.org/abs/2608.07975)
- Category: regularization
- Solves: accuracy, generalization, stability
- ML areas: world-model, rnn, ssm, loss, regularization
- Math tags: stochastic-processes, statistics, geometry, dynamical-systems
- Ratings: usefulness 5/10; difficulty 4/10; novelty 7/10

## Idea description

Add a trajectory-level loss that matches the empirical distribution of consecutive velocity turning angles between observed and generated sequences. Because turning angles are unchanged by a common rotation of all coordinates, the model is forced to reproduce hidden anisotropic and temporally correlated motion without being given a fixed laboratory-frame orientation.

## Mathematical statement

For a two-dimensional trajectory \(\mathbf{x}_t\in\mathbb{R}^2\), define increments \(\mathbf{v}_t=\mathbf{x}_{t+1}-\mathbf{x}_t\) and the signed turning angle \(\theta_t=\operatorname{atan2}(v_{t,1}v_{t+1,2}-v_{t,2}v_{t+1,1},\mathbf{v}_t^\top\mathbf{v}_{t+1})\). Under anisotropic fractional Brownian motion, the intrinsic coordinate covariance is \(\langle R_i(t)R_j(s)\rangle=D_i[i=j](t^{2H}+s^{2H}-|t-s|^{2H})\), where \(H\in(0,1)\) is the Hurst exponent, \(D_i>0\) are generalized diffusion coefficients, and \([i=j]\) is the Iverson bracket. The anisotropy ratio is \(r=D_2/D_1\in(0,1]\), with \(r=1\) isotropic. For any rotation matrix \(Q\), replacing every \(\mathbf{x}_t\) by \(Q\mathbf{x}_t\) leaves \(\theta_t\) unchanged. Train a trajectory model with a differentiable circular-distribution discrepancy, such as a Fourier loss \(L_{\mathrm{turn}}=\sum_{k=1}^{K}w_k|\hat m_k^{\mathrm{data}}-\hat m_k^{\mathrm{model}}|^2\), where \(\hat m_k=N^{-1}\sum_t e^{ik\theta_t}\), \(w_k\geq0\), and \(N\) is the number of valid turns. The useful property is that the loss detects changes in anisotropy and temporal memory while discarding arbitrary global orientation.

## Key formulas

- $$\left\langle R_i(t)R_j(s)\right\rangle=D_i[i=j]\left(t^{2H}+s^{2H}-|t-s|^{2H}\right),\qquad \alpha=2H,\qquad r=\frac{D_2}{D_1}\in(0,1].$$
- $$\theta_t=\operatorname{atan2}\!\left(v_{t,1}v_{t+1,2}-v_{t,2}v_{t+1,1},\;\mathbf v_t^\top\mathbf v_{t+1}\right),\qquad \mathbf v_t=\mathbf x_{t+1}-\mathbf x_t.$
- $$L_{\mathrm{turn}}=\sum_{k=1}^{K}w_k\left|\frac{1}{N_d}\sum_{t=1}^{N_d}e^{ik\theta^{(d)}_t}-\frac{1}{N_m}\sum_{t=1}^{N_m}e^{ik\theta^{(m)}_t}\right|^2.$
- $$\theta_t(Q\mathbf x)=\theta_t(\mathbf x)\quad\text{for every }Q\in SO(2),\qquad SO(2)=\{Q:Q^\top Q=I,\det Q=1\}.$

## Implementation notes

Integrate this at the output of a 2D trajectory predictor, recurrent state-space model, or world model that generates \(\hat{\mathbf x}_{1:T}\) from context \(\mathbf c\). First compute observed increments and generated increments, discard turns whose adjacent increment norms are below a threshold \(\varepsilon\), and calculate signed angles with `atan2(cross(v[t],v[t+1]), dot(v[t],v[t+1]))`. Use \(K=2\) or \(K=4\) circular Fourier moments and add `lambda_turn * L_turn` to the ordinary pointwise likelihood or displacement loss. To make the loss differentiable, compute moments directly from predicted coordinates; for stochastic models average moments over several generated rollouts, or use a minibatch mean. Pseudocode: `v=diff(x); valid=(norm(v[:-1])>eps)&(norm(v[1:])>eps); theta=atan2(cross(v[:-1],v[1:]),dot(v[:-1],v[1:])); m[k]=mean(exp(1j*k*theta)[valid]); loss=base_loss+lambda_turn*sum(w[k]*abs(m_data[k]-m_model[k])**2)`. The paper supplies the FBM covariance, \(\alpha=2H\), and anisotropy parameterization; the model does not need to know \(H\) or \(r\), which should be estimated separately by simulation or maximum likelihood for controlled tests. Begin with synthetic 2D FBM sequences at \(H\in\{0.3,0.5,0.7\}\) and \(r\in\{1,0.5,0.2\}\), randomly rotating every sequence. Compare an RNN or transformer predictor trained with and without the loss. The quantitative prediction is that turning-moment error will increase monotonically as \(r\) departs from one, remain unchanged under random global rotations, and the regularized model will recover this dependence: across rotations, the relative variation of each \(|m_k|\) should be below 5%, while an isotropic-trained model should show a measurable mismatch for \(r\leq0.5\). A useful falsification is no improvement in held-out turning-moment error or loss of rotation invariance.

## Disclaimer

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