On the Role of Encoder Depth: Pruning Whisper and LoRA Fine-Tuning in SLAM-ASR
Organizations: School of Computer Science and Electronic Engineering, University of Essex
Abstract
Automatic speech recognition (ASR) has advanced rapidly in recent years, driven by large-scale pretrained models and end-to-end architectures such as SLAM-ASR. A key component of SLAM-ASR systems is the Whisper speech encoder, which provides robust acoustic representations. While model pruning has been explored for the full Whisper encoder-decoder architecture, its impact within the SLAM-ASR setting remains under-investigated. In this work, we analyze the effects of layer pruning in the Whisper encoder when used as the acoustic backbone of SLAM-ASR. We further examine the extent to which LoRA-based fine-tuning can recover performance degradation caused by pruning. Experiments conducted across three Whisper variants (Small, Medium, Large-v2), three languages representing distinct resource levels (Danish, Dutch, English), and over 200 training runs demonstrate that pruning two encoder layers causes only 2-4% WER degradation, and that combining this pruning with LoRA adaptation consistently outperforms the unpruned baseline while reducing total parameters by 7-14%. Moreover, our error analysis reveals that LoRA primarily compensates through the language model's linguistic priors, reducing total word errors by 11-21% for Dutch and English, with substitutions and deletions showing the largest reductions. However, for low-resource Danish, the reduction is smaller (4-7%), and LoRA introduces increased insertion errors, indicating that compensation effectiveness depends on the LLM's pre-existing language proficiency and available training data.
Figures & tables
| Language | Split | Samples | Hours |
|---|---|---|---|
| Danish | Train | 3,592 | 4.18 |
| Dev | 2,511 | 3.21 | |
| Test | 2,684 | 3.45 | |
| Dutch | Train | 43,458 | 54.15 |
| Dev | 12,032 | 16.03 | |
| Test | 12,033 | 16.38 |
| Danish | Dutch | English | |||||
| Layers | Red.% | Base | +LoRA | Base | +LoRA | Base | +LoRA |
| Whisper-Small (88.15M base params) | |||||||
| 12 (full) | 0% | 47.41 | 41.94 | 17.98 | 15.40 | 21.84 | 17.87 |
| 10 | 16.1% | 50.49 | 47.23 | 21.16 | 16.98 | 25.81 | 20.64 |
| 8 | 32.2% | 71.22 | 51.20 | 27.25 | 21.04 | 33.15 | 24.40 |
| 6 | 48.2% | 115.68 | 67.02 | 32.14 | 24.45 | 40.81 | 31.85 |
| Encoder | Configuration | Params | Net | DA | NL | EN |
|---|---|---|---|---|---|---|
| Small | 12L Baseline | 88.15M | – | 47.41 | 17.98 | 21.84 |
| 12L + LoRA | 89.65M | +1.5M | 41.94 | 15.40 | 17.87 | |
| 10L + LoRA | 75.5M | –12.7M | 47.23 | 16.98 | 20.64 | |
| Medium | 24L Baseline | 307.24M | – | 39.00 | 12.74 | 16.33 |
| 24L + LoRA | 309.0M | +1.8M | 38.88 | 10.92 | 14.13 | |
| 22L + LoRA | 284.0M | –23.2M | 37.91 | 11.84 | 15.82 |
| % Utterances Degraded | ||||
|---|---|---|---|---|
| Encoder | Lang | Base 2L | +LoRA | Recov. |
| Small | DA | 42.7 | 38.1 | 4.6 |
| NL | 33.3 | 23.5 | 9.8 | |
| EN | 35.9 | 23.9 | 12.0 | |
| DA | 41.9 | 35.7 | 6.2 | |
| Medium | NL | 24.6 | 24.3 | 0.3 |
| WER Reduction | |||
|---|---|---|---|
| Encoder | Lang | Full+LoRA | Pruned+LoRA |
| Small | DA | 5.47 | 3.26 |
| NL | 2.58 | 4.18 | |
| EN | 3.97 | 5.17 | |
| Medium | DA | 0.12 | 1.82 |
| NL | 1.82 | 2.38 | |
| Pattern | Lang | Reference | Pruned Hypothesis | +LoRA Hypothesis |
|---|---|---|---|---|
| Hallucination | DA | der kogte gryden over | da kom gud og gik op | der kogte gryden over |
| Named entity | DA | charlot var altid inde hos fru simonin nu | chrisel indelte altså inden for sin sinde | charlot var altid inde hos fru simonin nu |
| Semantic drift | DA | lille soldat du skal være vor konge… | livet skal du have og du skal have den dig selv… | lille soldat du skal være vor konge… |
| Repetition | NL | …heel interessant en hebben ons zeer geholpen… | zeer grotendeels [ 28] | …heel interessant en hebben ons zeer geholpen… |
| Named entity | NL | de veiligheidssituatie is sindsdien rampzalig verslechterd | de veiligheid ziet de waarde van een dienst… | de veiligheidssituatie is sindsdien rampzalig verslechterd |
| Compound word | NL | de luchtvaartmaatschappijen | de luchtvaart maatschappijen | de luchtvaartmaatschappijen |
| Encoder | Lang | Sub | Ins | Del | Tot |
|---|---|---|---|---|---|
| Small | DA | –7.7 | +11.9 | –10.7 | –5.7 |
| NL | –17.5 | –37.4 | –15.3 | –20.4 | |
| EN | –19.8 | –9.8 | –37.4 | –20.6 | |
| DA | –4.9 | +18.4 | –22.9 | –4.4 | |
| Medium | NL | –13.7 | –34.5 | –11.4 | –16.7 |
| EN | –10.6 | +0.5 | –30.3 | –11.6 |
Neural Network Pruning
Neural network pruning removes weights, neurons, channels, heads, or layers to reduce model size and computation while retaining useful behavior.
See all 289 papers