The offline–online gap
Fit a decoder on open-loop calibration data and it may reconstruct held-out kinematics beautifully — then feel sluggish, biased, or uncontrollable the moment the user drives a live cursor. Two forces cause this. (1) Distribution shift: open-loop calibration statistics (the user watching replayed movement) differ from the closed-loop statistics the decoder then operates in. (2) The user is in the loop: they react to the decoder's own errors, so the neural data during control is partly a response to the decoder itself.
Intention estimation and ReFIT
The ReFIT insight is disarmingly simple. During a calibration block where the target is known, you can guess the user's true intended velocity: whatever its speed, its direction was almost certainly straight at the target. So you take the decoded velocity, keep its magnitude but rotate its direction toward the target, and refit the encoding model on these intention-corrected kinematics. A second pass on the same data, now labeled with better intentions, yields a markedly more controllable decoder.
\tilde{\mathbf{v}}_k = \lVert\hat{\mathbf{v}}_k\rVert\;\frac{\mathbf{p}^{\mathrm{tgt}} - \mathbf{p}_k}{\lVert\mathbf{p}^{\mathrm{tgt}} - \mathbf{p}_k\rVert}Intention-corrected velocity: keep the decoded speed, redirect it at the target, then refit the decoder on these labels (ReFIT).
When retraining a closed-loop decoder, ReFIT assumes the user always meant to head straight at the target. So it keeps the decoded speed but rotates the direction to point at the target, then refits on these cleaned-up labels.
- \tilde{\mathbf{v}}_k
- The intention-corrected velocity used as a training label.
- \lVert\hat{\mathbf{v}}_k\rVert
- The decoded speed, kept unchanged.
- \mathbf{p}^{\mathrm{tgt}} - \mathbf{p}_k
- Vector from the current cursor position to the target.
- \frac{\mathbf{p}^{\mathrm{tgt}} - \mathbf{p}_k}{\lVert\mathbf{p}^{\mathrm{tgt}} - \mathbf{p}_k\rVert}
- A unit vector pointing straight at the target.
The cursor drifted up-left but the target is up-right; ReFIT relabels the intended direction as up-right at the same speed.
This is a form of intention estimation: instead of trusting the user's noisy realized cursor path as the training label, you infer the goal-directed intention behind it. Related tricks in the same family assume the user always intends to move (so zero-velocity samples are down-weighted) and correct feedback about where the cursor actually was.
CLDA: adapting the decoder in the loop
ReFIT is a one-shot recalibration; closed-loop decoder adaptation (CLDA) makes it continuous. As the user controls, you re-estimate the decoder parameters from recent intention-corrected data and blend the new estimate into the running decoder so it never lurches. This is how a session boots up quickly (start crude, sharpen live) and how it survives slow drift.
\Theta_n = (1-\alpha)\,\Theta_{n-1} + \alpha\,\hat{\Theta}_n^{\mathrm{batch}}SmoothBatch-style CLDA: exponentially blend the freshly re-fit parameters into the live decoder; the rate \alpha trades adaptation speed against stability.
Rather than swap in a freshly fit decoder abruptly, blend it gently into the current one with an exponential average. The blend rate \alpha trades off adapting quickly versus staying stable.
- \Theta_n
- The live decoder parameters after update n.
- \hat{\Theta}_n^{\mathrm{batch}}
- Parameters freshly fit on the latest batch of data.
- \alpha
- Blend rate: near 0 is slow and stable, near 1 is fast and jumpy.
With \alpha \approx 0.1, each update only shifts the decoder a tenth of the way toward the new fit — closed-loop decoder adaptation.
The blend rate \alpha is itself a design tension: adapt too fast and the decoder chases noise (and can co-adapt destructively with the user); too slow and it never catches drift. This is adaptive decoding and recalibration in miniature — a theme that reaches full pitch in the frontier guide.
Two learners at once
Here is the subtle part. While your CLDA adapts the decoder, the user's brain is also adapting to the decoder — this is BMI skill learning and cortical plasticity. Two coupled learners chasing each other is the two-learner problem: done well it is co-adaptation and control improves faster than either could alone; done badly the two adaptations fight and the system oscillates or drifts. The practical resolution is usually to let the decoder adapt fast at first, then freeze or slow it so the user can build a stable internal model of a stationary target.