Voice assistants on small devices usually send audio, or a continuous summary of it, to a server that works out what the user wants. That summary carries far more than the request. It carries the words, the speaker's identity, and their emotional state. We propose that a tiny always-on device should instead send a handful of discrete symbols per utterance. Each symbol is picked from one of several small learned dictionaries, called codebooks. The number of codebooks and their sizes fix, before any data is seen, a hard ceiling on how many bits about the speaker can ever leave the device. The encoder that picks these symbols is mostly a dense matrix multiply, so it maps well onto 8-core RISC-V microcontroller clusters. These clusters finish work fast at low voltage and then sleep. The result is privacy you can audit from the transmission format and a per-utterance energy cost of a few millijoules, rather than seconds of single-core compute.
Put in two sentences: replace the continuous features sent off-device with a short code drawn from several small codebooks, and train it so that only intent-relevant information fits. Then measure, against real reconstruction and speaker-identification attackers, whether that fixed bit budget actually blocks leakage better than the current best microcontroller defense at the same accuracy and energy.
Core Claim
The idea of composing a representation from several small codebooks comes from embedding compression in text models. KD encoding (Chen et al.) and deep compositional code learning (Shu and Nakayama) represent each word as a tuple of $D$ indices, each into a codebook of $K$ vectors. They report 98–99% smaller embedding tables at no accuracy cost, for example 87.37% versus 87.18% on IMDB. Those works treat the code as a storage trick. We treat it as the thing that crosses the trust boundary. If the device emits $D$ indices from codebooks of size $K$ at $r$ code frames per second, then for an utterance of length $T$ seconds
$$I(X; Z) \le H(Z) \le r \, T \, D \log_2 K,$$
where $X$ is the raw audio and $Z$ is the transmitted code sequence. The first inequality holds because $Z$ is a deterministic function of $X$. The second holds because $Z$ takes at most $K^{rTD}$ values. No attacker, however strong their vocoder, can recover more than this many bits about anything in the audio, whether words, speaker, or health markers.
This claim must be stated with care, because a paper in the file argues against naive versions of it. On-device discrete speech units (Choi et al.) are described as privacy-preserving because they are discrete. Yet at 0.6 kbps they still support 6.3 WER transcription on LibriSpeech clean. Discreteness alone protects nothing against content eavesdropping; DSUs are built to keep phonetic content. The bound also cannot block transcript leakage on its own, because a short command's text needs very few bits.
What the bound does give is a verifiable ceiling. That ceiling turns a vague privacy claim into a curve: leakage as a function of a rate we choose. The training objective decides which information fills the budget. The new contribution is to combine three things and test whether the combination beats the strongest alternatives. The first is a small acoustic encoder trained end-to-end through a low-rate multi-codebook bottleneck for intent recognition. The second is attacker-based measurement of word and speaker leakage across a sweep of rates. The third is a measured multi-core deployment.
Research Program
The device-side model has three stages. First, a log-mel front end feeds a stack of quantized one-dimensional temporal convolutions. These are of the kind Q-EEGNet ( Q-EEGNet: an Energy-Efficient 8-bit Quantized Parallel EEGNet Implementation for Edge Motor-Imagery Brain-Machine Interfaces) ran on the Mr. Wolf 8-core cluster in 5.82 ms and 0.627 mJ. Second, aggressive temporal pooling brings the rate down to a few code frames per second. Third, a quantizer computes, for each of $D$ codebooks, the nearest of $K$ codewords to a slice of the pooled feature.
Training uses the Gumbel-Softmax relaxation with straight-through gradients, the method from Shu and Nakayama. The loss is an intent loss on the server-side decoder. Optionally, an adversarial speaker-ID loss is added. We also apply codebook-level dropout, which randomly omits trailing codebooks during training. This orders the codebooks by importance, so the device can transmit only the first $m$ of $D$ codebooks. That gives the user a privacy dial: a lower $m$ means a lower bound. A single codebook cannot be truncated gracefully in this way.
There is a hardware point the research file gets half right. It worries that compositional lookups would cause memory-bank conflicts on PULP's shared L1 scratchpad. That cost falls on whoever reconstructs embeddings. The device never reconstructs anything: encoding is a distance computation, which is a dense INT-8 matrix multiply against a codebook of perhaps $4 \times 256 \times 64$ bytes, followed by an argmax. This is exactly the workload PULP-NN (Garofalo et al.) accelerates with four 8-bit multiply-accumulates per instruction, reaching 15.5 MACs/cycle. The gather-and-sum happens on the server.
We will write kernels that split the work across cores. Convolutions are split by output channel, as in PULP-NN. The quantizer is split across cores by codebook, with a short sequential reduction for the argmax. We will profile how much of the run Amdahl's law leaves serial. The pipeline holds audio only in on-chip scratchpad and erases it after encoding, the compute-and-destroy pattern advocated by the least-privilege argument for audio models (The Model Hears You).
The analysis has two parts. The first is a privacy-utility-energy frontier traced by sweeping $D$, $K$, $r$ and the truncation $m$. The second is a check of how tightly the measured code entropy and the attacker-recovered information track the theoretical ceiling.
Baselines
The naive reference point sends log-mel features to the server unchanged. It is run through the same server-side intent model, trained on the same SLURP split, and it sets the utility ceiling with no privacy. As a second reference we keep classifying intent fully on-device and transmitting only the label. This is the most private possible point. It cannot handle the entity filling and open-ended requests that motivate offloading, but it anchors the frontier.
The strongest existing method is SILENCE (Cai et al.). It learns a tiny mask that zeroes most short-term frames, leaving long-range intent cues while destroying local phonetic detail. It reports 81.2% SLURP intent accuracy, forces an eavesdropper ASR above 80% WER, and processes 4 seconds of audio in 912 ms within 394.9 KB on a single-core STM32H7. It is the only prior defense in the file that already runs on a microcontroller and is evaluated against an ASR attacker, which makes it the right opponent. No reported energy figure in millijoules for SILENCE was found on Lacuna, so we will measure it ourselves.
For fairness we reimplement SILENCE twice: on the STM32H7, to reproduce its reported latency, and ported to the same 8-core cluster with the same INT-8 kernels as our method. Both systems use the same SLURP training data, the same server-side decoder architecture and the same hyperparameter-search budget. Beating it means two things. At matched intent accuracy within one point, our codes should yield higher attacker WER after a reconstruction attack, and higher speaker-verification equal error rate (EER). And on the same hardware, our per-utterance energy should be no worse.
Two ablations isolate the key ingredient. The first is a single-codebook quantizer at the same bitrate, in the style of Choi et al.'s DSU predictor. It tests whether splitting into several codebooks matters or whether any discrete code does. The second is a continuous INT-8 bottleneck with the same number of bits per second: a low-dimensional pooled vector with ordered dimensions trained by nested dropout. It tests whether discreteness matters at all once the rate is equal. For FSC, the heavyweight discrete-token reference is the two-stage distillation model ( Two-Stage Textual Knowledge Distillation for End-to-End Spoken Language Understanding) at 99.7% accuracy. We cite it as a utility ceiling for discrete audio tokens; it does not run on microcontrollers.
Why not just…?
Why not just port SILENCE to an 8-core cluster? That would probably capture most of the energy gain, and we include it as a baseline precisely because it might. Its weakness lies elsewhere. SILENCE sends the surviving frames as continuous audio, so nothing bounds what a stronger attacker can recover. An attacker trained to fill in masked speech is never ruled out, and the reported above-80% WER is against a standard ASR, not one adapted to masked input. Our experiments train exactly that adapted attacker on SILENCE's output. If its WER stays high and speaker EER matches our codes, SILENCE-on-cluster wins and our contribution shrinks to the auditable bound.
Why not just use a low-dimensional INT-8 continuous embedding at the same bitrate? This is the real threat. An INT-8 vector also has a bit count, so a rate ceiling exists for it too. Linear INT-8 quantization is mature on PULP-NN, and FRILL (Peplinski et al.) shows that distillation plus 8-bit quantization keeps non-semantic utility. FRILL itself is 38.5 MB, though, and unbounded in what its dense embedding reveals.
The case for codebooks is twofold. Learned codewords spend bits only on regions of feature space the task uses, while uniform INT-8 levels spend them evenly. And truncating codebooks gives a coarser but cleaner privacy dial. Both are hypotheses. The equal-rate ablation will settle them. If the continuous bottleneck matches our method on the leakage frontier, we will report that discreteness is not the active ingredient.
Why not just use hand-crafted features like voicing and energy? Bilmes et al. ( Conversation detection and speaker segmentation in privacy-sensitive situated speech data) show that such features suffice for speaker-turn segmentation. But SLURP ( SLURP: A Spoken Language Understanding Resource Package) spans 18 domains and 46 actions, and even noisy ASR transcripts drop action accuracy to 81.42%. Coarse prosodic features are unlikely to approach that. We will include them as one point on the frontier, at their natural bitrate, rather than assume the result.
Proposed Experiments
Utility is measured as intent accuracy on SLURP and FSC. Entity SLU-F1 on SLURP serves as a stress test of how low the rate can go; the SLURP paper reports 70.84 for its ASR pipeline.
Content leakage is measured by training three attackers on each method's transmitted stream: a direct code-to-text model, a code-to-mel inversion model followed by a neural vocoder, and an ASR adapted to masked input. Each attacker is trained on held-out SLURP and LibriSpeech speech and reports WER. Speaker leakage is measured as verification EER from an attacker trained on codes, using SLURP speakers and VoxCeleb1 from the NOSS suite. Each method is also scored against the information ceiling above, using its measured code entropy.
Hardware results are latency, energy per 4-second utterance including sleep, parallel speedup from 1 to 8 cores, and peak memory. These are measured on a GAP-8 or Mr. Wolf-class board and on the STM32H7, with a current probe.
The decisive check is a single plot: speaker EER and attacker WER against intent accuracy. It overlays our multi-codebook codes at several rates, the single-codebook and equal-rate INT-8 ablations, and SILENCE on both hardware targets. The proposal succeeds if three things hold. Our curve should dominate SILENCE's. The multi-codebook curve should separate from both ablations. And measured leakage should fall as the bit ceiling is lowered, while intent accuracy stays near SILENCE's 81.2%.
On energy, the check is whether the 8-core encoder finishes a 4-second utterance in tens of milliseconds and returns to sleep. The comparison point is SILENCE's 912 ms of active single-core time. It should also land in the low single-digit millijoule range that Q-EEGNet's 0.627 mJ suggests is reachable for convolutional encoders of similar size.
References
- Learning K-way D-dimensional Discrete Codes for Compact Embedding Representations
- Compressing Word Embeddings via Deep Compositional Code Learning
- On-device Streaming Discrete Speech Units
- Q-EEGNet: an Energy-Efficient 8-bit Quantized Parallel EEGNet Implementation for Edge Motor-Imagery Brain-Machine Interfaces
- Q-EEGNet: an Energy-Efficient 8-bit Quantized Parallel EEGNet Implementation for Edge Motor-Imagery Brain-Machine Interfaces
- PULP-NN: Accelerating Quantized Neural Networks on Parallel Ultra-Low-Power RISC-V Processors
- The Model Hears You: Audio Language Model Deployments Should Consider the Principle of Least Privilege
- SILENCE: Protecting privacy in offloaded speech understanding on resource-constrained devices
- Two-Stage Textual Knowledge Distillation for End-to-End Spoken Language Understanding
- Two-Stage Textual Knowledge Distillation for End-to-End Spoken Language Understanding
- FRILL: A Non-Semantic Speech Embedding for Mobile Devices
- Conversation detection and speaker segmentation in privacy-sensitive situated speech data
- Conversation detection and speaker segmentation in privacy-sensitive situated speech data
- SLURP: A Spoken Language Understanding Resource Package
- SLURP: A Spoken Language Understanding Resource Package