# Christoffel Event Scheduler

- ID: 1376
- Canonical URL: https://synthcore.org/idea/1376/christoffel-event-scheduler
- API JSON: https://synthcore.org/api/idea/1376.json
- API Markdown: https://synthcore.org/api/idea/1376.md
- Verification status: unverified
- Source: [arXiv:2607.24844](https://arxiv.org/abs/2607.24844)
- Category: training
- Solves: stability, speedup
- ML areas: optimizer, scheduler, training-dynamics
- Math tags: combinatorics, dynamical-systems, optimization
- Ratings: usefulness 5/10; difficulty 3/10; novelty 7/10

## Idea description

Use a Christoffel word as a periodic binary gate for an expensive training operation: activate the operation exactly r times in every N-step period, but distribute those activations as uniformly as possible rather than in blocks or independent Bernoulli trials. Candidate operations include SAM perturbation steps, Hessian-vector preconditioning, gradient clipping, EMA teacher refreshes, or an auxiliary MoE expert. The intended benefit is lower burst-induced gradient variance at the same average compute budget.

## Mathematical statement

For a period of length N and activation density r/N, define the lower mechanical word w_t = floor((t+1)r/N) - floor(tr/N), for t = 0,...,N-1. If gcd(N,r) = 1, this is a Christoffel word up to cyclic rotation. It has exactly r ones and satisfies the balanced-prefix bound |sum_{t=0}^{m-1} w_t - mr/N| < 1 for every prefix length m. Thus the number of activations in any prefix differs from its ideal fractional count by at most one, ruling out long bursts. The paper motivates this construction through the positional dependence of binary event sequences in the accelerated Collatz recurrence. The neural adaptation uses the same fixed-density, extremally balanced arrangement, with w_t controlling an expensive training event.

## Key formulas

- $$\phi(x)=\begin{cases}x/2,&x\equiv0\pmod 2,\\(3x+1)/2,&x\equiv1\pmod 2,\end{cases}\qquad x_i=\frac{3^{d_i}x_{i-1}+d_i}{2},\quad d_i\in\{0,1\}.$$
- $$x_N=2^{-N}\left(3^r x_0+\sum_{j=1}^{N}d_j\,2^{j-1}3^{\sum_{k=j+1}^{N}d_k}\right),\qquad r=\sum_{j=1}^{N}d_j.$$
- $$w_t=\left\lfloor\frac{(t+1)r}{N}\right\rfloor-\left\lfloor\frac{tr}{N}\right\rfloor,\qquad \left|\sum_{t=0}^{m-1}w_t-\frac{mr}{N}\right|<1.$$
- $$\operatorname{Var}\left(\sum_{t=0}^{m-1}b_t\right)=m\frac{r}{N}\left(1-\frac{r}{N}\right)$$

## Implementation notes

1. Exact integration point: choose one expensive operation in an existing training loop, for example applying SAM only on selected steps, running a Hessian-vector correction, refreshing an EMA teacher, or enabling a costly expert. Set a period N and activation count r, and replace the current random or block schedule by the Christoffel gate. 2. Pseudocode: precompute gate[t] = floor((t+1)*r/N) - floor(t*r/N); at optimizer step s, set active = gate[s mod N]; compute the ordinary gradient on every step; if active, execute the expensive branch and update with its corrected gradient, otherwise use the cheap update. Optionally evaluate all N cyclic rotations during a short warm-up and select the phase with the smallest first-window loss, while keeping the word fixed thereafter. 3. Computed from the paper: the gate construction, exact density r/N, and prefix-discrepancy guarantee. Estimated empirically: gradient variance, loss oscillation, wall-clock cost, and whether the expensive branch has state-dependent effects that invalidate the open-loop schedule. 4. First cheap experiment: train a 2-layer MLP or small Transformer on MNIST or CIFAR-10, applying SAM on r of every N steps. Compare Christoffel, contiguous-block, uniformly random, and evenly spaced schedules at identical SAM-call budgets. The quantitative prediction is that every prefix activation count for Christoffel differs from mr/N by less than one, while random scheduling has standard deviation sqrt(m(r/N)(1-r/N)); Christoffel should therefore eliminate burst-related variance and show lower short-window gradient or loss variance at equal compute. Test N = 16, r = 4 and r = 8, and reject the method if variance and final accuracy are not better than random scheduling.

## Disclaimer

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