LegoNN: Building Modular Encoder-Decoder Models
Not on the map. Why?
Abstract (arXiv)
State-of-the-art encoder-decoder models (e.g. for machine translation (MT) or automatic speech recognition (ASR)) are constructed and trained end-to-end as an atomic unit. No component of the model can be (re-)used without the others, making it impossible to share parts, e.g. a high resourced decoder, across tasks. We describe LegoNN, a procedure for building encoder-decoder architectures in a way so that its parts can be applied to other tasks without the need for any fine-tuning. To achieve this reusability, the interface between encoder and decoder modules is grounded to a sequence of marginal distributions over a pre-defined discrete vocabulary. We present two approaches for ingesting these marginals; one is differentiable, allowing the flow of gradients across the entire network, and the other is gradient-isolating. To enable the portability of decoder modules between MT tasks for different source languages and across other tasks like ASR, we introduce a modality agnostic encoder which consists of a length control mechanism to dynamically adapt encoders' output lengths in order to match the expected input length range of pre-trained decoders. We present several experiments to demonstrate the effectiveness of LegoNN models: a trained language generation LegoNN decoder module from German-English (De-En) MT task can be reused without any fine-tuning for the Europarl English ASR and the Romanian-English (Ro-En) MT tasks, matching or beating the performance of baseline. After fine-tuning, LegoNN models improve the Ro-En MT task by 1.5 BLEU points and achieve 12.5% relative WER reduction on the Europarl ASR task. To show how the approach generalizes, we compose a LegoNN ASR model from three modules -- each has been learned within different end-to-end trained models on three different datasets -- achieving an overall WER reduction of 19.5%.
Key facts. Cited by 9 papers in the map (data through 7 Oct 2026). Builds on 48 of its 81 references that are in the map. First posted on arXiv 7 Jun 2022.
Builds on
48 of 81 references.
References · 48
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2014Adam: A Method for Stochastic Optimizationcited by 36,960
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2016Layer Normalizationcited by 5,579
- 2022PaLM: Scaling Language Modeling with Pathwayscited by 5,304
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,530
- 2014Sequence to Sequence Learning with Neural Networkscited by 2,974
- 2015Neural Machine Translation of Rare Words with Subword Unitscited by 2,898
- 2018SentencePiece: A simple and language independent subword tokenizer and detokenizer for Neural Text Processingcited by 1,973
- 2020Conformer: Convolution-augmented Transformer for Speech Recognitioncited by 1,838
- 2018A Call for Clarity in Reporting BLEU Scorescited by 1,790
36 more
- 2019fairseq: A Fast, Extensible Toolkit for Sequence Modelingcited by 1,486
- 2019SpecAugment: A Simple Data Augmentation Method for Automatic Speech Recognitioncited by 1,355
- 2015Effective Approaches to Attention-based Neural Machine Translationcited by 1,024
- 2015Improving Neural Machine Translation Models with Monolingual Datacited by 784
- 2013Speech Recognition with Deep Recurrent Neural Networkscited by 666
- 2018ESPnet: End-to-End Speech Processing Toolkitcited by 554
- 2017Convolutional Sequence to Sequence Learningcited by 550
- 2015Listen, Attend and Spellcited by 542
- 2017Non-Autoregressive Neural Machine Translationcited by 457
- 2015Deep Speech 2: End-to-End Speech Recognition in English and Mandarincited by 449
- 2015Neural Module Networkscited by 375
- 2014Deep Speech: Scaling up end-to-end speech recognitioncited by 354
- 2016Joint CTC-Attention based End-to-End Speech Recognition using Multi-task Learningcited by 254
- 2013Zero-Shot Learning Through Cross-Modal Transfercited by 237
- 2018Stress Test Evaluation for Natural Language Inferencecited by 211
- 2019A Comparative Study on Transformer vs RNN in Speech Applicationscited by 210
- 2018Scaling Neural Machine Translationcited by 204
- 2016Modular Multitask Reinforcement Learning with Policy Sketchescited by 200
- 2018Deterministic Non-Autoregressive Neural Sequence Modeling by Iterative Refinementcited by 194
- 2015End-to-End Attention-based Large Vocabulary Speech Recognitioncited by 148
- 2016Learning Modular Neural Network Policies for Multi-Task and Multi-Robot Transfercited by 124
- 2019Task-Driven Modular Networks for Zero-Shot Compositional Learningcited by 121
- 2019Europarl-ST: A Multilingual Corpus For Speech Translation Of Parliamentary Debatescited by 114
- 2014Long Short-Term Memory Based Recurrent Neural Network Architectures for Large Vocabulary Speech Recognitioncited by 111
- 2020Fully Non-autoregressive Neural Machine Translation: Tricks of the Tradecited by 99
- 2020Non-Autoregressive Machine Translation with Latent Alignmentscited by 96
- 2015EESEN: End-to-End Speech Recognition using Deep RNN Models and WFST-based Decodingcited by 73
- 2018End-to-End Non-Autoregressive Neural Machine Translation with Connectionist Temporal Classificationcited by 72
- 2019Learning to Control Self-Assembling Morphologies: A Study of Generalization via Modularitycited by 68
- 2019Neural Module Networks for Reasoning over Textcited by 65
- 2020Imputer: Sequence Modelling via Imputation and Dynamic Programmingcited by 65
- 2020Aligned Cross Entropy for Non-Autoregressive Machine Translationcited by 65
- 2019Transformers with convolutional context for ASRcited by 44
- 2020Single headed attention based sequence-to-sequence model for state-of-the-art results on Switchboardcited by 36
- 2020DiscreTalk: Text-to-Speech as a Machine Translation Problemcited by 21
- 2019Listen and Fill in the Missing Letters: Non-Autoregressive Transformer for Speech Recognitioncited by 4
Built on by
Citing papers per year: 2022: 4; 2023: 2; 2024: 2; 2025: 1.
9 papers.
- 2024LLM Augmented LLMs: Expanding Capabilities through Compositioncited by 35
- 2022CTC Alignments Improve Autoregressive Translationcited by 25
- 2022Lego-MT: Learning Detachable Models for Massively Multilingual Machine Translationcited by 21
- 2022Accelerating RNN-T Training and Inference Using CTC guidancecited by 17
- 2022Bayes risk CTC: Controllable CTC alignment in Sequence-to-Sequence taskscited by 12
- 2023Lego-Features: Exporting modular encoder features for streaming and deliberation ASRcited by 3
- 2025LegoSLM: Connecting LLM with Speech Encoder using CTC Posteriorscited by 3
- 2023Leveraging Multilingual Self-Supervised Pretrained Models for Sequence-to-Sequence End-to-End Spoken Language Understandingcited by 1
- 2024Coupling Speech Encoders with Downstream Text Modelscited by 0
- 2025LegoSLM: Connecting LLM with Speech Encoder using CTC Posteriors16 May 2025
- 2024Coupling Speech Encoders with Downstream Text Models24 Jul 2024
- 2024LLM Augmented LLMs: Expanding Capabilities through Composition4 Jan 2024
- 2023Leveraging Multilingual Self-Supervised Pretrained Models for Sequence-to-Sequence End-to-End Spoken Language Understanding9 Oct 2023
- 2023Lego-Features: Exporting modular encoder features for streaming and deliberation ASR31 Mar 2023
- 2022Lego-MT: Learning Detachable Models for Massively Multilingual Machine Translation20 Dec 2022
- 2022Accelerating RNN-T Training and Inference Using CTC guidance29 Oct 2022
- 2022Bayes risk CTC: Controllable CTC alignment in Sequence-to-Sequence tasks14 Oct 2022
- 2022CTC Alignments Improve Autoregressive Translation11 Oct 2022