Manuscript Offprint

arXiv:2610.34756

Mechanistic Insights into LoRA: Layer Sparsity for Adaptive Fine-Tuning via Path Patching

Fei Zuo, Yizhou Huang, Kezhi Wang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Low-Rank Adaptation (LoRA) has emerged as the dominant paradigm for parameter-efficient fine-tuning of large language models. Standard all-layer LoRA applies adaptation throughout the transformer, despite heterogeneous contributions from its components. In this work, we conduct a systematic mechanistic interpretability analysis to understand how LoRA affects model internals. We observe that LoRA's adaptation effect is highly non-uniform, with significant component-wise and layer-wise sparsity. Most critically, we find that important layers are highly task-dependent, with limited overlap across tasks. Motivated by these insights, we propose Adaptive-LoRA, a calibration-driven method that automatically identifies task-specific layers via frozen-base zero-ablation, enabling efficient layer selection without exhaustive search. Extensive experiments on Qwen2.5-1.5B across 11 diverse reasoning tasks demonstrate that Adaptive-LoRA outperforms full-layer LoRA while using only 30% of layers, achieving a 3.5×3.5\times reduction in adapter parameters. This work bridges mechanistic interpretability and practical efficiency, providing both fundamental insights and a principled approach for adaptive fine-tuning.

1 Introduction

Large language models (LLMs) have achieved remarkable capabilities across diverse tasks, driving widespread adoption in both research and deployment [9, 28]. Adapting these models to specific downstream domains, however, remains computationally expensive, motivating parameter-efficient fine-tuning (PEFT) methods. Among these, Low-Rank Adaptation (LoRA) [13] has become the de facto standard, enabling adaptation through low-rank weight updates while keeping original parameters frozen.

Standard all-layer LoRA uses the same adaptation rank across transformer layers, despite their potentially unequal contributions. Layer-wise structured pruning studies [22] identify substantial variation in layer importance. Meanwhile, mechanistic work on induction heads [27] links specific attention circuits to in-context learning. These observations raise a fundamental question: if layers are not equally important for inference, why should they be equally adapted during fine-tuning?

LoRA variants improve adaptation through rank allocation [39], learning-rate optimization [11], and dynamic rank search [35]. We study a complementary question: can interventions on a frozen base model identify task-specific layers worth adapting before training begins? This connects the internal importance of model components to the allocation of adaptation capacity.

We address this question through mechanistic interpretability, building on studies of internal representations [8] and behavior-specific circuits [36]. Specifically, we employ path patching [36] to

†^{\dagger}First authors.

∗^{*}Corresponding authors.

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

quantify each layer’s causal contribution to task performance, providing a principled alternative to heuristic selection. Our investigation is guided by two research questions:

RQ1: How do different components and layers contribute to LoRA’s adaptation effect, and is this contribution uniform across the model?

RQ2: Are the important layers consistent across different tasks, or are they highly task-dependent?

Our mechanistic analysis on Qwen2.5-0.5B across four diverse datasets yields two key insights: (i) LoRA’s adaptation is highly non-uniform, with MLP components dominating over attention (58.4% vs. 41.6%) and contributions concentrated in early layers; (ii) important layers exhibit significant task-dependence, with only 39.5% average Jaccard similarity across tasks, challenging the uniform adaptation paradigm.

Building on these insights, we propose Adaptive-LoRA, a calibration-driven method that automatically identifies task-specific layers via frozen-base zero-ablation with a default calibration size of N=30. Adaptive-LoRA operates in three phases (calibration, selection, and training) and can be adapted to different efficiency-performance trade-offs. Extensive experiments on Qwen2.5-1.5B [31] across 11 reasoning tasks demonstrate that Adaptive-LoRA outperforms full-layer LoRA baselines while using only 30% of layers, achieving a 3.5×3.5\times reduction in adapter parameters.

Our contributions are:

• We provide the first systematic mechanistic analysis of LoRA’s internal mechanisms, revealing significant heterogeneity in component-wise and layer-wise contributions.

• We demonstrate that important layers are highly task-dependent (39.5% overlap), challenging the uniform adaptation paradigm.

• We propose Adaptive-LoRA, a principled calibration-driven approach for task-specific layer selection via frozen-base zero-ablation, informed by path-patching analysis.

• We empirically validate that Adaptive-LoRA outperforms full-layer baselines with 70% parameter reduction across 11 diverse reasoning tasks.

References (35)