# Poster 31242

- Kind: Poster
- Talk page and recording: https://iclr.cc/virtual/2025/poster/31242

> Transcript of the talk's recording (session_asr), made by speech recognition or taken from the host's captions. It may contain errors. The words are the speakers'; listen to the recording on the talk's page before quoting it.

Hi, I am happy to present to you our new work called PETRA, which stands for Parallel End-to-End Training of Reversible Architectures. Pipeline parallelism falls in the category of model parallelism, where a neural network is split into consecutive stages. These stages are then scattered across different devices. And as can be seen on the top figure, a naive implementation of pipeline parallelism will lead to very poor resource utilization as at any single time step.
Only a single device is actually performing computations. To improve on resource utilization, a planning mechanism typically splits a mini-batch into successive micro-batches. These micro-batches will then be processed in parallel across stages, thus effectively improving on resource utilization. However, as the pipeline needs to be flushed before updating the weights, it introduces ideal link bubbles where some devices remain inactive, preventing a full utilization of the compute.
Compute Python. Full pipeline utilization is still possible with pipeline parallelism, but at the expense of some inconsistency between the weights. On the bottom figure, the red and the blue line denotes the forward and backward processing of a single mini -batch. As can be seen, if an update happens on the black arrow, meaning between the forward and the backward pass, there will be inconsistencies between the weights used in the forward pass and the weights used during the back.
backward pass. Integral approaches account for this inconsistency by storing a copy of the forward weights to be retrieved during the backward pass. Doing so, they effectively estimate the gradient with respect to the weights used in the forward pass, hence a delayed gradient.
Note that for the backward pass to happen properly, activations need also to be stored between the forward and the backward pass. Thus, pipelining mechanisms actually suffer from a memory overhead which is quadratic in the number of stages. The goal of PETRA is to successfully combine reversible architecture and pipelining mechanism in order to drastically reduce this memory overhead. Reversible architectures have been studied for their favorable memory requirements. Given any shape preserving function FJ, it is relatively easy to...
easy to define a reversible transformation as shown in this slide. During the backward pass, activations are sent along with their corresponding gradients. Each reversible layer can reconstruct its input in order to evaluate the Jacobians required to evaluate the parameter gradient and the input gradient. Thus, they effectively remove the need to store activation between the forward and the backward pass. The training dynamics of Petrack and Zosby summarize the following way.
Here we go. First, we perform a regular forward pass. Then we perform what we call a reversible backward pass in order to estimate the gradients. Here two approximations are made. First, since the set of weight might have been updated since the forward pass, the input reconstruction phase is approximate. Then we evaluate the Jacobian's own and approximate inputs and an updated set of weight. After the reversible backward pass, the weights are updated with the estimated parameter gradients.
Then the reconstructed input and the corresponding input gradients are transmitted to the layer below. As can be seen in our comparison table, Petra has very favorable memory requirements compared to alternative pipeline mechanisms. Also, by resorting to delayed gradients, Petra is able to achieve full utilization of pipeline without removing any IDLing bubbles. In order to evaluate the empirical performance of Petra, we decided to train ResNet and their reversible counterpart.
counterpart on standard computer vision benchmark comparing standard back propagation and Petra's algorithm. The ResNet 18 and 34 have been split into 10 stages while the ResNet 50 has been split into 18 stages. As can be seen, no major degradation of performance can be observed and Petra performs on par with standard back propagation. To evaluate the benefits of Petra, we measured the memory footprint while training the ResNet 50 under different pipelining configurations.
As we can see, PETRA readily offers a 54% reduction compared to standard delayed gradient approaches. Note that the downsampling layers in the ResNet are non-shape-preserving transformations which cannot be made reversible. This reduction in memory could be even more drastic with a fully reversible architecture. As a conclusion, we can say that PETRA successfully combined delayed gradient approaches of pipeline parallelism with reversible architecture to drastically reduce...
use the memory footprint associated to these algorithms. The empirical performances are in par with standard backpropagation showing no degradation in performance. Furthermore, I am actively working on fully differentiable architectures for generative modeling purposes. I am really looking forward to meet you at the ICLR conference 2025 for a more in-depth discussion about our work. Thank you very much.
