Knowledge Fusion By Evolving Weights of Language Models
Guodong Du, Jing Li, Hanting Liu, Runhua Jiang, Shuyang Yu, Yifei Guo, Sim Kuan Goh, Ho-Kin Tang
TL;DR
This work addresses cross-domain robustness in language models by introducing Evolver, an evolutionary, gradient-free knowledge fusion method that merges weights from multiple fine-tuned models without additional data. Evolver forms a population of models, applies mutation and crossover to generate offspring, and retains elites based on development-set performance, integrating with existing merging techniques when beneficial. Across encoder-only, decoder-only, and encoder-decoder architectures on GLUE and emotion datasets, Evolver yields substantial improvements and better out-of-domain generalization compared with state-of-the-art knowledge fusion methods, while maintaining lower memory footprints. The findings demonstrate the viability of per-parameter, per-task coefficient optimization and highlight Evolver as a practical tool for cross-domain, cross-task robustness in NLP.
Abstract
Fine-tuning pre-trained language models, particularly large language models, demands extensive computing resources and can result in varying performance outcomes across different domains and datasets. This paper examines the approach of integrating multiple models from diverse training scenarios into a unified model. This unified model excels across various data domains and exhibits the ability to generalize well on out-of-domain data. We propose a knowledge fusion method named Evolver, inspired by evolutionary algorithms, which does not need further training or additional training data. Specifically, our method involves aggregating the weights of different language models into a population and subsequently generating offspring models through mutation and crossover operations. These offspring models are then evaluated against their parents, allowing for the preservation of those models that show enhanced performance on development datasets. Importantly, our model evolving strategy can be seamlessly integrated with existing model merging frameworks, offering a versatile tool for model enhancement. Experimental results on mainstream language models (i.e., encoder-only, decoder-only, encoder-decoder) reveal that Evolver outperforms previous state-of-the-art models by large margins. The code is publicly available at {https://github.com/duguodong7/model-evolution}.
