TL;DR
This paper introduces Multimodal Attention Merging (MAM), a novel technique to transfer knowledge from large, well-resourced models (like those trained on text and images) to smaller, resource-constrained models (like those for speech and audio) without requiring extensive fine-tuning. MAM achieves significant improvements in speech recognition and audio event classification by merging the attention mechanisms of these models, demonstrating a promising path towards more efficient and accessible AI.
What Problem Does This Paper Address?
The current paradigm in deep learning involves training massive "foundation models" on vast amounts of unlabeled data, then fine-tuning them for specific tasks. While effective, this approach faces two major hurdles: the immense computational cost of fine-tuning these large models, and the scarcity of labeled data for many specialized domains, particularly in areas like speech and audio compared to text and images. This paper tackles the challenge of leveraging the knowledge embedded in high-resource models to boost the performance of models in low-resource domains, especially for sequence-to-sequence tasks like Automatic Speech Recognition (ASR) and Audio Event Classification (AEC), without demanding prohibitive computational resources or large amounts of task-specific labeled data.
Methods
The core innovation is Multimodal Attention Merging (MAM). The authors propose transferring knowledge directly from the attention matrices of pre-trained models in high-resource modalities (source models, e.g., BERT for text, Vision Transformer for images) to models in low-resource modalities (target models, e.g., HuBERT for speech, BEATS for audio).
The paper explores three main approaches:
- Attention Interpolation: This is the foundational method where the attention matrices (Query, Key, Value) of the source and target models are combined using a convex combination, controlled by an interpolation factor ($\lambda$). This is applied across all layers of the attention mechanism.
- Layer-wise Attention Interpolation: Recognizing that not all layers might be equally important for knowledge transfer, this method allows for merging only a subset of attention layers. This aims to identify if merging all layers is truly necessary or if a strategic selection can yield better results.
- Attention-Merging with Learnable Interpolation (L-MAM): This is a more advanced, data-driven approach. Instead of fixing the interpolation factor ($\lambda$), L-MAM learns this factor during the fine-tuning process. This allows for a more flexible and task-specific transfer of knowledge, effectively acting as a "gate" for information flow from the source to the target modality. Importantly, only the target model's weights are optimized during this fine-tuning, while the source model remains frozen.
A key aspect of their methodology is the use of the Sliced Wasserstein Distance (SWD) to identify the most relevant attention layers to merge, based on the similarity of hidden representations between source and target models.
Datasets
The paper utilizes several well-known datasets for training and evaluation:
- For ASR:
- Source Model Pre-training: BERT-large-uncased (pre-trained on Wikipedia and BookCorpus).
- Target Model Pre-training: HuBERT-large (pre-trained on Libri-Light).
- Evaluation Datasets: * LJ Speech: A single-speaker dataset for ASR.
- VCTK: A multi-speaker dataset for ASR, featuring diverse accents.
- For AEC:
- Source Model Pre-training: Vision Transformer (ViT) (pre-trained on ImageNet).
- Target Model Pre-training: BEATS (pre-trained on AudioSet).
- Evaluation Dataset: * ESC-50: A dataset of environmental audio recordings for classification.
Key Insights and Ideas
- Attention Matrices as Knowledge Carriers: The central idea that attention matrices, rather than just model weights, can effectively encapsulate and transfer knowledge across modalities is a significant insight. This suggests that the "how" of processing information (attention patterns) is as transferable as the "what" (learned representations).
- Zero-Shot Transfer is Powerful: MAM demonstrates that substantial improvements can be achieved even in a zero-shot setting, meaning without any fine-tuning on the target task's data. This highlights the inherent generalization capabilities of attention mechanisms.
- Layer-wise Merging Can Be Effective: The finding that merging only a subset of layers can be as effective, or even better, than merging all layers suggests that specific layers might be more crucial for cross-modal knowledge transfer.
- Data-Driven Layer Selection Outperforms Heuristics: Using SWD to identify the most similar layers for merging proved to be a more robust strategy than simply merging continuous blocks of layers, especially when paired data is available.
- Learnable Interpolation is Key for Fine-Tuning: When some data is available, learning the interpolation factor (L-MAM) during fine-tuning leads to superior performance compared to fixed interpolation or standard fine-tuning alone.
Key Results
- Zero-Shot Improvements:
- MAM reduced the relative Word Error Rate (WER) of an ASR model (HuBERT) by up to 6.70% on LJ Speech and 1.80% on VCTK.
- MAM reduced the relative classification error of an AEC model (BEATS) by 10.63% on ESC-50.
- Fine-Tuning Improvements (L-MAM):
- L-MAM achieved a further 2.90% relative reduction in WER for ASR on VCTK.
- L-MAM achieved an 18.42% relative reduction in classification error for AEC on ESC-50.
- Qualitative Improvements: MAM was shown to improve transcriptions for homophonic words and handle non-standard pronunciations more effectively.
Limitations and Future Work
- Model Size and Architecture Constraints: The current MAM approach requires source and target models to have the same number of attention layers and hidden layer sizes. This limits its applicability to models with different architectures.
- Merging Larger Models: The authors suggest that future work could explore merging larger, state-of-the-art models, which are often billions of parameters.
- Multi-Modality Merging: Extending MAM to merge three or more modalities is another promising direction.
- Parameter Efficiency: Investigating parameter-efficient merging techniques, such as using adapter modules or low-rank representations, is proposed as a way to reduce computational overhead.
- Generalized Multi-Task Architectures: The paper advocates for building generalized multi-task architectures by equipping merged models with cross-modality capabilities.
Summary updated