KW-MLP
KW-MLP spots spoken keywords from MFCC patches with 12 gated-MLP blocks and no self-attention.
Audio and speech · 140 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Task
- Audio and speech
- Parameters
- 424.8K
- Operations
- 140
- Framework
- PyTorch
- Recurrent
- No
- Published
- ICLR 2022 PML4DC workshop
- Cited by
- 11 (as of 28 October 2026)
- Authors
- Mashrur M. Morshed, Ahmad Omar Ahsan
- License
- MIT
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m17667
- Graph hash
- 06d9fe2627269bc902b66d2a145fe8bc1c799773b37c518ac27574165e1bf671
- Skeleton hash
- 468e0b4148e923575b0813ea14f99af0622da7bc45eb976f330bf86d34e94169
- Architecture hash
- 60ccae4e33f2129fc2f0c6dbeab55f4dcedff04afc8667c1a0075378f39a2b78
- Diagram SHA-256
- 98de1214b68cd0f52a5361ac15538da7110d4aeda548f7e4f7021ddc7acc6d40
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
What it is
KW-MLP (Keyword-MLP) is a small keyword spotting network, presented as a memory-efficient, attention-free alternative to the Keyword Transformer (KWT). The paper asks whether self-attention is truly irreplaceable for recognizing speech keywords, and answers by trying gated MLPs, which had been shown to be alternatives to transformers in vision tasks.
The input is a grid of mel-frequency cepstrum coefficients (MFCC) of shape 40 × 98: 40 frequency bins by 98 time steps. Each time step becomes one patch, a vector of all the frequency bins at that moment. The patches are projected to an embedding of 64 dimensions and passed through 12 identical gated-MLP (gMLP) blocks. Inside a block, the projected features are split in two; one half is linearly projected across the time axis and then multiplied element-wise with the other half, a step the paper calls the Temporal Gating Unit. Unlike the original gMLP, which normalizes before the first projection, KW-MLP applies the norm after the second embedding projection, which the authors found converged faster.
The paper reports 0.424M parameters for this largest KW-MLP, fewer than the smallest KWT variant (KWT-1, 0.607M). It reports 97.63% and 97.56% accuracy on the Google Speech Commands V2-12 and V2-35 benchmarks. Shallower versions were distilled from the 12-block model, the smallest with 0.213 million parameters.
Key idea. The paper shows that gated MLP blocks applied to MFCC time-step patches reach accuracy comparable to the Keyword Transformer on Google Speech Commands with far fewer parameters.
- KW-MLP
- Keyword-MLP
- keyword spotting
- attention-free keyword spotting
- gated MLP
- speech commands
- Google Speech Commands
- MLP audio classifier
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@misc{morshed2022attentionfreekeywordspotting,
title={Attention-Free Keyword Spotting},
author={Mashrur M. Morshed and Ahmad Omar Ahsan},
year={2022},
eprint={2110.07749},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2110.07749},
}