メモリ制約のあるデバイスでの視覚言語モデルのファインチューニング
Amazon Science は、エッジデバイス向けに逆伝播を不要とするハイブリッド最適化手法「SharpZO」を発表し、既存の前方パスのみによる微調整手法より最大 7% の精度向上を実現した。
キーポイント
逆伝播不要なハイブリッド最適化手法 SharpZO の提案
計算コストが高くエッジデバイスでの実装が困難な逆伝播(バックプロパゲーション)に代わり、前方パスのみで動作する「SharpZO」という新手法を NeurIPS 2025 で発表。
進化的戦略とゼロ次推定を組み合わせた二段階プロセス
第一段階で進化的戦略を用いて損失関数の地形を滑らかにし強固な初期化を行い、第二段階でゼロ次推定(ZO)による外れ値勾配推定の抑制を行うことで収束性を向上させる。
既存手法を凌駕する精度向上の実証
前方パスのみの手法である ZIP や BlackVIP と比較して平均で最大 7% の精度向上を達成し、逆伝播が必要な CoOP に匹敵する性能を示した。
エッジデバイスにおける VLM 微調整の実用化への道
メモリ制約の厳しい環境でも高精度なビジョン言語モデル(VLM)の微調整が可能となり、リアルタイム処理やプライバシー保護が求められる現場での応用が期待される。
Sharpness-aware CMA-ESによる損失関数の平滑化
既存のゼロオーダー最適化法(ZO)が持つ高い分散によるノイズを、最悪ケースの損失を考慮したCMA-ESを用いて平滑化し、局所最小値への陥入を防ぐ。
正規化されたスパースZOによる精密探索
CMA-ESで平坦化した後、勾配ベクトルを平均と標準偏差で正規化する改良版スパースZOアルゴリズムを用いて、より効率的に大域的最適解へ収束させる。
高速な収束と精度向上の実証
11のタスクで評価した結果、既存手法より平均7%の精度向上を達成し、ImageNetではZIPやBlackVIPよりも大幅に短い時間で目標精度に到達した。
影響分析・編集コメントを表示
影響分析
この研究は、リソースが限られたエッジデバイスでも高精度なビジョン言語モデルの微調整が可能になることを示しており、オンデバイス AI の実用化における大きな障壁である計算コストとメモリ制約への解決策を提供します。特に逆伝播を不要とする手法が既存の前方パス手法を凌駕する精度を実現した点は、リアルタイム処理やプライバシー保護が求められる分野での VLM 展開に決定的な影響を与える可能性があります。
編集コメント
逆伝播を必要としない手法が、従来より遥かに高い精度でエッジデバイスでの微調整を可能にした点は、オンデバイス AI の未来を変える重要な一歩です。特に「SharpZO」という名前のハイブリッドアプローチが、計算効率と収束性の両立を実現した点に注目すべきでしょう。
メモリ制約のあるデバイスでの視覚言語モデルのファインチューニング
新しいハイブリッド最適化手法により、エッジデバイスがフォワードパスのみを使用して視覚言語モデルをファインチューニングできるようになり、既存技術よりも最大7%高い精度を達成しました。
共有 共有 リンクをコピー
ファインチューニングされた視覚言語モデル(VLM)は、多くのコンピュータビジョンタスクで顕著な性能を示しています。しかし、ファインチューニング中にモデルの重みを調整する標準的な方法であるバックプロパゲーション(出力誤差から逆方向に働く)は計算コストが高く、リソースに制約のあるエッジデバイスでは非現実的です。
代替案となるのは、フォワードパスのみに依存するファインチューニング戦略であり、計算要件を大幅に低減します。ゼロ次(ZO)推定はそのような方法の一つですが、既存のZOベースのVLMファインチューニング手法は、精度と収束性の点で、バックプロパゲーションベースの学習に比べて依然として著しく劣っています。
大きな課題の一つは、ZOの高い分散です。これにより、推定勾配(学習データのバッチから生じる重み調整の方向)が一貫性がなくノイズの多いものになりがちです。これは学習の動的不安定性を招き、モデルが最適解に収束するのを困難にします。さらに、ZO推定は局所探索的な動的性質を持つ傾向があり、損失関数の地形において、局所的には最適だが大域的には準最適な領域に留まってしまう可能性があります。
今年のニューラル情報処理システム会議(NeurIPS 2025)で発表した論文において、我々はフォワードパスのみを使用してVLMをファインチューニングするための、シャープネス考慮型ゼロ次最適化ハイブリッド手法「SharpZO」を提案します。SharpZOは2段階の最適化プロセスを持ちます:(1)進化戦略を用いて損失関数の地形を滑らかにし、強力な初期化を構築する大域的探索段階、(2)ZOを用いて外れ値の勾配推定を抑制する局所探索段階です。
実験では、SharpZOはZIPやBlackVIPなどのフォワードパスのみの手法の精度を平均最大7%向上させ、いくつかのタスクでは、勾配のバックプロパゲーションを必要とする一次手法であるCoOPの性能に迫りました。
損失関数の地形
モデルと学習データセットが与えられたとき、モデルの取りうるすべてのパラメータ(重みとバイアス)を、学習データに対する対応する損失(誤差)に対してマッピングすることができ、非常に高次元の空間における単一点が得られます。パラメータ設定と損失の関係のグラフは、山(高損失領域)と谷(低損失領域)を持つ地形として想像できます。学習の目標は、パラメータ設定を地形の最も低い谷底に向けて導くことです。
完全な地形を計算することは困難ですが、特定の位置(パラメータ設定のセット)が与えられれば、その局所的な傾斜の方向(勾配)を計算し、損失を下り坂方向に押し出すことが可能です。それがバックプロパゲーションの仕組みです。
ZOは、地形上の様々な近傍点で損失をサンプリングすることによって、局所勾配を計算するのではなく推定する方法です。しかし、ZO推定の高い分散により、地形は実際よりもよりギザギザに、あるいはより鋭く、より多くより高い山を持つように見えてしまいます。これにより、最適化アルゴリズムが局所最小値(損失が大域的最小値よりも実際にはかなり大きい局所的な谷)に留まってしまう可能性が高まります。
我々のアプローチは、進化アルゴリズム(具体的には、シャープネス考慮型共分散行列適応進化戦略:CMA-ES)を使用して損失関数の地形の鋭さを滑らかにすることです。その後、わずかに修正したZOアルゴリズムを使用して大域的最小値を見つけます。
SharpZO手法の概要。(a)2段階最適化プロセスからなる全体の学習パイプライン。(b)第1段階のシャープネス考慮型CMA-ES最適化後の滑らかになった損失関数地形の可視化。(c)シャープネス考慮型CMA-ES手法の学習動態。(d)第2段階における疎なZO学習中のランダム化勾配推定(RGE)。
CMA-ESは、局所勾配だけでなく、取りうるすべてのパラメータ値の集合全体にわたる損失の分布を推定します。また、分布の共分散行列(パラメータ値間の相関関係を記述する行列)も推定します。分布の平均と共分散行列の値は、学習の各ラウンド後に更新されます。
我々は通常のCMA-ESアプローチを修正し、損失関数に追加の項を含めます。この項は、現在の分布と共分散行列の推定値に基づいて、モデルが被りうる最悪の損失を考慮します。この項を最小化することは、推定される損失関数の地形を滑らかにするのに役立ちます。
CMA-ESを適用した後、修正された疎なZOアルゴリズムを使用して、より洗練された局所探索を行います。従来の疎なZOは、大きさの小さい項を捨てることで勾配推定の次元を削減します。我々はこの手順を、勾配ベクトルをその平均と標準偏差に従って正規化することで修正し、これもまた損失関数の地形を滑らかにするのに役立ちます。
我々は、様々なバックボーンを持つCLIPモデルを使用して、11の多様な下流タスクでSharpZOを評価しました。ZIPやBlackVIPなどのフォワードパスのみの手法に対して平均7%の精度向上を達成し、CoOPと競合する性能を示したことに加えて、我々の手法は大幅に高速な収束を実現します。例えば、ImageNetデータセットでは、SharpZOは目標精度に15.3分で到達しましたが、ZIPでは19分、BlackVIPでは170分かかりました。
SharpZOは、勾配の保存を回避することでメモリフットプリントを削減するだけでなく、この効率性が精度の犠牲を伴わないことを保証します。また、我々の手法は分布シフトに対して頑健であり、スケッチの認識(ImageNet-Sketch)や画像の敵対的例(ImageNet-A)などの分布外タスクにおいて、ベースラインよりも優れた性能を示すこともわかりました。
現在、SharpZOはプロンプトチューニングに最適化されており、学習可能なパラメータ数は比較的少なく、フルモデルのファインチューニングへのスケーリングは今後の課題です。さらに、シャープネス考慮型CMA-ESウォームアップ段階には座標ごとの勾配推定(CGE)が必要であり、高次元設定では計算コストが高くなる可能性があります。これにより、SharpZOはパラメータ効率的ファインチューニング(PEFT)の適任候補となります。
謝辞:この研究はAmazon-UCSBコラボレーションの一環として行われました。Zheng Zhang、Jimmy Kunzmann、Denis Filimonovの各氏からの意見と貴重な議論に感謝します。
機械学習
コンピュータビジョン
視覚言語モデル(VLM)
学習アルゴリズム
原文を表示
Fine-tuning vision-language models on memory-constrained devices
A new hybrid optimization approach allows edge devices to fine-tune vision-language models using only forward passes, achieving up to 7% higher accuracy than existing techniques.
Share Share Copy link
Fine-tuned vision-language models (VLMs) have shown remarkable performance across many computer vision tasks. However, backpropagation — the standard method for adjusting model weights during fine tuning, which works backward from output error — is computationally expensive and thus impractical on resource-constrained edge devices.
An alternative is fine-tuning strategies that rely solely on forward passes, significantly lowering the computational requirements. Zeroth-order (ZO) estimation is one such method, but existing ZO-based VLM fine-tuning methods remain substantially inferior to backpropagation-based training in terms of accuracy and convergence.
One major challenge is ZO’s high variance, which can make estimated gradients — the directions of weight adjustment resulting from a batch of training data — inconsistent and noisy. This can lead to unstable training dynamics and make it difficult for the model to converge to an optimal solution. Additionally, ZO estimation tends to have local search dynamics, meaning that it may get stuck in locally optimal but globally suboptimal regions of the loss landscape.
In a paper we presented at this year’s Conference on Neural Information Processing Systems (NeurIPS 2025), we propose SharpZO, a hybrid sharpness-aware zeroth-order optimization approach for fine-tuning VLMs using only forward passes. SharpZO has a two-stage optimization process: (1) a global exploration stage that uses evolutionary strategies to smooth the loss landscape, constructing a strong initialization, and (2) a local-search stage that uses ZO to suppress outlier gradient estimates.
In experiments, SharpZO improved on the accuracy of forward-only methods such as ZIP and BlackVIP by an average of up to 7%, and on several tasks, its performance approached that of CoOP, a first-order method requiring backpropagation of gradients.
The loss landscape
Given a model and a set of training data, every one of the model’s possible parameters (weights and biases) can be mapped against the corresponding loss, or error, on the training data, yielding a single point in a very-high-dimensional space. The graph of parameter settings against loss can be envisioned as a landscape with peaks (high-loss regions) and valleys (low-loss regions). The goal of training is to steer the parameter settings toward the bottom of the lowest valley in the landscape.
Computing the complete landscape is intractable, but given a particular location (set of parameter settings), it’s possible to calculate the local direction of the slope — the gradient — and nudge the loss downhill. That’s how backpropagation works.
ZO is a method for estimating, rather than calculating, the local gradient, by sampling the loss at various nearby points in the landscape. But the high variance of ZO’s estimates makes the landscape look more jagged — or sharper — than it really is, with more and higher peaks. This increases the chances that the optimization algorithm will get stuck in a local minimum, a local valley where the loss is actually significantly greater than at the global minimum.
Our approach is to use an evolutionary algorithm — specifically, a sharpness-aware covariance-matrix adaptation evolution strategy (CMA-ES) — to smooth out the sharpness of the loss landscape. Then we use a slightly modified ZO algorithm to find the global minimum.
Overview of the SharpZO method. (a) The overall training pipeline, consisting of a two-stage optimization process. (b) Visualization of the smoothed loss landscape after stage 1 sharpness-aware CMA-ES optimization. (c) Training dynamics of the sharpness-aware CMA-ES method. (d) Randomized gradient estimation (RGE) during sparse ZO training in stage 2.
CMA-ES estimates not just the local gradient but the distribution of the loss over the whole set of possible parameter values. It also estimates the distribution’s covariance matrix, a matrix that describes the correlations between parameter values. Both the mean of the distribution and the values of the covariance matrix are updated after every round of training.
We modify the ordinary CMA-ES approach by including an extra term in the loss function, which accounts for the worst possible loss that the model could incur, given the current estimate of the distribution and covariance matrix. Minimizing this term helps smooth out the estimated loss landscape.
After applying CMA-ES, we use a modified sparse ZO algorithm to do more refined local searches. Traditional sparse ZO reduces the dimensionality of the gradient estimate by tossing out low-magnitude terms. We modify this procedure by normalizing the gradient vector according to its mean and standard deviation, which again helps smooth out the loss landscape.
We evaluated SharpZO on 11 diverse downstream tasks using CLIP models with various backbones. In addition to the average accuracy improvement of 7% over forward-only methods such as ZIP and BlackVIP, and the performance competitive with CoOP, our method achieves significantly faster convergence. For example, on the ImageNet dataset, SharpZO reached target accuracy in 15.3 minutes, compared to 19 mins for ZIP and 170 minutes for BlackVIP.
SharpZO not only reduces the memory footprint by avoiding gradient storage but also ensures that this efficiency does not come at the cost of accuracy. We also found that our method is robust to distribution shifts, performing better than baselines on out-of-distribution tasks, such as recognizing sketches (ImageNet-Sketch) or adversarial examples of images (ImageNet-A).
Currently, SharpZO is optimized for prompt tuning, where the number of trainable parameters is relatively small, and scaling to full-model fine tuning remains a future challenge. Furthermore, the sharpness-aware CMA-ES warmup stage requires coordinate-wise gradient estimation (CGE), which maybe computationally expensive for high-dimensional settings. This makes SharpZO a suitable candidate for parameter-efficient fine tuning (PEFT).
Acknowledgements: This work was done as part of the Amazon-UCSB collaboration. We want to thank Zheng Zhang, Jimmy Kunzmann, and Denis Filimonov for their inputs and valuable discussions.
Machine learning
Computer vision
Vision-language models (VLMs)
Learning algorithms
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み