Two Clocks in the Browser: Pairing FSRS-6 With an O(1) Recurrent Layer Without Overfitting Noisy Humans
FSRS-6 nails calibrated multi-month stability but is blind to hesitation, fatigue, and sibling collisions. Here is how Kanso pairs it with a deterministic 16-channel browser recurrent layer—and why an anytime-valid martingale gate refuses to touch your intervals until personalization proves itself out-of-sample.

Key Takeaway · Quick Answer
FSRS-6 nails multi-month stability with 21 parameters, but ignores hesitation, fatigue, and sibling collisions. Kanso pairs exact FSRS-6 with a deterministic 16-channel browser recurrent layer (distinct from published 2.76M-parameter offline neural RWKV), guarded by hierarchical log-RT shrinkage, prequential diagonal Bayesian logistic regression, and an anytime-valid Choe–Ramdas martingale gate that defaults cleanly to FSRS-6 until out-of-sample gains are proven.
Two clocks—and an honest boundary between offline neural RWKV and the browser
Human memory runs on at least two distinct clocks. The slow clock governs structural consolidation across weeks, months, and years: a card you have successfully recalled five times across four months behaves fundamentally differently from a word you saw yesterday. Parametric models like FSRS-6 excel on this slow clock. With just 21 parameters and a power-law retrievability curve, FSRS-6 delivers battle-tested multi-year stability and strong calibration (0.3460 Log Loss on open-spaced-repetition/srs-benchmark’s anki-revlogs-10k benchmark excluding same-day reviews, with newer parametric variants like FSRS-7 base at 0.3401 and FSRS-7 recency at 0.3363).
The fast clock governs everything happening inside today’s sitting: recalling a prompt in 900 milliseconds versus grinding for 8.5 seconds before pressing Good; accuracy dipping after 25 tiring cards; two consecutive misses rattling focus; or encountering Japanese カタカナ ツ three cards after シ. Because standalone FSRS-6 treats each card’s history as an independent trace, it is structurally blind to that cross-card sequential stream.
Before explaining Kanso’s architecture, let us draw one non-negotiable engineering boundary. On srs-benchmark, published offline neural RWKV models (2.76M-parameter RWKV-Instant and RWKV-Curve checkpoints) achieve leading Log Loss and binned RMSE because they train deep recurrent weights over millions of historical reviews. Kanso’s browser layer is NOT a 2.76M-parameter neural checkpoint. Shipping multi-megabyte weights and claiming offline benchmark scores for a client-side heuristic would be dishonest. Instead, Kanso runs an unmeasured, zero-download, deterministic 16-channel browser-native recurrent layer inspired by Two-Head RWKV—and treats its own predictions with healthy statistical skepticism.
Inside the O(1) 16-channel browser recurrent state and hierarchical log-RT
Every graded review updates RWKVHiddenState in O(1) time with zero weight downloads. Its dim = 16 channels span 4 structured feature slots—[outcome, hesitation, difficultyStrain, interference]—forming a 64-element memoryMatrix plus 16 readout channels and 24-card recency ring buffers. Channel decays w_i space geometrically from 0.35 / min (~2-minute half-life) to 0.00001 / min (~48 days). Each review decays every slot by exp(-w_i · Δt) and absorbs the new vector through deterministic FNV-1a frozen card projections.
Two companion dynamics decay continuously across idle breaks: sessionFatigue rises on misses, Hard ratings, hints, and slow recalls, recovering with τ = 35 minutes; sibling and confusion overlap decays with τ = 30 minutes, separating constructive priming on mature cards from look-alike interference.
Because clinical vignettes take far longer to read than kana glyphs—and open tabs create 90-second outliers—Kanso clamps responseMs to [250, 30,000] ms, log-transforms it, and runs two-level empirical-Bayes Welford shrinkage. Global log-RT shrinks toward ln(2600 ms) (pseudo-count 8), each CardKind shrinks toward your global posterior (pseudo-count 6), and pooled log-std shrinks toward 0.58 (clamped to [0.34, 1.15]). After 24 global reviews averaging 3.2s, 12 clinical vignettes at 5.8s settle to a ~4.68s personal baseline while 12 kana cards at 1.3s settle to ~1.73s. Hesitation is always a scale-invariant z-score against that personal per-kind distribution.
| Model / Layer | Parameter & Runtime Footprint | Sees Cross-Card Stream & RT? | Benchmark Status | Role in Kanso |
|---|---|---|---|---|
| Published Offline Neural RWKV | ~2.76M weights (PyTorch / offline) | Yes (full sequence & latency) | Leading Log Loss / RMSE on srs-benchmark | Architectural inspiration (not bundled in browser) |
| Exact FSRS-6 | 21 parameters, O(1) closed-form | No (per-card independent trace) | 0.3460 Log Loss on anki-revlogs-10k | Calibrated long-horizon floor & exact fallback |
| Kanso 16-Ch Browser Layer + Gate | 64-slot matrix + 6-dim Bayesian head, O(1) JS | Yes (hesitation, fatigue, siblings, <24h) | Unmeasured heuristic; gated per-learner online | Safe residual personalization only after proof |
Strict prequential calibration: online diagonal Bayesian logistic regression
Hand-tuned heuristics fail either by overreacting to natural reading variance or by leaking future data during tuning. Kanso wraps raw context signals inside a 6-dimensional online diagonal Bayesian logistic regression head trained strictly prequentially—predict before observe—with isolated calibration buckets for Simple (2-button) and Classic (4-button) UIs.
On every eligible unaided review (reps > 0, hintUsed = false), Kanso runs a strict five-step protocol before mutating state: (1) compute FSRS-6 baseRecall (pBase) and φ = [1, scaled(baseLogit − logit(0.9)), hesitation, fatigue, sibling, shortTerm] from pre-observation state; (2) apply MacKay probit moderation κ · (w · φ), where κ = 1 / sqrt(1 + (π/8) · Σ φ_j² / prec_j), automatically shrinking uncertain early weights toward zero.
(3) Only after recording pCand = sigmoid(baseLogit + residualLogit) does the engine observe y = 1[rating >= 2]; (4) multi-day reviews (elapsedDays >= 1.0) score out-of-sample on paired Brier difference and log-loss; (5) the diagonal head takes one regularized Newton step under zero-mean Gaussian prior precisions [20, 25, 12, 16, 16, 16], weight clamps (±1.2, slope ±0.8), and forgetting factor 0.996. Same-day reviews receive 0.25× training weight and never enter gate scoring.
- Zero target leakage: Prediction, Brier scoring, and martingale accumulation all run on rwkvBefore and fsrsBefore prior to rwkvStep and fsrsReview.
- Mode isolation: Switching between Simple ("Still Learning / Got It") and Classic (Again / Hard / Good / Easy) shifts button semantics dramatically; isolated per-mode buckets keep one UI’s calibration from polluting the other.
- Bounded interval invariant: Even when personalization is active, stability modulation is clamped to [0.72, 1.24] and applied before fsrsNextInterval, guaranteeing that fsrsRetrievability(nextFsrs, nextFsrs.scheduledDays) always equals desiredRetention.
The anytime-valid Choe–Ramdas martingale gate (and why it usually stays closed early)
Suppose you run an online learner and check after every review whether your personalized model beats FSRS-6 using a textbook t-test at p < 0.05. That is textbook p-hacking: continuous peeking inflates false-positive promotion rates past 30%, meaning one in three users would get noisy, worse-than-baseline intervals purely by luck.
Kanso instead uses an anytime-valid sequential lower confidence bound based on Choe & Ramdas’s bounded-score test martingale over a 3-point predictable mixture λ ∈ {0.5, 1.0, 1.5} with α = 0.025 per rating mode (5% family-wise error across Simple + Classic). On each primary multi-day review, it accumulates the paired Brier gain d_t = (pBase − y)² − (pCand − y)² and the predictable bounded-range variance proxy v_t = (2 · |pCand − pBase|)². At every review n, the anytime-valid lower bound is max over λ of [Σ d_t − ln(1 / α_λ) / λ − (λ / 8) · Σ v_t] / n, where ln(1 / α_λ) = ln(120) ≈ 4.787.
Run the numbers and you see how conservative—and honest—this gate is. Even if a candidate model shows a +0.012 average Brier improvement across n = 120 multi-day reviews, the lower bound is still −0.0158, well below the +0.001 promotion margin. The gate stays closed at gateAlpha = 0 (baseline_leading) and commits exact FSRS-6 intervals with zero distortion. Only once sustained out-of-sample evidence clears the hurdle—say n = 250 primary reviews with a consistent +0.018 Brier gain and low variance, lifting LCB to +0.00403—alongside minimum floors of 60 primary reviews, 8 lapses, and 7 distinct study days, does gateAlpha ramp smoothly from 0.15 toward 1.0 across a 0.006 span.
Two additional safety latches close the remaining edge cases. First, an EWMA kill-switch (γ = 0.995) continuously monitors recent paired Brier differences; if a learner’s study pattern shifts and ewmaPairedDiff drops below −0.003, the gate immediately snaps back to zero. Second, in Classic 4-button mode, a rating-skew hold (hold_rating_skew) watches the last 100 explicit grades: if a learner clicks Hard 50+ times and Again fewer than 5 times ("Hard abuse"), binary pass/fail labels contain too little genuine forgetting signal to validate personalization safely, so Kanso locks to exact FSRS-6 until grading habits normalize.
Frequently Asked Questions
- Does Kanso run the 2.76M-parameter neural RWKV model from srs-benchmark inside the browser?
- No. Kanso is explicit about this distinction: published 2.76M-parameter RWKV-Instant and RWKV-Curve checkpoints are offline neural models that motivate Kanso’s two-head, multi-timescale architecture. In the browser, Kanso runs a zero-download, deterministic 16-channel recurrent layer over exact FSRS-6, guarded by online Bayesian calibration and a sequential martingale gate.
- What happens during my first few weeks before the martingale gate opens?
- While status is "gathering" or "baseline_leading", gateAlpha stays at 0. Every review commits the exact FSRS-6 stability and next interval with zero distortion, while Kanso silently learns your personal per-card-kind log-RT baselines and evaluates candidate predictions out-of-sample.
- Why does the calibration gate treat "Hard abuse" in Classic mode as a safety hold?
- Because FSRS and binary Brier scoring treat Hard (rating 2) as a pass (y = 1) and only Again (rating 1) as a lapse (y = 0). If a learner taps Hard on forgotten cards instead of Again (>= 50 Hard and < 5 Again in the last 100 grades), the observed recall rate looks artificially close to 100% and hides true forgetting, making it unsafe to promote personalized residual weights.
- Can a single distraction—like leaving a card open for 3 minutes—corrupt my hesitation score?
- No. Response times are clamped to [250 ms, 30,000 ms], log-transformed so extreme tails compress smoothly, and standardized against your shrunk per-card-kind log-RT distribution. One slow outlier nudges the Welford baseline negligibly and cannot blow up an interval.
Put It Into Practice

