给LoRA的每层分配不同适配秩,提升模型效率
FIM-LoRA: Task-Informative Rank Allocation for LoRA via Calibration-Time Gradient-Variance Estimation

- 用校准阶段梯度方差估计各层重要性,动态分配秩
- 在GLUE和常识推理任务上性能接近标准LoRA,参数量相同
- 无需额外参数或训练开销,适合资源受限场景
低秩适配(LoRA)为每个权重矩阵分配相同秩,忽略了不同层对任务适配贡献不均的事实。本文提出FIM-LoRA:在微调前进行8次校准反向传播,通过计算每个LoRA-B矩阵的梯度方差作为层重要性代理,按比例重新分配秩预算。结果得到标准LoRA结构,但具有逐层秩分配模式——无新增参数、无训练开销、无需修改部署架构。方法基于仅限于LoRA适配器矩阵的经验费舍尔信息矩阵(eFIM)对角线近似,相比全模型费舍尔估计降低约256倍内存开销。在GLUE任务上使用DeBERTa-v3-base时,FIM-LoRA性能达88.6,与标准LoRA的88.7相当;在LLaMA-3-8B的常识推理任务中达到68.5,对比值为68.7。逐层秩分配图具可解释性:值投影层及早期至中期层持续获得更高秩,符合变压器层角色的已有研究结论。
原文摘要 · Abstract (English)
Low-rank adaptation (LoRA) assigns a uniform rank to every adapted weight matrix - a practical convenience that ignores a fundamental reality: different layers contribute unequally to task adaptation. We address this with a lightweight engineering solution: before fine-tuning begins, run eight calibration backward passes, compute the gradient variance of each LoRA-B matrix as a proxy for layer informativeness, and redistribute the rank budget proportionally. The resulting adapter is a standard LoRA with a per-layer rank pattern - no new parameters, no training overhead, no changes to serving infrastructure. We implement this via an efficient approximation of the empirical Fisher Information Matrix (eFIM) diagonal, restricted to LoRA adapter matrices only, which reduces memory cost by approximately 256x compared to full-model Fisher estimation. On GLUE with DeBERTa-v3-base, FIM-LoRA matches LoRA (88.6 vs. 88.7) at the same parameter budget, and on commonsense reasoning with LLaMA-3-8B reaches 68.5 vs. 68.7 for LoRA. The per-layer rank maps are interpretable: value projections and early-to-middle layers consistently receive higher rank, consistent with established findings on transformer layer roles.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。