Precision Where It Matters: Protecting the Recursive Core of Low-Power Phase Trackers

Phase-locked neuromodulation delivers a stimulation pulse at a chosen point in an ongoing brain rhythm, such as the peak of a tremor oscillation or the trough of a beta wave. The timing has to be right because the same pulse can suppress a rhythm at one phase and strengthen it at another. The best causal phase estimator in clinical use runs in double precision on a workstation. Implants, by contrast, live within budgets of a few hundred microwatts and have dropped floating-point hardware altogether. This note proposes to find out where, inside a real-time phase tracker, numerical precision actually matters. Our hypothesis is that almost all of the damage from low-precision arithmetic comes from a handful of recursive state updates: the filter memories and running sums that carry information from one sample to the next. If we protect only those updates with a cheap two-word "error-compensated" representation and leave everything else at 8 or 16 bits, we should recover essentially double-precision phase accuracy at close to 16-bit cost.

The reason to expect this comes from scientific computing. That field has learned to recover full precision on hardware built for low precision by storing a number as the unevaluated sum of a large part and a small correction term. The neuromodulation hardware community has gone the opposite direction and simply pruned precision-hungry phase computations away. Neither side has asked which operations in a phase tracker need the extra bits. Answering that question, and checking the answer in closed-loop simulations where a phase error turns therapy into harm, tells chip designers whether continuous phase-locked stimulation is reachable on implant hardware, and at what cost.

Core Claim

Causal narrowband phase estimators share one structural fact. To isolate a slow rhythm from a signal sampled at a much higher rate, they contain recursions whose poles sit very close to the unit circle. Examples are infinite-impulse-response bandpass filters, oscillator-model state updates, and sliding-window Fourier updates. For a resonator with pole radius $r$, the variance of the rounding noise injected each step is amplified roughly by $1/(1-r^2)$, and the pole radius obeys $1-r \approx \pi B/f_s$, where $B$ is the filter bandwidth and $f_s$ the sampling rate. The amplification therefore grows like $f_s/(2\pi B)$. A 2 Hz-wide tremor filter at 1 kHz sampling amplifies rounding noise by nearly two orders of magnitude, which costs about three effective bits. Sliding Fourier updates have poles exactly on the circle, so their rounding error grows without bound.

Feed-forward pieces behave differently. The windowed transform, the multiplication by the endpoint-correction response, and the final arctangent see no such amplification. Our claim is that the error is concentrated in the recursive parts. Representing only the recursive states as a high word plus a compensating low word, with a per-block exponent so the representation survives stimulation artifacts, should bring phase error within a small fraction of the algorithm's own error floor. Uniform 16-bit and shift-add pipelines should not.

Relation to Prior Work

The motivating evidence comes from the neuromodulation side. Studies showing that perception and saccade timing depend on the phase of ongoing oscillations, The Phase of Ongoing EEG Oscillations Predicts Visual Perception and This Is the Rhythm of Your Eyes, establish that phase gates excitability. Stimulation work shows that this gating governs the response to exogenous pulses: The Phase of Ongoing Oscillations Mediates the Causal Relation between Brain Excitation and Visual Perception found that the same magnetic pulse has different perceptual effects depending on alpha phase, and TMS-induced phase resets depend on TMS intensity and EEG phase found that pulse-induced phase resets depend on both phase and intensity.

Two papers turn this into a hazard. In thalamocortical models, Abatement of epileptic spike-wave discharges through single pulse stimulation showed that a well-timed pulse ends a seizure while a mistimed one prolongs it. Response of Neuronal Populations to Phase-Locked Stimulation validated a coupled-oscillator (Kuramoto) model in Parkinsonian rats and showed that the networks sit at only 5–10% of maximal synchrony. In that regime, mistargeted stimulation amplifies the rhythm rather than desynchronizing it. We reuse this validated model as the closed-loop testbed that converts phase error into clinical consequence.

The estimator we build on comes from Non-invasive suppression of essential tremor via phase-locked disruption of its temporal coherence. That paper introduced the endpoint-corrected Hilbert transform (ecHT), a causal phase estimator that suppresses the edge ripple of the ordinary Hilbert transform. It reduced endpoint phase error from about 47° to 9° and produced a 21.5% average tremor reduction. It ran off-chip in double precision and never studied reduced bit widths. We take its algorithm unchanged and ask what precision it needs.

Two hardware papers constrain the design. NeuralTree is a 256-channel classifier chip at 0.227 µJ per classification. It replaces division and square roots with shifts and adds, and it uses an energy penalty during training that steers the classifier away from phase-locking features. Precise and low-power closed-loop neuromodulation through algorithm-integrated circuit co-design reaches 142.9 µW using shift-add processing elements with no hardware multipliers. Both perform event detection rather than continuous phase tracking. Their shift-add arithmetic is the cost model we must fit inside, and their choice to prune phase computation is the decision we test against.

The method comes from the precision-emulation side. Representing Hyperbolic Space Accurately using Multi-Component Floats stores values as sums of low-precision floats to avoid overflow and underflow. Recovering single precision accuracy from Tensor Cores while surpassing the FP32 theoretical peak performance splits matrices into high and low parts and corrects the hardware's rounding bias. Large-Scale Discrete Fourier Transform on TPUs recovers float32 Fourier transforms from multi-pass bfloat16 on matrix engines. All three protect every operation uniformly, and all three run in batch settings. We instead protect a small, analytically chosen subset of a streaming computation.

The Tensor Core work also constrains us. It relies on a fixed 2^11 scale for the low-order parts, which cannot handle signals whose amplitude jumps by orders of magnitude during a stimulation artifact. We therefore use a per-block shared exponent.

The closest conceptual precedent is Neural Quantum States in Mixed Precision. It keeps a double-precision master path for ill-conditioned updates and runs sampling in 16-bit, and it proves that fast-mixing Markov chains damp rounding noise. Its proof does not transfer to deterministic filters, and we do not claim it does. Our analogue is the noise-gain argument above. Stable recursions also forget old errors, but at a rate set by $1-r$, and that rate is exactly what makes narrowband tracking expensive.

Research Program

The first component is an error-attribution study. We implement four causal phase trackers in a bit-accurate simulator with arithmetic configurable per operation:

  • ecHT computed per window by a fast Fourier transform;
  • ecHT computed with a sliding Fourier update;
  • a causal infinite-impulse-response bandpass followed by a Hilbert approximation;
  • a two-state oscillator-model Kalman tracker.

For each tracker we promote one operation group at a time from 16-bit to double precision and measure the change in phase error. This yields a precision-sensitivity map. The analysis predicts that recursive states dominate and that their share grows as $f_s/B$ grows.

The second component is the protected tracker. Only the recursive states and long accumulators are held as a 16-bit high word plus a 16-bit low word, updated with error-free addition and multiplication splitting built from integer shifts and adds, so it fits the shift-add style of existing implant processors. Each block of samples carries a shared exponent. The exponent is chosen from the block's peak magnitude, so the low word neither overflows during a stimulation artifact nor underflows just after one. We report operation counts and register footprint. We also report an energy estimate from a shift-add cost model calibrated to the operation types used in the two implant chips above. We present it as an estimate, not as measured silicon power.

The third component is the closed-loop consequence test. We fit the Kuramoto model to the low-synchrony regime reported by Mirkhani et al. Each tracker variant then drives phase-locked stimulation, and we measure whether oscillation amplitude falls or rises. This is the step that tells us whether a few degrees of arithmetic-induced jitter matter clinically or vanish under biological variability.

Baselines

The reference point is ecHT in double precision as described by Schreglmann et al. The strongest reported number on the file is its endpoint phase error of about 9°, on essential-tremor recordings, from Non-invasive suppression of essential tremor via phase-locked disruption of its temporal coherence. Our data differ, so we rerun it on every dataset we use rather than borrow that figure. "Beating" this baseline is not the goal. The protected tracker succeeds if its excess error over double-precision ecHT stays below 1° median, and if it does so at a cost close to uniform 16-bit.

The naive reference points are a zero-crossing trigger on the bandpassed signal and the same trackers run uniformly in 16-bit fixed point, with the input scaled to cover artifact amplitudes. A NeuralTree-style variant replaces divisions and roots with shift-add approximations, following NeuralTree. We found no reported result on Lacuna for phase-estimation error of any implant-grade fixed-point tracker, so these baselines are measured, not cited.

The strongest practical competitor is a uniform 32-bit fixed-point or single-precision implementation, which is what a careful embedded engineer would ship. A second strong competitor is decimation: downsample to about 250 Hz before narrowband filtering, so that $f_s/B$ shrinks and 16-bit recursions become well conditioned.

The key ablations isolate our ingredients. One protects the feed-forward transform instead of the recursion. One protects the recursion without the per-block exponent. One protects everything, in the style of the Tensor Core and TPU work.

All variants share identical filter designs, window lengths, and phase targets. Hyperparameters are tuned on the same held-out segments with the same search budget, and every method is evaluated on the same signal streams and artifact injections.

Why not just…?

Why not just use 32-bit arithmetic everywhere? It will very likely match double precision, so accuracy is not the argument against it. Cost is. A 32-bit multiply in a shift-add datapath costs roughly four times the partial products of a 16-bit one, and register storage doubles for every state rather than only the recursive ones. The question is whether that overhead matters at 256 channels under the budgets that NeuralTree and the 142.9 µW co-design chip had to meet. Our operation-count comparison settles it. If the protected tracker saves less than about 30% over uniform 32-bit, we will report that uniform 32-bit is the sensible answer.

Why not just decimate before filtering? This is the most serious threat, because it attacks the root cause the analysis identifies. A causal anti-aliasing filter adds group delay, and converting that delay into a phase offset assumes a stable rhythm frequency. Tremor and beta frequencies drift, and Schreglmann et al. report that the optimal phase itself drifts. We will run decimate-then-16-bit trackers under realistic frequency drift. If they match the protected tracker's phase error, the contribution narrows to the attribution study and the closed-loop finding. If their delay-induced error exceeds the arithmetic error they remove, protection wins.

Why not just detect zero crossings? Zero crossings give only two phase points per cycle. They cannot target the arbitrary lags, such as 60°, used in the tremor trials, and they fire on noise. The baseline is included anyway. The closed-loop test will show whether its jitter pushes the low-synchrony Kuramoto network toward amplification, as Response of Neuronal Populations to Phase-Locked Stimulation would predict.

Why not just run the tracker off-implant in double precision? A wireless round trip adds latency that is a large fraction of a beta cycle, and transmitting raw multichannel data costs more power than computing on-chip, which is the motivation surveyed in Intelligent Neural Interfaces. We include a latency-injected double-precision baseline to quantify this cost directly.

Proposed Experiments

The data come from three sources. The first is synthetic narrowband oscillations at 5, 10, and 20 Hz with known ground-truth phase, controlled frequency drift, 1/f background, and injected stimulation artifacts three to four orders of magnitude above signal amplitude. The second is scalp EEG from the public CHB-MIT database, using non-seizure segments for alpha and theta tracking, with an acausal double-precision Hilbert phase as reference. The third is intracranial recordings from iEEG.org, used the same way.

The primary metric is circular mean absolute phase error at the endpoint sample. Secondary metrics are the circular spread of trigger phases around the target, operation counts and estimated energy per channel per second, and, in the Kuramoto testbed, the percentage change in oscillation amplitude under phase-locked stimulation.

The decisive checks are three. First, the sensitivity map must show recursive states accounting for most of the excess error under 16-bit arithmetic, and that share must grow with $f_s/B$ roughly as the noise-gain relation predicts. If feed-forward operations dominate instead, the core claim is wrong. Second, the protected tracker must stay within 1° median of double precision through artifact episodes. The per-block exponent ablation should fail there, which isolates the artifact-scaling contribution. Third, in the low-synchrony Kuramoto model, the uniform 16-bit and shift-add trackers should produce measurably less suppression, or outright amplification, at targets where the protected and double-precision trackers suppress.

If all three checks hold and decimation does not erase the gap, the result is a concrete design rule for continuous phase-locked implants: spend the extra bits on the recursion only.