Enabling Ensemble Learning for Heterogeneous Large Language Models with Deep Parallel Collaboration

Yichong Huang, Xiaocheng Feng, Baohang Li, Yang Xiang, Hui Wang, Bing Qin, Ting Liu · DOI

Abstract

Ensembling large language models (LLMs) typically requires training additional reward or fusion models, which often fail to generalize. We present DEEPEN (Deep Parallel Ensemble), a training-free framework that enables heterogeneous LLMs to collaborate by fusing their probability distributions. By mapping disparate vocabularies into a shared relative space based on token similarities, DEEPEN allows for effective ensembling of diverse models like LLaMA and Mistral without extra parameters.

Introduction

The current LLM landscape is populated by numerous models with distinct architectures and training data, leading to varied strengths and weaknesses. While ensembling these models is a promising path to improved performance, technical barriers—specifically vocabulary discrepancy—hinder deep collaboration. Existing selection-based or text-level fusion methods often ignore the rich internal information of models, such as confidence levels and alternative token rankings.

Problem Statement: Vocabulary Discrepancy

The fundamental blocker for deeper collaboration is the mismatch in tokenization across models. If Model A and Model B use different token sets, their output probability distributions cannot be directly averaged. Current solutions often rely on text-based voting or expensive training of alignment layers, which struggle with out-of-distribution data.

Methodology: DEEPEN Framework

DEEPEN addresses the vocabulary gap using Relative Representation Theory. The framework operates in four primary stages:

  1. Relative Space Mapping: Instead of absolute token IDs, DEEPEN represents output semantics through similarity to a set of "anchor tokens" shared across models. This creates a universal relative space.
  2. Aggregation: Once mapped, distributions are combined via simple or weighted averaging.
  3. Search-based Inverse Transformation: To generate text, the aggregated relative representation is mapped back to the "main" model's probability space using an iterative gradient descent search.
  4. Training-Free Execution: The process leverages existing embeddings, requiring no additional training.
Relative representation consistency across heterogeneous models (LLaMA2 and Mistral).

Evaluation

DEEPEN was evaluated across six benchmarks to test various capabilities:

  • Comprehensive Knowledge: MMLU and ARC-C.
  • Reasoning: GSM8K and PIQA.
  • Knowledge Retrieval: TriviaQA and Natural Questions (NQ).
  • Translation: Flores-200.

Results and Insights

Cross-Model Invariance

A key finding is that while latent spaces are misaligned, the relationships (similarities) between tokens remain remarkably consistent across models. This invariance is what makes the relative space mapping effective.

Performance Gains

DEEPEN achieved consistent improvements across all benchmarks. On MMLU, performance increased by ~1.4% in a top-2 ensemble and up to ~2.5% with adaptive weighting. It proved more stable than edit-distance-based alignment (MINED), which often produced fragmented text.

Specialist-Generalist Synergy

Interestingly, ensembling a high-performing specialist (e.g., a translator) with a generalist LLM via distribution fusion improved the specialist's performance, as the generalist provided "semantic scaffolding."

Limitations and Future Work

While effective, DEEPEN faces challenges:

  • Interference: Adding significantly weaker models can degrade ensemble performance.
  • Latency: The inverse transformation adds approximately 17% token-level latency, though this can be mitigated by skipping fusion when models already agree.
  • Weighting: Future work will explore adaptive, token-level weighting to dynamically determine model trust during generation.

Summary updated

BibTeX
@inproceedings{huang2024enabling,
  author = {Yichong Huang and Xiaocheng Feng and Baohang Li and Yang Xiang and Hui Wang and Bing Qin and Ting Liu},
  title = {{Enabling Ensemble Learning for Heterogeneous Large Language Models with Deep Parallel Collaboration}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=7arAADUK6D},
}
Figure