Input Conditioned Layer Dropping in Speech Foundation Models

Abdul Hannan, Daniele Falavigna, Alessio BruttiarXiv 2025

TL;DR

The paper introduces Input-Driven Layer Dropping (IDLD), a lightweight, plug-and-play mechanism that dynamically skips redundant encoder layers in speech foundation models based on the input features. This approach transforms static models into resource-adaptive architectures, significantly outperforming random layer dropping and matching or exceeding the performance of complex early-exit strategies without requiring architectural modifications.

What Problem Does This Paper Address?

Speech foundation models (like WavLM or Audio Spectrogram Transformers) deliver state-of-the-art performance across tasks like Automatic Speech Recognition (ASR) and emotion recognition. However, their massive computational and memory footprints make them notoriously difficult to deploy on edge and IoT devices, where hardware resources fluctuate dynamically.

Existing compression techniques like pruning or quantization result in fixed, static architectures that cannot adapt on the fly to changing resource availability. Dynamic approaches like Early Exiting (EE) allow adaptive computation but require adding and training multiple complex auxiliary classifiers. On the other hand, Random Layer Dropping (RD) is simple but highly suboptimal, especially under tight resource constraints where dropping the wrong combination of layers causes catastrophic performance degradation.

The authors tackle this gap by asking: Can we dynamically select the optimal subset of layers to execute for a specific audio input using a simple, non-intrusive mechanism?

Methods

The authors propose Input-Driven Layer Dropping (IDLD), which introduces a lightweight Layer Selecting (LS) block that acts as a plug-and-play router.

Fig. 1. Illustration of the proposed input-driven layer skipping approach using a pretrained encoder. The output of the feature extractor (X) is forwarded to both Encoder E and Layer Selector network S. The latter provides layer scores G ∈RN, for each layer of the encoder. Top-k values from G = {g1, g2, .., gN} are selected to enable corresponding encoder modules while skipping the remaining ones.

The data flow operates as follows:

  1. Feature Extraction: The input audio is converted into a feature representation $X$ via a frozen feature extractor.
  2. Layer Scoring: $X$ is fed into the LS block (composed of a Layer Norm, 1D Convolution, GELU activation, Adaptive Average Pooling, and a Linear layer). The LS block outputs a continuous score vector $G$, representing the importance of each encoder layer for that specific input.
  3. Gating Mechanism: During training, the number of layers to keep ($k$) is randomly sampled. The top-$k$ layers with the highest scores in $G$ are assigned binary weights of 1 (executed), while the remaining layers are assigned 0 (skipped).
  4. Inference Flexibility: At inference time, users can either manually set $k$ based on hardware constraints or use a threshold-based approach where layers are automatically dropped if their score falls below a certain confidence level.

Crucially, this gating mechanism skips entire encoder modules (both Multi-Head Attention and Feed-Forward Networks together) rather than individual sub-modules, preserving structural integrity while slashing compute.

Datasets

The authors evaluated IDLD across five diverse public benchmarks spanning four downstream audio applications:

  • LibriSpeech & TEDLIUM-v3: Used for evaluating Automatic Speech Recognition (ASR) performance.
  • Environmental Sound Classification 50 (ESC-50): Used for environmental sound classification.
  • Fluent Speech Commands (FSC): Used for spoken intent classification.
  • IEMOCAP: Used for Audio Emotion Recognition (ER).

Key Insights and Ideas

  • Input Complexity Dictates Layer Depth: Not all audio samples require the same depth of processing. Simple, clear utterances can bypass intermediate layers entirely, whereas noisy or complex audio routes through more of the network.
  • Holistic Layer Dropping Beats Sub-module Splitting: Unlike prior data-driven methods that attempt to drop individual attention heads or FFN layers separately, dropping the entire encoder block preserves the learned representations of transformer architectures much more effectively.
  • Single Classifier Efficiency: While Early Exiting relies on optimizing multiple specialized auxiliary classifiers (which can overfit or conflict), IDLD uses a single primary classifier. The optimization burden is shifted to the routing network (LS block), making the training recipe simpler and more robust across different tasks.

Key Results

The proposed IDLD approach consistently outperformed Random Dropping (RD) and proved highly competitive against Early Exiting (EE).

  • ASR (WavLM): On LibriSpeech, when dropping 10 out of 12 layers ($n=10$), Random Dropping collapsed to a Word Error Rate (WER) of 60.10%. IDLD maintained a much more usable WER of 38.75%. For moderate drop rates ($n \ge 2$), IDLD consistently outperformed EE.
  • Intent Classification (WavLM): On the FSC dataset, IDLD achieved a staggering 14.02% accuracy improvement over RD when dropping 2 layers.
  • Transformer-only Architectures (AST): Even when applied to the Audio Spectrogram Transformer (which lacks a deep convolutional feature extractor), IDLD demonstrated superior robustness over RD across sound, emotion, and intent classification tasks.
Performance comparison of RD, IDLD, and EE across different block drop rates on ESC-50, IEMOCAP, and FSC datasets using the AST model.

Limitations and Future Work

While IDLD shows clear advantages, the authors note a couple of limitations:

  1. Architecture Sensitivity: The performance of the LS block relies heavily on the quality of the initial feature representations. For models like AST that process plain mel-spectrograms without a deep convolutional feature extractor, the variance in output accuracy was higher.
  2. LS Block Optimization: The current LS block uses a relatively simple convolutional setup. The authors suggest that exploring alternative, more sophisticated architectures for the LS block could further minimize performance trade-offs at extreme layer-dropping rates.

Summary updated

BibTeX
@misc{hannan2025input,
  author = {Abdul Hannan and Daniele Falavigna and Alessio Brutti},
  title = {{Input Conditioned Layer Dropping in Speech Foundation Models}},
  year = {2025},
  eprint = {2507.07954},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.07954},
}
Figure