Scribble at 2026-11-19 18:55:13 Last modified: unmodified
In Low-Rank Adaptation (LoRA), the scaling factor α is often treated as a mere complement to the learning rate, yet its role in optimization remains poorly understood. In this paper, we reveal that the scaling factor α and the learning rate function differently, with α emerging as the dominant driver of effective optimization, delivering gains that cannot be replicated by learning rate scaling alone. Through the synergy of extensive empirical analysis and a theoretical Signal-Drift framework, we uncover three findings into LoRA's scaling mechanism: First, LoRA's spectral suppression smooths the optimization landscape, rendering standard hyperparameters overly conservative and creating an optimization gap. Second, when leveraging this smoothness to accelerate convergence, α outperforms the learning rate by amplifying the task signal without increasing the drift ratio. Third, the optimal scaling factor follows a sublinear relationship with the rank, well characterized by a square-root law with an unexpectedly large coefficient, revealing the insufficient scaling of existing rank-tied heuristics. Based on these insights, we propose LoRA-α, a minimalist framework that restores α to its principled regime, making LoRA compatible with standard small learning rates. Extensive evaluations across diverse tasks demonstrate that LoRA-α consistently improves performance while streamlining hyperparameter search, unleashing the learning potential of LoRA.
SD 1.5 の時代から、画像の描写スタイルを特定のニュアンスで固定したいとか、あるいは描く人物の外見を特定の誰かに固定したいという場合に、この LoRA というファイルをトレーニングして追加で読み込むというのが定番の作業である。これは、実際に最新の Qwen-Image 2.1 や Krea 2 といったモデルでも(互換性はないが)運用できるものであり、非常に強力なツールだと言える。だが、そのトレーニングにあたっては、最適な手順や方法というものに標準があるようでないという問題があって、なかば経験則だけで LoRA をトレーニングしている人も多い(それこそトレーニングの設定項目を機械学習の理論としてぜんぜん理解していない人が大半なのだから、そうもなろう)。
LoRA をトレーニングする際の設定項目に、"network dimension" (rank) と "network alpha" (alpha) がある。従来、これらは rank = 2 * alpha あるいは 同値で設定することがスタンダードとされていて、更に rank の設定値は完成した LoRA ファイルのサイズに反映されるため、多くの人は殆ど固定値で作業していたと思う。もっとも多いのが rank = 32 で、LoRA ファイルは約 230 MB になる。これを更に増やすと詳細な特徴量を扱えるので、描写スタイルの LoRA などでは稀に rank = 64 などという事例もあるが、たいていは 32 のままで済む。逆に、これを 16 としたり 8 とすれば、ファイル・サイズは小さくなるけれど、対応できるパターンは限られてくる。rank = 8 ともなると、完成した LoRA ファイルは 57 MB くらいに小さくなるが、このサイズになると、ほぼフラットなイラスト、いわゆる「アニメ塗り」と呼ばれるイラストのトレーニングに限られてくるだろう。
さて、これまでの実務や研究だと経験則で alpha を固定し、ステップサイズの調整はもっぱら学習率(learning rate)を大きく設定することで対応してきたのだが、上の論文によれば、LoRA の効果的なトレーニングには大きな学習率が必要であるという通説自体が、実は alpha の設定値が小さすぎること(スケーリング不足)によって引き起こされた副次的な症状に過ぎないことを突き止めたわけである。
僕が LoRA のトレーニングに採用してきた設定だと、network_dim = 32, network_alpha = 16, learning_rate = 0.0001, unet_lr = 0.0001, text_encoder_lr = 1e-5 といったことになり、alpha が小さすぎてもったいなかったのだ。そこで、あくまでもアニメのキャラで実験した限りでの話だが、これらの設定を network_dim = 8, network_alpha = 128, learning_rate = 1.5e-5, unet_lr = 1.5e-5, text_encoder_lr = 2e-6 のように network alpha を大きくしてトレーニングしてみたところ、かなり良好な結果だった。しかも、エポック数も 20 から 10 に減らしたので、トレーニングに要した時間も30分ていどである。暫くはこれで試してみたい。