Calibration-in-the-Loop Training for Subthreshold Analog Recurrent Networks

Transistors run below their switching threshold behave as tiny exponential devices: they draw nanoamp currents, multiply and divide signals for free, and form filters and slow integrators from picofarad capacitors. This makes them a natural substrate for always-on sensors that listen for a keyword or watch a heartbeat on a few hundred nanowatts. The catch is that the exponential works against you too. A random threshold shift of a few tens of millivolts, the ordinary fabrication scatter of identical transistors, changes a device's current, and so the time constant or center frequency it sets, by a large multiplicative factor. A filter bank built this way has jittery channel spacing. A recurrent network built this way has memory cells whose leak rates and feedback gains differ randomly from chip to chip.

This note proposes training one set of network weights that transfers across chips, paired with a fast per-chip calibration of the few bias "knobs" that subthreshold circuits already expose: one gate bias per filter channel and one per recurrent cell. The calibration routine is simulated inside the training loop, so the shared weights are optimized for how the network will perform after that cheap calibration, not before it. The motivation is a specific property of recurrence. To remember for a long time, a leaky recurrent cell needs a feedback gain close to one, and that is exactly where a small gain error is most damaging. Training for robustness alone therefore pushes the network toward short memory. Restoring each cell's gain with its existing bias knob, and training the weights to tolerate everything else, should keep long memory without retraining each chip.

Core Claim

The claim has two parts. First, in subthreshold recurrent circuits, mismatch splits into two kinds. One kind can be absorbed by per-channel bias voltages that already exist: these are shifts in channel center frequencies, integration time constants and loop gains, which are additive in the log-current domain. The other kind cannot be absorbed: per-device errors inside multipliers, current mirrors and nonlinearities. Second, training shared weights against the second kind, with the first kind removed by a simulated calibration step inside the training loop, should beat both pure variation-aware training and calibrating to nominal after training. It should approach the accuracy of fully retraining each die, at a small fraction of that per-chip cost.

The physics gives the split directly. Subthreshold drain current is $I = I_0 \exp(\kappa (V_g - V_{th})/U_T)$, where $V_g$ is the gate voltage, $V_{th}$ the threshold, $\kappa$ the gate coupling factor and $U_T$ the thermal voltage. A threshold error $\delta$ multiplies the current by $\exp(-\kappa\delta/U_T)$, and a gate bias adjustment of exactly $\delta$ cancels it. A leaky integrator $\tau_i \dot h_i = -h_i + u_i$ with $\tau_i = C U_T/(\kappa I_i)$, where $C$ is the capacitance and $I_i$ the bias current of cell $i$, therefore has a time constant that is randomized multiplicatively and is correctable through a single knob. For the discrete-time view, take a cell with effective self-feedback gain $g$. Its memory horizon is roughly $1/(1-g)$. A relative gain error $\epsilon$ changes that horizon at a rate proportional to $g/(1-g)^2$.

$$ \frac{\partial}{\partial \epsilon}\,\frac{1}{1-g(1+\epsilon)}\Big|_{\epsilon=0} = \frac{g}{(1-g)^2} $$

Sensitivity to mismatch thus grows with the square of the memory length the task requires. Above $g(1+\epsilon)=1$ the cell no longer forgets at all; it saturates or runs away. This is the temporal error accumulation that static, feedforward hardware-aware training never meets.

Relation to Prior Work

Three lines of work motivate this proposal and constrain it. ADAPT-pNC is the closest. It trains learnable second-order printed filters and resistive crossbars against sampled component variation and reaches 0.726 mean accuracy over 15 UCR datasets under 10% variation. It finds a single global weight set, uses printed thin-film devices whose variation is moderate and roughly linear, and does not use gated recurrence. We keep its variation-sampling, reparameterized training as a method ingredient. We change the objective so that the sampled chip is calibrated before the loss is computed, and we move to subthreshold silicon, where variation is exponential.

Precise deep neural network computation on imprecise low-power analog hardware takes the opposite route. It measures every neuron on a 180nm subthreshold die and retrains weights for that die, reaching 98% on MNIST at about 8 TOp/J. That result shows software can absorb subthreshold mismatch. It also shows the cost: per-die retraining, on a feedforward network only. We use it as the accuracy upper bound and as the per-chip-cost reference.

The circuit trimming literature, Figueroa et al. and Millner et al., cancels offsets with calibration loops or floating gates. Figueroa et al. report that adaptive learning absorbs gain mismatch but not input offsets. This is a constraint we take seriously: the knobs we calibrate are offset-like terms in the log domain, and they are the ones learning handles worst.

On the circuit side, the subthreshold filter-bank review by Kim and Liu supplies the front-end topology, a 16-channel flipped-voltage-follower biquad bank at 52 nW. That review names mismatch-induced shifts of center frequency and quality factor as unresolved, and it is not co-trained with any sequence model. Improved Silicon Cochlea using Compatible Lateral Bipolar Transistors documents about 12% RMS current mismatch in subthreshold MOS cochleas and fixes it by changing devices. We use its 12% figure as our main stress level and ask whether training and calibration can avoid that device change. Yang et al. handle the cost of recurrent nonlinearities in analog crossbars, but they start from digital spectrograms and leave device-to-device mismatch open. DeltaKWS is a fully digital chip whose filter bank and delta-gated RNN set the practical target for keyword spotting.

Research Program

We will build a differentiable behavioral model of a complete subthreshold signal chain with three stages. The first is a 16-channel biquad filter bank whose center frequency and quality factor are set by bias currents, as in Kim and Liu. The second is envelope detection. The third is a recurrent layer of log-domain leaky integrators, with GRU-style update gating realized as translinear current multiplication and followed by a small readout. Every transistor current carries a lognormal factor drawn from a threshold-voltage distribution. Integrated-circuit chips are sampled as whole draws of all these factors. A global temperature term shifts $U_T$ for all devices together.

The model exposes one bias knob per filter channel and one per recurrent cell. These are the voltages a designer already routes to set frequency and time constant, so no new per-device trimming hardware is added.

The calibration procedure has to be short and measurable on a real chip without labels. For the filter channels, it applies a few test tones, reads each channel's envelope peak, and solves in closed form for the bias offset that restores the target center frequency. For each recurrent cell, it applies a step input, measures the decay of the response, and sets the bias so the time constant or loop gain matches its trained value. Both steps are deterministic functions of the sampled chip and the trained targets. They can be written into the training graph, either differentiated through directly or treated with a straight-through estimate. The training objective is the expected task loss over chips, evaluated after calibration.

$$ \min_\theta \; \mathbb{E}_{\varepsilon \sim p(\varepsilon)}\Big[\,\mathcal{L}\big(\theta,\; c^*(\theta,\varepsilon),\; \varepsilon\big)\Big] $$

Here $\theta$ are the shared weights and target time constants, $\varepsilon$ is a sampled chip's mismatch, and $c^*$ is the bias setting the calibration routine would produce on that chip. The weights are thus trained to be robust only to the residual mismatch calibration cannot reach, chiefly errors inside the translinear multipliers and weight mirrors.

The behavioral model will be validated against transistor-level Monte Carlo simulation of one biquad, one integrator cell and one gating multiplier in a standard CMOS process. We will report how well the predicted post-calibration residuals match. We will also report power estimated from the bias currents the trained network requires, without assuming a target figure in advance.

Baselines

The naive reference trains the same analog network on a mismatch-free model and deploys it on sampled chips with no calibration. It shows how large the problem is and should collapse as the mismatch spread grows.

The strongest training-only competitor is global variation-aware training in the style of ADAPT-pNC, reimplemented on our silicon model. It uses the same architecture, mismatch distribution, number of training steps and hyperparameter search budget, and differs only in having no calibration in the loop. On UCR, ADAPT-pNC reports 0.726 mean accuracy in printed hardware under 10% component variation. We will run the same 15 datasets so the comparison is direct, while noting the hardware model differs. Beating it means higher mean accuracy and higher yield, defined as the fraction of sampled chips within two points of software accuracy, at 12% current mismatch.

The calibrate-after baseline trains on the nominal model and then runs the identical per-chip calibration routine. This is the trimming philosophy using only the existing knobs. It isolates the key ingredient: whether putting calibration inside training matters, or whether calibration alone does the work.

The per-die upper bound, following Precise deep neural network computation on imprecise low-power analog hardware, fine-tunes all weights on each sampled chip's exact model. We will report its accuracy alongside its per-chip cost in measurements and optimizer steps. Our method succeeds if it closes most of the gap to this bound using only the calibration probes.

A frozen-recurrence reservoir baseline keeps the mismatched filters and integrators fixed and random, and fits only a linear readout per chip. This is the cheapest credible per-chip scheme.

For keyword spotting, the digital references are DeltaKWS, which reports 89.5% accuracy on 12-class Google Speech Commands at 36 nJ per decision and 5.22 µW, and the analog-crossbar LSTM of Yang et al., which reports 88.5% against a 91.6% software baseline. These are measured silicon while our results are simulated, and we will label the comparison that way. For the analog filter bank of Kim and Liu, no reported keyword-spotting accuracy was found on Lacuna.

Why not just…?

Why not just use near-threshold digital, as DeltaKWS does? Digital logic removes analog mismatch, and DeltaKWS shows 89.5% at 5.22 µW. The file, though, puts a subthreshold 16-channel analog filter bank alone at 52 nW, and DeltaKWS itself stopped at 0.6 V because memory bit-cells fail below that. The open question is whether analog accuracy can be made to survive mismatch at all. If our post-calibration accuracy falls well below 89.5% at realistic mismatch, digital wins, and we will say so.

Why not just retrain each chip? It works, as the 98% MNIST die-specific result shows. But it needs a full model and training run per die, and it has only been shown on a 4-7-3 feedforward network. We run it as the upper bound and report the per-chip probe count and optimizer steps it needs next to ours. If its cost turns out to be small for networks of this size, the argument for our method weakens to the number of measurements needed.

Why not just trim every channel back to nominal after training? This is the calibrate-after baseline. The risk to our claim is real: if bias knobs absorb nearly all of the mismatch, calibrate-after will match the joint method. Our prediction is that it will not. Residual multiplier errors shift the effective loop gains of a network trained on the nominal model, and the quadratic sensitivity derived above makes that shift costly for long-memory cells. The experiment settles this directly.

Why not just treat the mismatched recurrent bank as a reservoir and fit a per-chip readout? Random time constants are arguably a feature for a reservoir, and this is the strongest cheap threat. It cannot learn task-specific filter bands. Mallela's raw-waveform model (Raw Speech Waveform Based Classification) gained 16.79% over fixed MFCC features by learning its filters, which suggests learned front-ends matter. The reservoir baseline tests this on our own tasks. If it matches the joint method, trainable analog recurrence is not justified.

Why not just use variation-aware training without calibration? Our analysis predicts it can only achieve robustness by keeping loop gains well below one, which shortens memory. We will test this by reading out the learned gains and comparing accuracy on tasks with long-range structure.

Proposed Experiments and Decisive Checks

The main experiments use 12-class Google Speech Commands with the analog front-end applied to raw audio, and the 15 UCR datasets used by ADAPT-pNC. We sweep current mismatch from 0 to 20% RMS, with 12% as the headline point, and sample 1,000 chips per setting. At each point we report mean accuracy, the 5th-percentile chip, and yield.

To test the memory argument, we add a synthetic delayed-recall task with controllable lag. The prediction is that the gap between joint training and variation-aware-only training widens with lag, roughly tracking the $1/(1-g)^2$ sensitivity. Temperature sweeps test whether one calibration at room temperature still holds across a range, and whether recalibration with a few probes recovers the loss.

The decisive check is the comparison against calibrate-after and the reservoir baseline at 12% mismatch on Speech Commands and on the long-lag task. If the joint method does not beat both by a clear margin in 5th-percentile accuracy, the central claim is false. A second check is transistor-level Monte Carlo agreement with the behavioral model on post-calibration residuals. Without that agreement, none of the simulated accuracies should be trusted.