# Continued-Fraction Lacunary Features

- ID: 184
- Canonical URL: https://synthcore.org/idea/184/continued-fraction-lacunary-features
- API JSON: https://synthcore.org/api/idea/184.json
- API Markdown: https://synthcore.org/api/idea/184.md
- Verification status: beats_baseline
- Source: [arXiv:2608.25821](https://arxiv.org/abs/2608.25821)
- Category: architecture
- Solves: generalization, sample-efficiency, scalability
- ML areas: embedding, mlp, transformer
- Math tags: harmonic-analysis, number-theory, approximation-theory
- Ratings: usefulness 6/10; difficulty 3/10; novelty 5/10

## Idea description

Replace random Fourier features or a dense sinusoidal positional encoding with a compact bank whose frequencies are the continued-fraction denominators of an irrational number. Inverse-frequency amplitudes provide multiscale structure with a controlled sub-Lipschitz regularity profile, while lacunarity reduces the number of frequencies needed to represent oscillatory structure.

## Mathematical statement

For an irrational rotation number alpha with continued-fraction convergents p_j/q_j, the denominators obey q_{j+1}=a_{j+1}q_j+q_{j-1}. The paper constructs h(x)=sum_{j>=1} cos(2 pi q_j x)/q_j. Continued-fraction denominators grow at least exponentially, so the frequencies are lacunary and the coefficient series is absolutely summable. The paper states that h is Holder continuous for every exponent beta with 0<beta<1, while a Fourier argument shows that h is not Lipschitz. For neural networks, truncate the series at J terms and use both sine and cosine channels. The square-root scaling in phi_J keeps each frequency pair's squared feature energy proportional to 1/q_j; direct 1/q_j scaling reproduces the scalar series exactly.

## Key formulas

- $$\alpha=[a_0;a_1,a_2,\ldots],\qquad q_{j+1}=a_{j+1}q_j+q_{j-1}$$
- $$h(x)=\sum_{j=1}^{\infty}\frac{\cos(2\pi q_jx)}{q_j}$$
- $$h_J(x)=\sum_{j=1}^{J}\frac{\cos(2\pi q_jx)}{q_j},\qquad \phi_J(x)=\left[\frac{\cos(2\pi q_jx)}{\sqrt{q_j}},\frac{\sin(2\pi q_jx)}{\sqrt{q_j}}\right]_{j=1}^{J}$$
- $$\forall\,0<\beta<1:\quad |h(x)-h(y)|\le C_\beta |x-y|^\beta,\qquad h\ \text{is not Lipschitz}$$

## Implementation notes

Integrate this at the input embedding of a coordinate MLP, neural field, transformer position encoder, or world-model state encoder. The simplest MVP is coordinate regression: concatenate the normalized coordinate x with phi_J(x), then pass the result through the first linear layer. Choose an irrational alpha, preferably the golden-ratio conjugate (sqrt(5)-1)/2, compute its denominators using q_minus1=0, q_0=1, and q_{j+1}=a_{j+1}q_j+q_{j-1}, and retain terms with q_j less than or equal to a chosen frequency cutoff. Pseudocode is: initialize q_prev=0 and q_curr=1; for j in range(J), append q_curr, then set q_next=a[j+1]*q_curr+q_prev and shift the two variables; for each q_j append cos(2*pi*q_j*x)/sqrt(q_j) and sin(2*pi*q_j*x)/sqrt(q_j). Concatenate these channels with x and train normally. The denominator recursion and inverse-frequency weighting come from the paper; the cutoff, channel normalization, and number of coordinates are empirical choices. Estimate effective regularity by fitting the slope of log absolute feature differences versus log coordinate separation over several scales. First test on a 1D or 2D neural-field task such as fitting a band-limited image or a smooth-plus-sawtooth signal. Compare raw coordinates, standard NeRF Fourier features, random Fourier features, and this encoding at equal input dimension and FLOPs. Success is lower test error or better extrapolation from a training subinterval without increased training cost.

## Verification

- Status: beats_baseline
- Mechanism evidence: yes
- Mechanism confirmed: yes
- Practical verdict: helps
- Verdict: Built continued-fraction lacunary features using golden-ratio denominators and inverse-square-root scaling, plus a reproducible coordinate-regression benchmark. The recursion matched Fibonacci denominators, the finite-series modulus had a log-log slope of 0.841 consistent with sub-Lipschitz behavior, and the finite derivative bound grew linearly with truncation size. On extrapolation to an unseen coordinate interval, lacunary features achieved RMSE 0.0734 versus 0.9800 for NeRF features and 2.3991 for raw coordinates, showing a clear promising effect in this toy setting.

### Mechanism check

- Verdict: Built continued-fraction lacunary features using golden-ratio denominators and inverse-square-root scaling, plus a reproducible coordinate-regression benchmark. The recursion matched Fibonacci denominators, the finite-series modulus had a log-log slope of 0.841 consistent with sub-Lipschitz behavior, and the finite derivative bound grew linearly with truncation size. On extrapolation to an unseen coordinate interval, lacunary features achieved RMSE 0.0734 versus 0.9800 for NeRF features and 2.3991 for raw coordinates, showing a clear promising effect in this toy setting.
- Confidence: 8/10
- Limitations: Only a 1D synthetic continued-fraction-series target and one train/test interval split were tested. The benchmark did not include random Fourier features, multiple seeds, 2D/image fields, wall-clock comparisons, or a strictly parameter-matched architecture; the regularity estimate uses a finite truncation and finite scale range.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 0.0081
- Paired wins: 8/8
- Benchmark verdict: idea better (significant)

## Artifacts

- [bench_report.json](https://synthcore.org/code/1197/bench_report.json)
- [bench_run.py](https://synthcore.org/code/1197/bench_run.py)
- [experiment.py](https://synthcore.org/code/1197/experiment.py)
- [report.md](https://synthcore.org/code/1197/report.md)
- [report_bench_2026-09-03T033612.md](https://synthcore.org/code/1197/report_bench_2026-09-03T033612.md)
- [results.json](https://synthcore.org/code/1197/results.json)
- [Download all files as ZIP](https://synthcore.org/download/1197)

## Disclaimer

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