# Age-conditioned semi-Markov router

- ID: 539
- Canonical URL: https://synthcore.org/idea/539/age-conditioned-semi-markov-router
- API JSON: https://synthcore.org/api/idea/539.json
- API Markdown: https://synthcore.org/api/idea/539.md
- Verification status: failed_benchmark
- Source: [arXiv:2607.05173](https://arxiv.org/abs/2607.05173)
- Category: architecture
- Solves: stability, accuracy, sample-efficiency
- ML areas: moe-routing, ssm, rnn
- Math tags: probability, stochastic-processes, dynamical-systems
- Ratings: usefulness 6/10; difficulty 5/10; novelty 7/10

## Idea description

Augment a neural router with the age of its current expert or latent regime and use an age-dependent hazard to determine when switching is likely. Unlike ordinary token-wise softmax routing, the router can learn non-geometric residence times, suppressing unstable expert oscillations while still allowing rapid transitions when the current regime becomes inappropriate.

## Mathematical statement

The paper defines a waiting-time density r_i(a) for regime i, where a is the elapsed time since entering that regime. Its survival probability is S_i(a)=integral from a to infinity of r_i(a') da', and its hazard rate is R_i(a)=r_i(a)/S_i(a), the conditional instantaneous switching rate given survival until age a. We discretize time into steps n and represent the hazard by h_i(n) in [0,1], with discrete survival S_i(n)=product from m=0 to n-1 of (1-h_i(m)) and discrete duration probability p_i(n)=h_i(n)S_i(n). Thus the augmented state consisting of hidden representation, current regime, and age is locally Markovian: remain in regime i with probability 1-h_i(a), or switch with probability h_i(a). A neural implementation estimates h_i(a,z) from the current representation z and an age embedding e(a), for example h_i(a,z)=sigmoid(w_i^T z+u_i^T e(a)+b_i), while retaining the expert output during a stay and recomputing expert selection only after a switch.

## Key formulas

- $$S_i(a)=\int_a^{\infty} r_i(a')\,da',\qquad R_i(a)=\frac{r_i(a)}{S_i(a)}$$
- $$S_i(n)=\prod_{m=0}^{n-1}\bigl(1-h_i(m)\bigr),\qquad p_i(n)=h_i(n)S_i(n)$$
- $$h_i(a,z)=\sigma\!\left(w_i^{\top}z+u_i^{\top}e(a)+b_i\right),\qquad a_{t+1}=\begin{cases}a_t+1,&\text{with probability }1-h_i(a_t),\\0,&\text{with probability }h_i(a_t).\end{cases}$$

## Implementation notes

(1) Integrate this into a causal MoE or recurrent/SSM block. At each sequence position t, maintain a discrete regime index i_t, an integer age a_t, and the hidden state z_t. Each regime corresponds to one expert MLP or one SSM parameter set. Do not compute a fresh unconstrained softmax route at every token. Retain the current expert while the age-conditioned hazard says to stay, and choose a new expert only after a switch.

(2) Pseudocode: initialize i=argmax_i router(z_0), a=0. For each token, compute y=Expert[i](z). Compute h=sigmoid(w_i^T z+u_i^T age_embedding[min(a,A_max)]+b_i). During training, use a straight-through Bernoulli sample or a differentiable two-way relaxation. If staying, return Expert[i](z) and set a=a+1. If switching, compute new logits q=Router(z), mask the current expert i, select i_new=argmax(q) or sample from softmax(q/temperature), set i=i_new and a=0. For a fully differentiable MVP, use the weighted output (1-h)Expert[i](z)+h sum_j softmax(q)_j Expert[j](z). Add an optional duration regularizer using the implied distribution p_i(n)=h_i(n)S_i(n), such as a penalty between its mean duration and a desired target.

(3) The paper supplies the survival and hazard construction; the network estimates h_i(a,z), expert-selection logits, and hidden representations by backpropagation. Estimate empirical duration histograms from route traces and compare them with p_i(n). Monitor switch rate, mean duration, expert-load entropy, and the fraction of consecutive tokens assigned to the same expert.

(4) First experiment: use a four-expert causal Transformer-MoE or GRU-MoE on WikiText-2, plus a synthetic sequence task whose labels follow alternating regimes with known geometric and heavy-tailed durations. Compare standard token-wise top-1 routing against age-conditioned routing at equal parameter count and FLOPs. Success means lower validation perplexity or synthetic sequence error, substantially fewer expert switches, and no expert-load collapse. On long-context data, also test whether retaining an expert for multiple tokens reduces router computation without hurting perplexity.

## Verification

- Status: failed_benchmark
- Mechanism evidence: yes
- Mechanism confirmed: no
- Practical verdict: no_effect
- Verdict: Built a readable age-conditioned semi-Markov router toy module with empirical duration-hazard estimation, age/evidence-dependent switching, and survival/duration verification. Across three seeds and noise levels, it reduced switching by about 27–35% and router calls by about 56–64%, while the survival identity error was at most 2.2e-16. However, accuracy was consistently lower than the token-wise baseline by roughly 1.5–6.2 percentage points, so this is a promising stability and routing-compute signal, not an accuracy improvement.

### Mechanism check

- Verdict: Built a readable age-conditioned semi-Markov router toy module with empirical duration-hazard estimation, age/evidence-dependent switching, and survival/duration verification. Across three seeds and noise levels, it reduced switching by about 27–35% and router calls by about 56–64%, while the survival identity error was at most 2.2e-16. However, accuracy was consistently lower than the token-wise baseline by roughly 1.5–6.2 percentage points, so this is a promising stability and routing-compute signal, not an accuracy improvement.
- Confidence: 8/10
- Limitations: This is a scalar synthetic two-regime simulation, not a trained neural MoE, GRU, Transformer, WikiText-2 benchmark, or equal-FLOP learned comparison. The hazard is estimated from held-out synthetic duration traces and the experiment does not test end-to-end backpropagation, expert load balancing, or learned age embeddings.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 0.3073
- Paired wins: 2/8
- Benchmark verdict: no measurable effect

## Artifacts

- [age_router_experiment.py](https://synthcore.org/code/1379/age_router_experiment.py)
- [bench_report.json](https://synthcore.org/code/1379/bench_report.json)
- [report.md](https://synthcore.org/code/1379/report.md)
- [report_bench_2026-09-04T181232.md](https://synthcore.org/code/1379/report_bench_2026-09-04T181232.md)
- [results.json](https://synthcore.org/code/1379/results.json)
- [stage2_age_router_bench.py](https://synthcore.org/code/1379/stage2_age_router_bench.py)
- [Download all files as ZIP](https://synthcore.org/download/1379)

## Disclaimer

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