Keep only the low bits: recurrent keyword spotting on wrapped oscillator phase

A ring oscillator is a loop of inverters whose oscillation speed follows an input voltage. If you count its cycles, the count is the time integral of the input. Low-power speech chips already use this. The 23 µW keyword-spotting chip of Kim et al. builds a 16-channel filter bank out of switched ring oscillators, turns each channel's output into a pulse rate, counts pulses per frame, and feeds the counts to a small recurrent network (a gated recurrent unit, GRU). Phase, the oscillator's accumulated count, has a property that chip deliberately avoids using: it wraps around. If a counter keeps only its lowest $b$ bits, the hardware computes the integral modulo $2^b$ for free. Ordentlich et al. showed that this folding lets a low-bit converter spend its bits on fine detail rather than on overall range, as long as a digital predictor afterwards "unwraps" the folded sequence back into the original signal.

This note asks whether a recognizer needs that unwrapping step at all. We propose to train the recurrent classifier directly on folded counts, read as points on a circle, and to measure where this beats explicit unwrapping. The motivating asymmetry is simple. An unwrapping filter that slips by one cycle corrupts everything after the slip, because it is trying to reconstruct the signal exactly. A classifier only needs the features that decide the keyword, so it may tolerate the same ambiguity. If this holds, a time-domain front-end can raise its oscillator gain for finer resolution while keeping narrow counters and narrow network inputs. That would address the limited dynamic range and the noise sensitivity reported for the existing chip.

Core Claim

Fix a budget of readout bits per channel per frame. Folding the oscillator count and feeding it to a recurrent network trained on the task gives higher keyword accuracy than either alternative. The first alternative keeps the count unfolded but coarsely quantized, which is the current design point. The second folds the count, unwraps it with a linear predictor, and then classifies. We expect the advantage to appear in the low-bit, high-gain regime, where per-frame changes often exceed half a wrap, unwrapping commits cycle slips, and the task loss matters more than reconstruction loss.

For channel $i$ and frame $k$, the hardware reports

$$c_{i,k} = \Big\lfloor \textstyle\int_{\text{frame }k} f_i(t)\,dt \Big\rfloor \bmod 2^b,$$

where $f_i(t)$ is the instantaneous pulse rate of channel $i$ and $b$ is the number of retained counter bits. The network receives each count as the circle point $(\cos 2\pi c_{i,k}/2^b,\ \sin 2\pi c_{i,k}/2^b)$. It also receives the circular frame-to-frame difference $\delta_{i,k} = \big((c_{i,k}-c_{i,k-1})/2^b + \tfrac12 \bmod 1\big) - \tfrac12$. This difference is exact when consecutive counts differ by less than half a wrap and is ambiguous otherwise. The proposed classifier itself is an ordinary GRU on these inputs, and we do not claim a new recurrent cell. What is new is the operating regime we study: deliberately folding the readout and training through the fold for recognition, with no reconstruction step. That regime is absent from the prior work in this file.

Research Program

The work runs in calibrated behavioral simulation first, because the question concerns signal representation, not circuit layout.

We will build a differentiable model of a switched-ring-oscillator front-end patterned on Kim et al. It has 16 band-pass channels with rectification, and a rate encoder per channel whose voltage-to-frequency curve is mildly nonlinear. It also includes per-channel gain mismatch and 1/f-shaped phase noise. These are the non-idealities Kim et al. blame for the gap between their 91% simulated and 86.03% measured accuracy. They also correspond to the supply sensitivity that Sancheti et al. report for ring-oscillator cells, 1.5% at 1–1.2 V. The front-end model will be checked against the operating points reported for the chip: 54.89 dB input dynamic range, and less than 1% accuracy loss at 40 dB SNR. On top of the front-end, each frame's count is passed through one of three readouts: unfolded with coarse quantization, folded with predictor unwrapping, or folded and consumed directly.

The main analysis is a sweep over two variables. The first is the retained bits $b$, from 3 to 10. The second is the oscillator gain, meaning counts per frame at full-scale input. Raising the gain at fixed $b$ trades more folding for finer resolution, which is exactly the trade Ordentlich et al. exploit for reconstruction. We will chart accuracy against this plane for each readout and find where the folded-direct readout overtakes each competitor.

We will also log every cycle slip committed by the unwrapping baseline. This lets us test the mechanism directly: does the folded-direct advantage concentrate on utterances where unwrapping slipped?

A smaller secondary study applies the same readouts to the HAR-2 activity recognition task, which coRNN used with tiny recurrent models. There, accelerometer channels drive simulated oscillators directly. This tests whether the effect depends on speech envelopes in particular.

Baselines

The naive reference is the current design point. Counts are kept unfolded, and the bit budget $b$ is met by dropping low bits. In practice this means lowering oscillator gain until full-scale input fits in $b$ bits. A two-layer GRU of the size used on Kim's chip consumes the counts. At generous $b$ this reproduces the chip's architecture, and its accuracy anchors everything else.

For orientation, the strongest reported number in the file for this exact system is 86.03% accuracy on the 12-class Google Speech Commands task for the fabricated chip, against 91% in the authors' software simulation (Kim et al.). Our simulated full-width baseline should land near the simulated figure before mismatch is added and near the measured figure after. If it does not, our front-end model is miscalibrated and the study pauses until it is fixed.

The strongest competitor is folding followed by explicit unwrapping. Counts are folded exactly as in the proposal. A linear prediction filter, following Ordentlich et al., reconstructs the unfolded sequence, and the same GRU then classifies it. This is the strongest competitor because it uses the same folding gain we rely on and adds a decoder designed for that purpose. Ordentlich et al. report SNR gains of up to 17 dB over a first-order sigma-delta converter and about 18 dB per bit at an oversampling ratio of 3. No keyword-spotting accuracy has been reported for this pipeline, and no reported result was found on Lacuna for modulo-folded readout on Speech Commands.

Before using the unwrapper in our sweep, we will check it on their Gaussian-process stimulus, confirming that folded-plus-predictor beats a first-order sigma-delta at matched bits. Its predictor order will be tuned per $(b, \text{gain})$ cell. It will also get two strengthened variants: a learned nonlinear unwrapper trained on reconstruction loss, and fine-tuning of the GRU on the unwrapped outputs.

The upper reference is full-precision, noise-free counts into the same GRU.

Two ablations isolate the key ingredient. The first feeds folded integers to the GRU as plain scalars, without the circle encoding. This tests whether the circular input matters or whether any network copes with the jump from $2^b-1$ to $0$. The second trains a neural unwrapper on reconstruction loss and then freezes it before the GRU. Comparing it against the end-to-end, task-trained model with identical capacity isolates the central claim: that reconstruction is the wrong objective.

All arms share data splits, front-end noise realizations, parameter count within 5%, and an equal hyperparameter search budget. Beating the strongest competitor means two things: higher mean accuracy over five seeds and five mismatch draws, with non-overlapping 95% intervals, at at least one bit budget of 6 bits or fewer; and no loss larger than 0.5 points at the generous end of the sweep.

Why not just…?

Why not just unwrap with the predictor from the modulo converter and keep a standard classifier? This is the real threat. In the high-oversampling, low-gain corner, where per-frame changes stay well under half a wrap, we expect the predictor and our approach to tie. In that corner the wrapped differences are unambiguous and nothing is gained. Ordentlich et al. themselves identify catastrophic cycle-slip propagation as the weakness of unwrapping, and our sweep pushes into the regime where slips occur. If the predictor plus a fine-tuned GRU matches the folded-direct model even there, the claim fails and we will report it. The slip-conditioned analysis will show whether any advantage comes from the mechanism we propose or from something incidental.

Why not just keep a wider counter and avoid folding entirely? Kim et al. do exactly this and achieve 23 µW. Each extra counter bit, however, widens every stage downstream: readout registers, decimation, and the first-layer multiplies of the digital GRU, which on that chip draws 9.96 µW, slightly more than the 9.3 µW analog front-end. Our sweep reports accuracy at a fixed bit budget rather than claiming large power savings, because counter energy is a modest share. The honest framing is resolution per bit. If unfolded readout at $b$ bits matches folded readout at $b$ bits across the gain range, folding buys nothing here.

Why not just train the existing GRU with injected mismatch and phase noise, or calibrate each chip? That is the obvious fix for the 5-point gap between simulation and silicon, and it is cheap. We treat it as orthogonal rather than competing. Every arm, including both baselines, is trained with the same noise and mismatch injection, so any folded-direct gain is measured on top of noise-aware training. Folding exposes the fine part of the signal that gain mismatch distorts least. If folding helps only when noise injection is absent, we will say so.

Why not just use an oscillator-style recurrent network such as coRNN as the back end? coRNN and Neural Wave Machines model hidden states as damped oscillators to keep gradients stable over long sequences. Keyword frames are short, about a hundred steps, so gradient stability is not the bottleneck. Their states are also unbounded Cartesian positions, not circular phases. We run coRNN as an alternative back end in one cell of the sweep only to confirm that the representation, not the cell type, drives the result.

Proposed Experiments

The primary benchmark is the 12-class Google Speech Commands task used by Kim et al. We report accuracy, readout bits per second across all channels, and accuracy after mismatch at 40 dB and 20 dB input SNR.

The first decisive check is the crossover map. Over the grid of retained bits and oscillator gain, we look for a region where the folded-direct model beats both the naive readout and the strengthened unwrapping pipeline by the margin defined above.

The second check is the reconstruction-versus-task ablation. If a frozen reconstruction-trained unwrapper matches end-to-end training, the core claim is false, even if folding itself helps.

The third check is the slip analysis. The folded-direct advantage should be concentrated on utterances where the predictor slipped.

As a generality probe, we repeat the best and worst grid cells on HAR-2. For this dataset the file gives no numeric accuracy for coRNN beyond its outperforming larger GRUs and LSTMs, so we report our own full-precision reference.

If the crossover region exists and survives noise-aware training, the natural next step is a re-spin of the rate encoder with truncated counters and raised gain. That is a small change to an existing, measured design. Its test is whether the measured accuracy gap to simulation shrinks below the 5 points Kim et al. observed.