Skip to main content
QUICK REVIEW

[Paper Review] Adapting GPT, GPT-2 and BERT Language Models for Speech Recognition

Xianrui Zheng, Chao Zhang|arXiv (Cornell University)|Jul 29, 2021
Speech Recognition and SynthesisComputer Science44 references5 citations
TL;DR

This paper proposes a novel method to convert bidirectional language model (e.g., BERT) outputs into mathematically exact sentence prior probabilities for automatic speech recognition (ASR), enabling effective integration of BERT with unidirectional models like GPT and GPT-2. The approach achieves state-of-the-art WER reductions—up to 12% relative and 3% relative on AMI—by combining fine-tuned GPT, GPT-2, and BERT, with the best performance from a hybrid model using optimized context handling and probability conversion.

ABSTRACT

Language models (LMs) pre-trained on massive amounts of text, in particular bidirectional encoder representations from Transformers (BERT), generative pre-training (GPT), and GPT-2, have become a key technology for many natural language processing tasks. In this paper, we present results using fine-tuned GPT, GPT-2, and their combination for automatic speech recognition (ASR). Unlike unidirectional LM GPT and GPT-2, BERT is bidirectional whose direct product of the output probabilities is no longer a valid language prior probability. A conversion method is proposed to compute the correct language prior probability based on bidirectional LM outputs in a mathematically exact way. Experimental results on the widely used AMI and Switchboard ASR tasks showed that the combination of the fine-tuned GPT and GPT-2 outperformed the combination of three neural LMs with different architectures trained from scratch on the in-domain text by up to a 12% relative word error rate reduction (WERR). Furthermore, on the AMI corpus, the proposed conversion for language prior probabilities enables BERT to obtain an extra 3% relative WERR, and the combination of BERT, GPT and GPT-2 results in further improvements.

Motivation & Objective

  • To adapt pre-trained unidirectional language models (GPT, GPT-2) and bidirectional models (BERT) for automatic speech recognition (ASR) using fine-tuning on in-domain data.
  • To address the challenge that direct multiplication of BERT's output probabilities does not yield valid sentence prior probabilities due to its bidirectional context.
  • To develop a mathematically exact method for converting bidirectional LM outputs into valid language prior probabilities for ASR decoding.
  • To evaluate the performance of combined unidirectional and bidirectional LMs in rescoring ASR hypotheses and improve word error rate (WER).
  • To demonstrate that fine-tuned pre-trained models outperform neural LMs trained from scratch on in-domain data alone.

Proposed method

  • Proposes a novel probability conversion method based on Eq. (7) that computes exact sentence prior probabilities from BERT’s bidirectional outputs, ensuring mathematical correctness.
  • Applies the conversion method to fine-tuned BERT, enabling its integration into the ASR decoding pipeline as a language prior.
  • Uses left and right context (LC and RC) from 100-best hypothesis lists and, optionally, reference transcriptions to enrich context for BERT’s probability estimation.
  • Employs a multi-model rescoring strategy combining fine-tuned GPT, GPT-2, and BERT, with model weights adjusted via linear interpolation (α = 0.7).
  • Utilizes a cache of 1-best hypotheses to serve as left context for BERT, while future context is modeled using either 1-best or reference hypotheses.
  • Employs a multi-head attention mechanism with masked self-attention in the decoder for unidirectional models (GPT, GPT-2), and full self-attention in the encoder for BERT.

Experimental results

Research questions

  • RQ1Can fine-tuned GPT and GPT-2 models outperform neural language models trained from scratch on in-domain data in ASR?
  • RQ2Is it possible to convert the output probabilities of a bidirectional language model like BERT into mathematically valid sentence prior probabilities for ASR?
  • RQ3How does the inclusion of bidirectional context (from both past and future) in BERT improve ASR performance compared to unidirectional models?
  • RQ4What is the optimal combination strategy for integrating unidirectional (GPT, GPT-2) and bidirectional (BERT) language models in ASR rescoring?
  • RQ5Does using reference transcriptions for future context improve the quality of BERT-based language priors in ASR?

Key findings

  • The combination of fine-tuned GPT and GPT-2 models reduced WER by up to 12% relative compared to a 4-gram baseline on the AMI eval set.
  • On the AMI corpus, the proposed probability conversion method enabled BERT to achieve a 3% relative WER reduction over a baseline method, demonstrating its effectiveness.
  • Using 50 tokens of left context and 20 tokens of right context (with 1-best hypotheses) yielded the best WER of 17.0% on ADev and 16.9% on AEval with the proposed method (M=2).
  • Replacing 1-best right context with reference transcriptions (20 future tokens) further reduced WER to 16.8% on ADev and 16.7% on AEval, showing the benefit of higher-quality future context.
  • The combination of fine-tuned GPT, GPT-2, and BERT achieved the lowest WER of 15.9% on ADev and 15.5% on AEval, outperforming any single model or two-model combination.
  • The proposed method with M=2 and optimal context lengths reduced WER by 0.2% absolute compared to the best MMLM baseline, demonstrating its superiority in handling bidirectional context.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.