🤖 AI Summary
Zero-initialized attention (ZIA) lacks theoretical justification. Method: We establish, for the first time, a rigorous optimization-theoretic equivalence between ZIA and sparse-gated mixture-of-experts (MoE) models. Building upon this, we propose a unified framework for jointly optimizing linear and nonlinear prompts alongside gating factors; the nonlinear prompt design is provably optimal, enhancing representational capacity and few-shot robustness. Our approach integrates theoretical modeling, co-optimization of gating functions, and architectural adaptation to LLaMA-Adapter. Results: Experiments on open large language model benchmarks demonstrate that nonlinear prompts consistently outperform linear ones; both prompt variants stably surpass standard attention under data scarcity, improving training stability and generalization performance.
📝 Abstract
The LLaMA-Adapter has recently emerged as an efficient fine-tuning technique for LLaMA models, leveraging zero-initialized attention to stabilize training and enhance performance. However, despite its empirical success, the theoretical foundations of zero-initialized attention remain largely unexplored. In this paper, we provide a rigorous theoretical analysis, establishing a connection between zero-initialized attention and mixture-of-expert models. We prove that both linear and non-linear prompts, along with gating functions, can be optimally estimated, with non-linear prompts offering greater flexibility for future applications. Empirically, we validate our findings on the open LLM benchmarks, demonstrating that non-linear prompts outperform linear ones. Notably, even with limited training data, both prompt types consistently surpass vanilla attention, highlighting the robustness and adaptability of zero-initialized attention.