LaMDA: Language Models for Dialog Applications

Romal Thoppilan, Daniel De Freitas, Jamie Hall, Noam Shazeer, Apoorv Kulshreshtha, Heng-Tze Cheng, Alicia Jin, Taylor Bos, Leslie Baker, Yu Du, YaGuang Li, Hongrae Lee, Huaixiu Steven Zheng, Amin Ghafouri, Marcelo Menegali, Yanping Huang, Maxim Krikun, Dmitry Lepikhin, James Qin, Dehao Chen, Yuanzhong Xu, Zhifeng Chen, Adam Roberts, Maarten Bosma, Yanqi Zhou, Chung-Ching Chang, Igor Krivokon, Will Rusch, Marc Pickett, Kathleen S. Meier-Hellstern, Meredith Ringel Morris, Tulsee Doshi, Renelito Delos Santos, Toju Duke, Johnny Soraker, Ben Zevenbergen, Vinodkumar Prabhakaran, Mark Diaz, Ben Hutchinson, Kristen Olson, Alejandra Molina, Erin Hoffman-John, Josh Lee, Lora Aroyo, Ravi Rajakumar, Alena Butryna, Matthew Lamm, Viktoriya Kuzmina, Joe Fenton, Aaron Cohen, Rachel Bernstein, Ray Kurzweil, Blaise Agüera y Arcas, Claire Cui, Marian Croak, Ed H. Chi, Quoc LearXiv 2022

Abstract

LaMDA is a family of Transformer-based neural language models specialized for dialog, with up to 137B parameters. While model scaling improves quality, it shows diminishing returns for safety and factual grounding. We demonstrate that fine-tuning with annotated data and enabling external knowledge consultation leads to significant improvements. We quantify safety using human-value metrics and groundedness via external tool use, showing that LaMDA generates responses that are both safe and factually accurate rather than merely plausible.

Introduction

Large language models (LLMs) have demonstrated remarkable text generation capabilities, yet they often struggle in dialog settings with three core issues: quality, safety, and groundedness. Quality involves generating sensible, specific, and interesting responses. Safety requires avoiding harmful suggestions and bias. Groundedness is the ability to prevent "hallucinations" by anchoring responses in factual evidence.

The LaMDA (Language Models for Dialog Applications) project addresses these challenges by moving beyond simple model scaling. While increasing parameters improves general performance, the "safety gap" and factual inaccuracies persist. LaMDA bridges this gap by integrating human-value alignment and external knowledge retrieval directly into the fine-tuning process.

Architecture and Methodology

LaMDA utilizes a standard decoder-only Transformer architecture, scaled to 137B non-embedding parameters. It is pre-trained on "Infiniset," a 1.56T word dataset comprising public dialogs, Wikipedia, code, and web documents.

The LaMDA architecture employs a decoder-only Transformer design for dialog generation.

The primary innovation is a multi-stage fine-tuning approach:

  1. Discriminative and Generative Fine-tuning: The model is trained to generate responses and simultaneously predict quality and safety scores. During inference, a "sample-and-rank" strategy is used: the model generates multiple candidates, filters out those deemed unsafe, and ranks the survivors based on a weighted sum of Sensibleness, Specificity, and Interestingness (SSI).
  2. Factual Grounding via Toolset (TS): To combat hallucinations, LaMDA is fine-tuned to recognize when it requires external information. It can generate a special query string to call a toolset (TS) containing a search engine, calculator, and translator. The model then synthesizes the retrieved information into a grounded response.

Fine-tuning and Evaluation

The fine-tuning process relies on specialized human-annotated datasets:

  • Quality (SSI): 64K dialogs labeled for sensibleness, specificity, and interestingness.
  • Safety: 8K dialogs labeled against illustrative safety objectives.
  • Groundedness: 4K dialogs where crowdworkers demonstrated tool use to verify and rewrite claims.

Evaluation was conducted using the Mini-Turing Benchmark (MTB) and a holdout set of "provocative" turns designed to test the limits of the model's safety filters.

Key Results and Discussion

The results demonstrate that fine-tuning is the primary driver for safety and groundedness, whereas scaling alone is insufficient.

Fine-tuning significantly improves LaMDA's performance across quality, safety, and groundedness metrics compared to pre-training alone.

As shown in the evaluation, LaMDA-137B significantly outperforms its pre-trained (PT) counterparts:

  • Quality: Sensibleness reached 92.3% for the fine-tuned 137B model, compared to 80.2% for the PT version.
  • Safety: Safety scores improved to 95.2%, a substantial jump from the PT model's 88%.
  • Groundedness: By utilizing the toolset, groundedness increased to 73.2%, while the PT model (relying on internal memory) achieved only 57.9%.

A critical insight is the "Research" loop: treating the model as an agent that can perform internal search queries before presenting a final answer. This shifts the system from relying on fallible internal weights to verifiable external evidence. Furthermore, the SSI metric ensures the model remains engaging; by prioritizing specificity and interestingness, the model avoids generic "I don't know" responses.

Limitations and Future Directions

Despite these advancements, LaMDA still performs below human levels in safety and groundedness, particularly in complex reasoning. Hallucinations persist in approximately 30% of cases, often due to misinterpreting search results. Additionally, the fine-tuning data reflects the biases of its crowdworker pool (predominantly U.S.-based). Future work will focus on broader crowdworker representation, enhanced reasoning capabilities, and participatory fine-tuning to define more inclusive AI safety boundaries.

Summary updated

BibTeX
@misc{thoppilan2022lamda,
  author = {Romal Thoppilan and Daniel De Freitas and Jamie Hall and Noam Shazeer and Apoorv Kulshreshtha and Heng-Tze Cheng and Alicia Jin and Taylor Bos and Leslie Baker and Yu Du and YaGuang Li and Hongrae Lee and Huaixiu Steven Zheng and Amin Ghafouri and Marcelo Menegali and Yanping Huang and Maxim Krikun and Dmitry Lepikhin and James Qin and Dehao Chen and Yuanzhong Xu and Zhifeng Chen and Adam Roberts and Maarten Bosma and Yanqi Zhou and Chung-Ching Chang and Igor Krivokon and Will Rusch and Marc Pickett and Kathleen S. Meier-Hellstern and Meredith Ringel Morris and Tulsee Doshi and Renelito Delos Santos and Toju Duke and Johnny Soraker and Ben Zevenbergen and Vinodkumar Prabhakaran and Mark Diaz and Ben Hutchinson and Kristen Olson and Alejandra Molina and Erin Hoffman-John and Josh Lee and Lora Aroyo and Ravi Rajakumar and Alena Butryna and Matthew Lamm and Viktoriya Kuzmina and Joe Fenton and Aaron Cohen and Rachel Bernstein and Ray Kurzweil and Blaise Agüera y Arcas and Claire Cui and Marian Croak and Ed H. Chi and Quoc Le},
  title = {{LaMDA: Language Models for Dialog Applications}},
  year = {2022},
  eprint = {2201.08239},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2201.08239},
}
Figure