Lego-Features: Exporting modular encoder features for streaming and deliberation ASR

Rami Botros, Rohit Prabhavalkar, Johan Schalkwyk, Ciprian Chelba, Tara N. Sainath, Françoise Beaufays · DOI

Introduction

In modern end-to-end (E2E) Automatic Speech Recognition (ASR), the encoder and decoder components are typically trained as a single, monolithic entity. While this approach yields high accuracy, it creates a tight representational coupling. The decoder learns to rely on the specific, high-dimensional internal distributions and "quirks" of its paired encoder. Consequently, if a researcher wishes to upgrade the encoder to a more efficient architecture or repurpose it for a different task, the entire downstream system must be retrained from scratch. This lack of modularity is computationally expensive and prevents the realization of a "plug-and-play" ASR architecture.

Researchers at Google have developed Lego-Features, a framework designed to break this coupling. By utilizing a discrete, vocabulary-grounded bottleneck, Lego-Features allow encoders and decoders to be swapped or updated independently—a capability referred to as "zero-shot stitching."

The Lego-Features Framework

The proposed method decouples the system into three distinct stages to ensure that the interface between components remains stable regardless of the underlying model initialization:

  1. The Base Model: The system utilizes a frozen, pre-trained Conformer-based encoder as the foundation.
  2. The Exporter (Feature Generation): A small set of trainable "Exporter" layers is added on top of the frozen encoder. These layers are trained using a Connectionist Temporal Classification (CTC) loss. The resulting "Lego-Features" are defined as the top-K logit indices from this CTC layer at every frame. Because these indices are mapped to a fixed wordpiece vocabulary, they provide a discrete and stable interface.
  3. The Importer & Downstream Decoder: To utilize these features, a downstream model employs an "Importer" module. This module re-embeds the sparse indices into a continuous vector space before passing them to a standard decoder (such as an RNN-T or LAS architecture).

The CTC "Firewall"

The discrete CTC bottleneck acts as a representational firewall. It prevents the decoder from co-adapting to the fine-grained continuous noise or specific initialization of a single encoder. Instead, the decoder is forced to rely on the underlying linguistic information captured by the wordpiece indices. The researchers found that CTC is uniquely suited for this because its conditional independence makes its outputs more consistent across different training runs compared to RNN-T, which suffers from "label bias."

Experimental Results and Modularity

The framework was evaluated using a massive multidomain audio-text dataset and tested on Voice-Search and LibriSpeech benchmarks. The primary goal was to prove modularity through a "Modularity Test," where an encoder is replaced by a version trained from a completely different random initialization.

  • Zero-Shot Stitching: In the modularity test, a standard tightly coupled system became completely unusable after an encoder swap, with the Word Error Rate (WER) jumping to approximately 99%. In contrast, the Lego-Feature system maintained a 5.6% WER, demonstrating that the decoder could successfully interpret features from a brand-new encoder initialization without any additional training.
  • Streaming and Deliberation: This work represents the first successful demonstration of modular features in a low-latency streaming environment. Furthermore, in "deliberation" systems—where a second pass refines initial hypotheses—Lego-Features outperformed the standard practice of using "N-best" text hypotheses. They proved to be more information-rich and 64% more compact in sequence length, leading to faster computation.
  • Efficiency: Generating these features is computationally inexpensive. Unlike auto-regressive decoding or complex beam searches, Lego-Features are produced via a simple projection at every frame.

Limitations and Future Directions

While Lego-Features represent a significant step toward modular ASR, some constraints remain. The system currently relies on a pre-trained "base" encoder to achieve peak performance; training the modular encoder from scratch using only CTC loss was found to be less effective. Additionally, the current implementation is tied to a wordpiece vocabulary. Future research may explore the use of phonemes or graphemes to create even more granular or universal features. Finally, the team aims to further shrink the Exporter and Importer layers to optimize the system for on-device deployment.

Summary updated

BibTeX
@inproceedings{botros2023lego,
  author = {Rami Botros and Rohit Prabhavalkar and Johan Schalkwyk and Ciprian Chelba and Tara N. Sainath and Françoise Beaufays},
  title = {{Lego-Features: Exporting modular encoder features for streaming and deliberation ASR}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2023},
  doi = {10.1109/icassp49357.2023.10095464},
}
Figure