AHAMask: Reliable Task Specification for Large Audio Language Models Without Instructions

Yiwei Guo, Bohan Li, Hankun Wang, Zhihan Li, Shuai Wang, Xie Chen, Kai Yu

TL;DR

Large Audio Language Models (LALMs) are notoriously sensitive to how you phrase instructions—a phenomenon known as prompt sensitivity. AHAMask replaces fickle text prompts with a learned, binary mask over the model's attention heads, triggering specific tasks (like transcription or emotion recognition) more reliably and with a negligible parameter footprint.

What Problem Does This Paper Address?

Current LALMs (like SALMONN or Qwen2Audio) are "unified" models: you give them audio and a text instruction, and they perform a task. However, they suffer from extreme prompt sensitivity. Changing a few words, altering punctuation, or switching from a simple to a complex sentence structure can cause the model to fail or hallucinate, even if the underlying task remains the same.

The authors argue that instead of relying on the "unified surface" of natural language—which is high-variance and often unreliable—we should look inside the model. They hypothesize that LALMs contain "functional pathways": specific circuits of attention heads that correspond to different tasks. By finding and activating these pathways directly, we can bypass the need for text instructions entirely.

Comparison between a standard LALM (left) and the AHAMask approach (right).

Methods

The researchers propose AHAMask (Acoustic Attention Head Mask). Instead of prompting the model, they learn a binary mask for every attention head in the LLM backbone.

  1. Selective Masking: For a given task (e.g., ASR), they determine which attention heads should be active and which should be silenced.
  2. Gumbel-Sigmoid Training: To make the discrete "on/off" masking process differentiable, they use the Gumbel-Sigmoid trick. This allows them to train the masks using standard gradient descent while keeping the original model parameters frozen.
  3. Extreme Efficiency: The number of trainable parameters is tiny—exactly equal to the number of attention heads in the backbone (e.g., 1,600 for SALMONN). This is orders of magnitude smaller than popular methods like LoRA.
  4. Inference: Once trained, the mask is just a bitstring. To run a task, you apply the mask and feed the audio; no text prompt is required.

Datasets

The authors evaluated AHAMask across a wide range of audio understanding tasks:

  • Linguistic: LibriSpeech (ASR), Libri2Mix (Overlapped Speech Recognition), and CoVoST2 (Speech-to-Text Translation).
  • Paralinguistic: IEMOCAP (Emotion Recognition), LibriSpeech (Gender Recognition), and VoxCeleb1 (Speaker Verification).
  • General Acoustic: AudioCaps (Audio Captioning).
  • Composite Tasks: Multi-hop tasks requiring the model to perform two tasks at once (e.g., ASR + Gender Recognition) and output the results in specific formats like JSON.

Key Insights and Ideas

  • Functional Pathways Exist: The most significant "aha moment" is that LALMs naturally partition their internal logic. You don't need to teach the model a task; you just need to unmask the part of the model that already knows how to do it.
  • Task Similarity = Head Overlap: Tasks that are intuitively similar (like ASR and Overlapped Speech Recognition) share a high percentage of activated attention heads. This is visualized through Jaccard similarity matrices in the paper.
  • Gradual Functionality: Functionality isn't a light switch. By activating heads in order of importance, the authors observed a "pathway" forming: the model moves from generating meaningless strings to incorrect labels, then to correct labels, and finally to detailed descriptions.
  • The "All Roads Lead to Rome" Effect: There isn't just one "correct" mask for a task. Different training runs with different seeds produced different masks that performed equally well, suggesting significant redundancy in the LLM's internal pathways.
Jaccard similarities showing how different tasks share internal functional pathways.

Key Results

  • Beating the Prompt: On almost all 7 single tasks, AHAMask performed comparably to or better than the best-tuned natural language instructions.
  • Solving Composite Tasks: LALMs often struggle with complex, multi-step instructions (e.g., "Transcribe this and then tell me the speaker's gender in JSON format"). AHAMask significantly improved performance here, achieving much higher Instruction Following Rates (IFR) than text prompts.
  • Unlocking Base Models: Remarkably, AHAMask can trigger high-level performance in "Base" models that haven't even undergone instruction fine-tuning, effectively bypassing the need for expensive SFT (Supervised Fine-Tuning) for specific tasks.
Experiments showing the high sensitivity of SALMONN to different prompt variations.

Limitations and Future Work

  • Generalizability: While the masks show some ability to work on out-of-domain data, they are still somewhat tied to the distribution they were trained on. A mask trained only on clean audio might struggle with noisy environments.
  • Scaling to Arbitrary Tasks: Currently, you need to train a mask for each specific task. The authors suggest that a future "text-to-mask" converter could allow users to type a prompt which then dynamically generates the appropriate attention mask.
  • Interpretability: While we now know which heads are important, we don't yet fully understand the specific mathematical operations those heads are performing to process audio features.

Summary updated

BibTeX
@inproceedings{guo2026ahamask,
  author = {Yiwei Guo and Bohan Li and Hankun Wang and Zhihan Li and Shuai Wang and Xie Chen and Kai Yu},
  title = {{AHAMask: Reliable Task Specification for Large Audio Language Models Without Instructions}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2026},
  doi = {10.1609/aaai.v40i26.39299},
}
Figure