Introduction
The rapid proliferation of specialized Large Language Models (LLMs) has created a wealth of expert knowledge across domains like coding, medicine, and mathematics. However, aggregating this knowledge into a single, versatile model remains a significant challenge. Traditional ensembling is computationally prohibitive due to memory overhead, while weight merging is restricted to models sharing identical architectures. Knowledge fusion techniques, such as FuseLLM, attempt to bridge this gap by training a target model to mimic source distributions, but they often suffer from "knowledge interference"—where irrelevant or low-quality predictions from some source models degrade the overall performance of the fused model.
This paper introduces Fusion-$\mathcal{X}$, a dynamic integration framework designed to selectively fuse knowledge from diverse, architecturally heterogeneous LLMs. By intelligently weighting source contributions, Fusion-$\mathcal{X}$ reduces knowledge interference by up to 50% and enables effective scaling as more models are added to the pool.
Methodology
Fusion-$\mathcal{X}$ moves beyond static fusion by implementing a dynamic selection mechanism that identifies the most relevant source models for any given input. The framework consists of three core pillars:
- Adaptive Selection Network (ASN): A learnable module that evaluates the probabilistic outputs of candidate source LLMs. It assigns scores to each model and employs a dynamic threshold to select only the top-performing subset for a specific sequence.
- Dynamic Weighted Fusion: The probability distributions of the selected models are combined via a weighted sum. The weights are derived from the ASN's scores, ensuring that the most confident and contextually relevant models dominate the training signal.
- Feedback-Driven Loss Function: To prevent the selection network from collapsing into a state where it only utilizes a few generalist models, the authors introduce a feedback loss based on the coefficient of variation of selection weights. This encourages the system to leverage the unique expertise of all models in the source pool.
Experimental Setup
The framework was evaluated by continually training a target model on the MiniPile dataset, a 1.8 billion token corpus spanning 22 domains. Performance was measured across several key benchmarks:
- Common Sense (CS): ARC, BoolQ, HellaSwag, and OpenBookQA.
- Big-Bench Hard (BBH): Complex reasoning tasks.
- MMLU: General world knowledge.
- MultiPL-E (ME): Code generation capabilities.
Results and Discussion
The experimental results demonstrate that Fusion-$\mathcal{X}$ significantly outperforms existing fusion baselines, particularly as the complexity and number of source models increase.
Mitigating Knowledge Interference
A critical insight from the study is that "more models" do not automatically lead to better performance in standard fusion pipelines. As shown in Figure 1, baseline methods like FuseLLM often experience increased degradation ratios when scaling from 3 to 5 source models. In contrast, Fusion-$\mathcal{X}$ maintains high accuracy and low degradation by filtering out noisy contributions through its adaptive selection mechanism.
Performance Gains and Efficiency
On the BBH benchmark, fusing four LLMs into a Llama-2-7B target model yielded a 5.3% accuracy improvement, nearly doubling the gain of the FuseLLM baseline (2.7%). Furthermore, Fusion-$\mathcal{X}$ proved to be highly sample-efficient, achieving comparable perplexity to baselines while requiring 3x fewer training tokens.
Conclusion and Future Work
Fusion-$\mathcal{X}$ provides a flexible and scalable solution for multi-LLM integration, overcoming the architectural constraints of weight merging and the interference issues of static fusion. While the current implementation requires a preprocessing step for token alignment between heterogeneous vocabularies, its ability to combine diverse models like Llama, Pythia, and Starcoder represents a major step forward. Future research will focus on evaluating the framework across even more diverse training distributions to further refine the routing behavior of the Adaptive Selection Network.
Summary updated