# Quasiperiodic Additive State Module

- ID: 185
- Canonical URL: https://synthcore.org/idea/185/quasiperiodic-additive-state-module
- API JSON: https://synthcore.org/api/idea/185.json
- API Markdown: https://synthcore.org/api/idea/185.md
- Verification status: unverified
- Source: [arXiv:2608.25821](https://arxiv.org/abs/2608.25821)
- Category: dynamics
- Solves: memory, scalability, stability
- ML areas: ssm, rnn, world-model
- Math tags: dynamical-systems, harmonic-analysis, number-theory
- Ratings: usefulness 5/10; difficulty 5/10; novelty 6/10

## Idea description

Use the paper's skew product as a parameter-free recurrent state: one phase rotates by an irrational increment and a second state accumulates a lacunary Fourier readout of that phase. This supplies deterministic long-range memory with only scalar updates, avoiding a learned recurrent transition matrix and its potentially unstable spectrum.

## Mathematical statement

The paper defines the torus map f(x,y)=(x+alpha,y+h(x)) modulo the integer lattice, where h(x)=sum_{j>=1} q_j^{-1} cos(2 pi q_j x), and the lift F(x,y)=(x+alpha,y+h(x)). Its iterates satisfy F^n(x,y)=(x+n alpha,y+S_n h(x)), where S_n h(x)=sum_{r=0}^{n-1} h(x+r alpha). A finite neural version uses x_{t+1}=(x_t+alpha) modulo 1 and y_{t+1}=y_t+h_J(x_t), with h_J the truncated lacunary series. The phase remains bounded on the circle and is exactly generated without learned parameters, while y exposes an accumulated history signal. A Diophantine alpha should be used to avoid unusually short rational cycles; the golden-ratio conjugate is a practical badly approximable choice.

## Key formulas

- $$f(x,y)=(x+\alpha,y+h(x))\pmod{\mathbb{Z}^{2}}$$
- $$F^n(x,y)=\bigl(x+n\alpha,\ y+S_nh(x)\bigr),\qquad S_nh(x)=\sum_{r=0}^{n-1}h(x+r\alpha)$$
- $$x_{t+1}=(x_t+\alpha)\bmod 1,\qquad y_{t+1}=y_t+\sum_{j=1}^{J}\frac{\cos(2\pi q_jx_t)}{q_j}$$
- $$z_t=\operatorname{MLP}\left([u_t,x_t,y_t,\phi_J(x_t)]\right)$$

## Implementation notes

Insert the module before a lightweight output head in a sequence predictor, or replace part of a diagonal state-space model's recurrent state. For each sequence, initialize a scalar phase x_0 either to a learned value or deterministically from the sequence index, and initialize y_0=0. At each step compute x=(x+alpha) modulo 1, evaluate h=sum_j cos(2*pi*q_j*x)/q_j, and update y=y+h. Feed the token embedding u_t together with x, y, and optional sine and cosine phase channels into a two-layer gated head. A learned gate g can scale the injected state, for example z_t=MLP([u_t,g*y,x,phi_J(x)]), with g initialized near zero. Compute q_j once from the continued-fraction recurrence and cache them. The fixed recurrence is the paper's mathematics; gate strength, truncation J, phase initialization, and feature normalization are empirical. Keep alpha fixed for the first experiment. Test on delayed-copy, adding, and periodic-plus-noisy sequence tasks, followed by sequential MNIST or a small character-level language model. Compare against a GRU, a diagonal SSM, and sinusoidal positional encoding with matched state size. Measure validation loss versus sequence length, gradient norm variance, parameter count, and recurrent memory. Success is competitive short-context accuracy with slower degradation at long contexts and fewer learned recurrent parameters.

## Disclaimer

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