NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Efficient AlphaFold2 Training using Parallel Evoformer and Branch Parallelism

Guoxia Wang, Zhihua Wu, Xiaomin Fang, Yingfei Xiang, Yiqun Liu, Dianhai Yu, Yanjun MaarXiv 2022

Abstract

The accuracy of AlphaFold2, a frontier end-to-end structure prediction system, is already close to that of the experimental determination techniques. Due to the complex model architecture and large memory consumption, it requires lots of computational resources and time to train AlphaFold2 from scratch. Efficient AlphaFold2 training could accelerate the development of life science. In this paper, we propose a Parallel Evoformer and Branch Parallelism to speed up the training of AlphaFold2. We conduct sufficient experiments on UniFold implemented in PyTorch and HelixFold implemented in PaddlePaddle, and Branch Parallelism can improve the training performance by 38.67% and 36.93%, respectively. We also demonstrate that the accuracy of Parallel Evoformer could be on par with AlphaFold2 on the CASP14 and CAMEO datasets. The source code is available on https://github.com/PaddlePaddle/PaddleFleetX

Introduction

AlphaFold2 (AF2) has revolutionized structural biology by providing protein structure predictions with near-experimental accuracy. However, the computational cost of training AF2 is immense; the original implementation required approximately 11 days on 128 TPUv3 cores. This "compute appetite" stems from several bottlenecks: serial dependencies within the core Evoformer block, scaling limits of traditional data parallelism due to small batch sizes, and significant kernel overhead from thousands of small parameter tensors.

To address these challenges, we introduce two primary optimizations: the Parallel Evoformer and Branch Parallelism (BP). Together, these techniques reduce training time by nearly 40% without compromising the model's predictive accuracy.

Methods

Parallel Evoformer

In the standard AlphaFold2 architecture, the Evoformer block processes Multiple Sequence Alignments (MSA) and Pairwise relations sequentially. Specifically, the Pair track must wait for the MSA track to complete an "outer product mean" operation before it can begin its update. This creates a serial bottleneck within each of the 48+ blocks.

We propose the Parallel Evoformer, which restructures the block to remove this dependency. By moving the communication step (the outer product mean) to the end of the block, the MSA and Pair tracks can evolve independently and simultaneously.

Comparison of standard and Parallel Evoformer architectures.

Branch Parallelism (BP)

Building on the independence of the MSA and Pair tracks in the Parallel Evoformer, we introduce Branch Parallelism. Unlike standard Data Parallelism, which distributes different samples across GPUs, BP splits the workload of a single sample across two devices.

As shown in the implementation details, Device 0 handles the MSA stack and the outer product mean, while Device 1 processes the Pair stack. The devices synchronize gradients and outputs at the end of the block using Broadcast and AllReduce operations. This approach maintains high computational intensity on each device, avoiding the overhead issues sometimes seen with finer-grained parallelism like Dynamic Axial Parallelism (DAP).

Implementation of Branch Parallelism across two devices.

Experimental Results

We evaluated our methods using the UniFold (PyTorch) and HelixFold (PaddlePaddle) frameworks. Training was conducted on a mix of RCSB PDB data and self-distillation samples.

Training Efficiency

Branch Parallelism yielded significant performance gains:

  • UniFold: 38.67% improvement in training performance, reducing wall-clock time to 4.18 days.
  • HelixFold: 36.93% improvement, reducing training time to 4.88 days.

These results demonstrate that BP effectively breaks the "batch size wall" that limits traditional data parallelism when the total batch size is capped (e.g., at 128).

Prediction Accuracy

To ensure that the architectural changes did not degrade performance, we tested the Parallel Evoformer on the CASP14 (87 proteins) and CAMEO (371 proteins) datasets. The results showed that the Parallel Evoformer achieves LDDT-Cα and TM-scores virtually identical to the original AlphaFold2 and AlphaFold-Multimer, confirming that the iterative nature of the model compensates for the reordering of operations within the block.

Conclusion

By restructuring the Evoformer block for parallelism and implementing Branch Parallelism, we have significantly reduced the barrier to training high-accuracy protein structure prediction models. These optimizations allow researchers to train AlphaFold2-scale models in less than half the time of original benchmarks, accelerating the pace of discovery in life sciences.

Summary updated

BibTeX
@misc{wang2022efficient,
  author = {Guoxia Wang and Zhihua Wu and Xiaomin Fang and Yingfei Xiang and Yiqun Liu and Dianhai Yu and Yanjun Ma},
  title = {{Efficient AlphaFold2 Training using Parallel Evoformer and Branch Parallelism}},
  year = {2022},
  eprint = {2211.00235},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.00235},
}
Figure