|
247 | 247 | <article role="main"> |
248 | 248 | <section id="module-torchjd.autogram"> |
249 | 249 | <span id="autogram"></span><h1>autogram<a class="headerlink" href="#module-torchjd.autogram" title="Link to this heading">¶</a></h1> |
250 | | -<p>The autogram package enables the activation of Gramian-based Jacobian descent on your models (As |
251 | | -described in Section 6 of <a class="reference external" href="https://arxiv.org/pdf/2406.16232">Jacobian Descent For Multi-Objective Optimization</a>). It provides a convenient way to modify a model’s backward |
252 | | -pass, allowing you to seamlessly integrate multi-objective optimization in your PyTorch code.</p> |
253 | | -<p>This method typically provides a memory improvement over the <a class="reference internal" href="../autojac/"><span class="doc">autojac</span></a> |
254 | | -package which typically leads to time improvement.</p> |
255 | | -<p>The exhaustive list of supported Weightings compatible with <cite>autogram</cite> is:</p> |
| 250 | +<p>The autogram package provides an engine to efficiently compute the Gramian of the Jacobian of a |
| 251 | +tensor of outputs (generally losses) with respect to some modules’ parameters. This Gramian contains |
| 252 | +all the inner products between pairs of gradients, and is thus a sufficient statistic for most |
| 253 | +weighting methods. The algorithm is formally defined in Section 6 of <a class="reference external" href="https://arxiv.org/pdf/2406.16232">Jacobian Descent For |
| 254 | +Multi-Objective Optimization</a>).</p> |
| 255 | +<p>Due to computing the Gramian iteratively over the layers, without ever having to store the full |
| 256 | +Jacobian in memory, this method is much more memory-efficient than |
| 257 | +<a class="reference internal" href="../autojac/"><span class="doc">autojac</span></a>, which makes it often much faster.</p> |
| 258 | +<p>The list of Weightings compatible with <code class="docutils literal notranslate"><span class="pre">autogram</span></code> is:</p> |
256 | 259 | <ul class="simple"> |
257 | 260 | <li><p><a class="reference internal" href="../aggregation/upgrad/#torchjd.aggregation.UPGradWeighting" title="torchjd.aggregation.UPGradWeighting"><code class="xref py py-class docutils literal notranslate"><span class="pre">UPGradWeighting</span></code></a></p></li> |
258 | 261 | <li><p><a class="reference internal" href="../aggregation/aligned_mtl/#torchjd.aggregation.AlignedMTLWeighting" title="torchjd.aggregation.AlignedMTLWeighting"><code class="xref py py-class docutils literal notranslate"><span class="pre">AlignedMTLWeighting</span></code></a></p></li> |
|
0 commit comments