Sparser, Better, Faster, Stronger: Efficient Automatic Differentiation for Sparse Jacobians and Hessians

要約

暗黙的な分化から確率的モデリングまで、ヤコビアンとヘシアンは機械学習(ML)で多くの潜在的なユースケースを持っていますが、従来の知恵はそれらを計算的に禁止していると考えています。
幸いなことに、これらのマトリックスはしばしばスパースを示します。スパースは、自動分化(AD)のプロセスを大幅に高速化するために活用できます。
このホワイトペーパーでは、スパースの検出に関する新しい視点から始めて、自動スパース分化(ASD)の進歩を示しています。
更新された博覧会は、オペレーターの過負荷に基づいており、ローカルおよびグローバルなスパースパターンの両方を検出することができ、コントロールフローグラフの行き止まりを自然に回避します。
また、ジュリアの新しいASDパイプラインについても説明します。これは、なかったASDを任意の広告バックエンドに基づいてASDを有効にするための独立したソフトウェアパッケージで構成されています。
パイプラインは完全に自動化されており、既存のコードの変更を必要とせず、既存のMLコードベースと互換性があります。
このパイプラインは、ヤコビアンマトリックスとヘシアンマトリックスがスケールでロックされていることを実証します。
科学的MLと最適化からの実際の問題については、最大3桁の大幅なスピードアップを示しています。
特に、私たちのASDパイプラインは、スパースの検出方法が遅いため、かつては1回限りの計算のために標準広告を上回ることがよくあります。

要約(オリジナル)

From implicit differentiation to probabilistic modeling, Jacobians and Hessians have many potential use cases in Machine Learning (ML), but conventional wisdom views them as computationally prohibitive. Fortunately, these matrices often exhibit sparsity, which can be leveraged to significantly speed up the process of Automatic Differentiation (AD). This paper presents advances in Automatic Sparse Differentiation (ASD), starting with a new perspective on sparsity detection. Our refreshed exposition is based on operator overloading, able to detect both local and global sparsity patterns, and naturally avoids dead ends in the control flow graph. We also describe a novel ASD pipeline in Julia, consisting of independent software packages for sparsity detection, matrix coloring, and differentiation, which together enable ASD based on arbitrary AD backends. Our pipeline is fully automatic and requires no modification of existing code, making it compatible with existing ML codebases. We demonstrate that this pipeline unlocks Jacobian and Hessian matrices at scales where they were considered too expensive to compute. On real-world problems from scientific ML and optimization, we show significant speed-ups of up to three orders of magnitude. Notably, our ASD pipeline often outperforms standard AD for one-off computations, once thought impractical due to slower sparsity detection methods.

arxiv情報

著者 Adrian Hill,Guillaume Dalle
発行日 2025-01-29 16:21:54+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.LG, cs.MS パーマリンク