David helps Goliath: Inference-Time Collaboration Between Small Specialized and Large General Diffusion LMs

Xiaochuang Han, Sachin Kumar, Yulia Tsvetkov, Marjan Ghazvininejad

Abstract

Large Language Models (LLMs) present a significant challenge for individual users: they are often too massive for local fine-tuning on private data, and utilizing third-party APIs introduces privacy risks. This paper proposes a novel solution by leveraging the unique properties of diffusion-based language models. We introduce SSD-2, a scaled-up diffusion language model (up to 13B parameters) that enables effective inference-time collaboration. By allowing a small, specialized model ("David") to guide a massive general-purpose model ("Goliath") through iterative refinement, we demonstrate significant boosts in factuality and relevance without the need to retrain the larger model.

Introduction

Most modern LLMs are autoregressive (AR), predicting text token-by-token. While effective, AR models are difficult to ensemble at inference time because collaboration occurs without future context, often leading to incoherent outputs. Furthermore, users frequently possess specialized, private knowledge that they wish to integrate into a model's reasoning. Fine-tuning a 13B+ parameter model is computationally prohibitive for most, and uploading sensitive data to commercial APIs is often unacceptable.

Researchers from the University of Washington, Meta AI, and CMU address this by moving away from the AR paradigm toward diffusion-based language models. In this framework, text generation is treated as a denoising process, allowing models to refine entire blocks of text simultaneously. This iterative nature provides a unique opportunity for models of different scales to "negotiate" the final output.

Methods: Scaling and Collaboration

Scaling Diffusion LMs

To prove the viability of this approach, the authors scaled the existing SSD-LM framework to 13B parameters. Key algorithmic improvements include:

  • Self-conditioning: Utilizing the model's own prediction from the previous denoising step as context to accelerate convergence.
  • Efficient Training: Implementing specialized attention masks to process multiple text blocks in parallel.
  • Early Stopping: Terminating the denoising process once quality plateaus (typically after 60% of steps), significantly reducing inference latency.

The Collaboration Algorithm

The core innovation lies in how the models interact. Because simplex-based diffusion models represent tokens as vectors in a shared vocabulary space, two models can average their "logits" (raw scores) at each denoising step.

Comparison of collaboration mechanisms: Autoregressive (token-by-token) vs. Diffusion (iterative block refinement).

As illustrated in Figure 1, the collaboration in diffusion models is inherently bi-directional. When a small model suggests a specific factual change, the large model can observe that change across the entire block and adjust surrounding text to maintain grammatical and logical coherence. This contrasts sharply with AR models, where a small model's influence is limited to the immediate next token.

Experimental Results

The authors evaluated SSD-2 against autoregressive baselines (using the OPT model family) across several benchmarks, including the Vicuna test set and specialized DOLLY datasets annotated with Wikipedia passages.

Performance Metrics

Using GPT-3.5-turbo as an automated judge, the researchers measured Relevance, Factuality, Informativeness, Coherence, and Understandability. The results demonstrated that the SSD-2 collaboration consistently improved performance when the small model had access to specialized context.

Performance metrics across varying collaboration weights (λ_user), showing SSD-2's consistent improvements (blue) compared to OPT's performance degradation (red).

As shown in Figure 4, the SSD-2 collaboration (indicated by blue deltas) shows positive gains across nearly all metrics as the weight of the user-specialized model ($\lambda_{user}$) increases. In contrast, the AR-based OPT collaboration (red deltas) frequently resulted in lower scores than the large model acting alone, highlighting the difficulty of token-level ensembling.

Human Preference and Win Rates

In a blind human preference test, participants preferred the SSD-2 collaboration outputs in 45.7% of cases, while the OPT collaboration was preferred only 26.6% of the time. Furthermore, in a one-shot setting on the Vicuna benchmark, the 13B SSD-2 model achieved a 52.3% win rate against the 13B OPT model.

Discussion and Future Work

While diffusion models offer a modular and privacy-preserving alternative to AR models, challenges remain. Decoding speed is currently slower than AR models due to the iterative nature of denoising. Additionally, the SSD-2 models were trained on 38 billion tokens—a fraction of the data used for state-of-the-art models like Llama-3—suggesting that further scaling could yield even greater performance.

This work establishes a compelling precedent for "David helping Goliath," showing that small, local models can effectively ground massive general models in specialized facts through the bi-directional flexibility of diffusion.

Summary updated

BibTeX
@inproceedings{han2024david,
  author = {Xiaochuang Han and Sachin Kumar and Yulia Tsvetkov and Marjan Ghazvininejad},
  title = {{David helps Goliath: Inference-Time Collaboration Between Small Specialized and Large General Diffusion LMs}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.naacl-long.464},
}
Figure