# Level-Adaptive Replay Memory

- ID: 1268
- Canonical URL: https://synthcore.org/idea/1268/level-adaptive-replay-memory
- API JSON: https://synthcore.org/api/idea/1268.json
- API Markdown: https://synthcore.org/api/idea/1268.md
- Verification status: failed_benchmark
- Source: [arXiv:2607.22211](https://arxiv.org/abs/2607.22211)
- Category: training
- Solves: sample-efficiency, stability, speedup
- ML areas: diffusion, vae, rl, training
- Math tags: probability, stochastic-processes, optimization
- Ratings: usefulness 7/10; difficulty 5/10; novelty 6/10

## Idea description

Use the recent history of generator outputs as a controllable training window instead of fixing the replay-memory depth globally. Estimate how quickly each fitness level improves as more same-level examples enter the window, and increase memory only when the measured escape probability improves enough to justify the extra stale data.

## Mathematical statement

The paper defines a window of depth m as S=(Q_1,...,Q_m), where Q_i is the elite population stored at round i, and the current fitness level is denoted k. The level-k profile is W_k(j)={S: ell(Q_i)=k for the j most recent pools and ell(Q_i)<=k for older pools}, where ell(Q_i) is the level of pool Q_i. For a conditional generator G(S)(·|Q_m), rho_k(j)=inf_{S in W_k(j)} G(S)(A_k^+|Q_m) is the worst-case probability that one proposal enters the next level A_k^+; with M independent proposals, r_k(j)=1-(1-rho_k(j))^M is the probability of escaping level k in one round. Under monotone learning, increasing memory improves rho_k, but without monotone learning the expected sojourn can be U-shaped in m. The adaptation estimates rho_hat_{k,m} empirically and chooses the smallest memory depth whose escape-rate gain exceeds a tolerance.

## Key formulas

- $$\mathcal{W}_{k}(j)=\bigl\{S=(Q_{1},\dots,Q_{m})\in\Omega_{N}^{m}:\ell(Q_{i})=k\ (m-j<i\leq m),\quad\ell(Q_{i})\leq k\ (i\leq m-j)\bigr\}$$
- $$\rho_{k}(j)=\inf_{S\in\mathcal{W}_{k}(j)}G(S)\bigl(A_{k}^{+}\mid Q_{m}\bigr),\qquad r_{k}(j)=1-\bigl(1-\rho_{k}(j)\bigr)^{M}$$
- $$\widehat{\rho}_{k,m}=\frac{\#\{\text{proposals at level }k\text{ that reach the next level using memory }m\}}{\#\{\text{proposals evaluated at level }k\}}$$
- $$m_{t+1}=\begin{cases}m_t+1,&\widehat r_{k,m_t+1}-\widehat r_{k,m_t}>\tau\\m_t-1,&\widehat r_{k,m_t}-\widehat r_{k,m_t-1}< -\tau\\m_t,&\text{otherwise,}\end{cases}\qquad \widehat r_{k,m}=1-(1-\widehat\rho_{k,m})^M$$

## Implementation notes

Integrate this at the dataset-construction step of an iterative generator: diffusion fine-tuning, VAE molecular generation, or policy optimization. At round t, retain the last m_t elite batches Q_{t-m_t+1:t}, concatenate them with optional recency weights, and fine-tune the generator on this window. Track a discrete fitness level k using quantile bins or fixed reward thresholds; a proposal is an escape when its oracle score crosses the next threshold. Initialize m=1 and a bounded range [1,m_max]. For each round, sample M candidates from G_theta conditioned on the current elite pool, score them, and estimate rho_hat[k,m] from the fraction crossing the next level. Store separate counters for each pair (k,m), preferably with exponential decay so estimates adapt when the generator changes. Every K rounds, probe one neighboring memory depth for one validation round; compute r_hat[k,m]=1-(1-rho_hat[k,m])^M, and update m using the threshold rule with a confidence margin tau. Train theta on the selected window with the same optimizer and gradient-step budget as the baseline. The paper supplies the level-profile and M-fold escape formulas; rho_hat, quantile levels, and tau are empirical choices. First test a small diffusion or VAE generator on a molecular benchmark, comparing fixed windows m in {1,2,4,8,16} with the adaptive controller under equal oracle-call and gradient budgets. Success means fewer oracle evaluations to reach a fixed top-quantile reward and avoidance of large-window degradation under stale or distribution-shifted elite data.

## Verification

- Status: failed_benchmark
- Mechanism evidence: yes
- Mechanism confirmed: no
- Practical verdict: harms
- Verdict: Built a controlled level-adaptive replay-memory simulator with empirical rho estimation, M-fold escape-rate calculation, neighbor probing, and fixed-window baselines. The core mechanism manifested: the exact escape formula matched Monte Carlo within 0.0017, monotone memory improvement held for 100% of tested increments, and increasing stale-data penalty shifted the optimal depth from m=16 to m=3-5, with observed optima within one depth of prediction. The adaptive controller did not win the matched toy comparison (65 escapes versus 73 for fixed m=2), so the evidence supports the mechanism but not a performance improvement.

### Mechanism check

- Verdict: Built a controlled level-adaptive replay-memory simulator with empirical rho estimation, M-fold escape-rate calculation, neighbor probing, and fixed-window baselines. The core mechanism manifested: the exact escape formula matched Monte Carlo within 0.0017, monotone memory improvement held for 100% of tested increments, and increasing stale-data penalty shifted the optimal depth from m=16 to m=3-5, with observed optima within one depth of prediction. The adaptive controller did not win the matched toy comparison (65 escapes versus 73 for fixed m=2), so the evidence supports the mechanism but not a performance improvement.
- Confidence: 8/10
- Limitations: This is a synthetic Bernoulli level-escape simulator, not a neural generator, diffusion/VAE, molecular benchmark, or policy-optimization task. It does not test wall-clock speed, gradient/FLOP budgets, distributional level profiles, confidence intervals for online adaptation, or robustness across many random seeds; the controller uses a simple neighbor-probing policy and fixed toy stale-data curve.

### Practical benchmark

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

## Artifacts

- [bench_report.json](https://synthcore.org/code/507/bench_report.json)
- [experiment.py](https://synthcore.org/code/507/experiment.py)
- [level_adaptive_bench.py](https://synthcore.org/code/507/level_adaptive_bench.py)
- [report.md](https://synthcore.org/code/507/report.md)
- [report_bench_2026-08-31T162643.md](https://synthcore.org/code/507/report_bench_2026-08-31T162643.md)
- [results.json](https://synthcore.org/code/507/results.json)
- [Download all files as ZIP](https://synthcore.org/download/507)

## Disclaimer

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