NVIDIA BioNeMo における文脈並列化を用いた生体分子モデリングの拡張
NVIDIA BioNeMo チームが、GPU メモリ制約を克服する文脈並列化(Context Parallelism)フレームワーク「Fold-CP」を発表し、大規模生体分子複合体のゼロショット構造予測を可能にした。
キーポイント
従来の手法の限界打破
従来、単一 GPU のメモリ制約により複雑な生物系を断片化する必要があり、長距離相互作用(アロステリーなど)の解析が困難だったが、新フレームワークでこれを解消する。
文脈並列化(CP)の実装
標準的な Transformer アーキテクチャとは異なる生体分子モデルに適応した CP 手法により、数千残基を超える巨大な分子複合体を全体として扱えるようになった。
高度なハードウェア要件
この技術を実行するには NVIDIA H100 または B200 クラスターと、Transformer Engine の加速機能が必要であり、エクススケール計算を前提としている。
従来の手法の限界
チャンキングなどの既存のワークアラウンドは、VRAM節約には寄与するものの、特にトレーニング中にグローバルな文脈情報を欠くという本質的な課題を抱えています。
BioNeMo CP のアプローチ
NVIDIA BioNeMo のコンテキスト並列性(CP)フレームワークは、1 つの巨大な分子サンプルを複数の GPU に分割してシャードすることで、従来のデータ並列性の限界を克服します。
実装アーキテクチャ
この実装は Torch distributed APIs を基盤としており、低レベルの通信プロトコルから高レベルのモデル固有ワークフローまで、ボトムアップで構築されています。
ボトムアップのアーキテクチャ設計
CP フレームワークは、モジュールレベルの演算子を CP 対応化することから始め、段階的にモデル固有のワークフローへと拡張するボトムアップアプローチを採用している。
影響分析・編集コメントを表示
影響分析
この技術は、構造生物学における計算リソースのボトルネックを根本から解決し、従来は解析不可能だった巨大な生体分子複合体の動的挙動や調節機構の解明を加速させる。これにより、創薬研究や疾患メカニズムの理解において、より高精度で包括的なシミュレーションが可能となり、AI 駆動型バイオテクノロジーの実用化に大きな転換点をもたらす。
編集コメント
単なるハードウェアの性能向上を超え、アルゴリズムレベルでの並列化技術が生物学的な文脈制約を突破した点は画期的です。これにより、AI が扱える生体分子のスケールが劇的に拡大し、創薬プロセスの加速に直結する可能性が高いと言えます。
何十年にわたり、計算生物学は還元主義的な妥協の下で運営されてきました。複雑な生物学的システムを単一の GPU の限られたメモリに収めるために、研究者たちはそれらを孤立した断片—単一タンパク質や小さなドメイン—へと分解せざるを得ませんでした。これにより文脈のギャップが生じ、GPU ハードウェアのメモリ制約のため、より大きなタンパク質や複合体はゼロショットで折りたたむことができませんでした。
現在、NVIDIA BioNeMo チームによる新しい コンテキスト並列化 (CP) フレームワークが構造生物学のメモリバリアを打ち破り、システム全体のホリスティックなモデリングを可能にしています。
この投稿では、標準的な Transformer とは異なるバイオ分子アーキテクチャにおいて CP を実現する方法について説明します。大規模なバイオ分子複合体をグローバルな文脈を犠牲にすることなくモデル化したい構造生物学者、計算化学者、または機械学習エンジニアの方は、ぜひお読みください。
この投稿で概説されたソリューションを使用するには、以下の準備が必要です:
- AlphaFold3 や Boltz-2 などの幾何学的深層学習基盤モデルへの習熟度。
- PyTorch Distributed (DTensor) オペレーションとカスタム自動微分関数の理解。
- NVIDIA H100 または B200 GPU クラスターへのアクセス。このフレームワークは、エクサスケールタスクにおいてその相互接続帯域幅と Transformer Engine の加速に大きく依存しているためです。
詳細については、Fold-CP: A Context Parallelism Framework for Biomolecular Modeling をご覧ください。
Sharding a single large molecular system across multiple GPUs
コンテキスト並列性(Context Parallelism)が存在しない場合、1,000〜3,000 残基を超えるような巨大な複合体を折りたたむには、還元主義的なアプローチが必要となります。これはシステムを実質的または計算的に管理可能な断片に分解する手法です。これらの方法は研究者が単一 GPU の厳格な VRAM(ビデオメモリ)の制限内に留まらせることを可能にしますが、しばしばグローバルな構造精度を犠牲にします。
巨大タンパク質に対する最も一般的な回避策は、配列をより小さく重なり合うセグメントにスライスすることです。局所的な二次構造が分割点全体で整合性を持つようにするためには、断片は大幅に重なり合う必要があります。この手法は長距離情報を破壊してしまいます。例えば、研究者は複合体全体にわたるアロステリーやシグナル伝達をモデル化することができません。
もう一つの一般的な回避策はチャンキング(chunking)です。これは物理的な配列の断片化とは異なり、推論中の VRAM を節約するためにモデルアーキテクチャ内で発生します。Boltz などのモデルは、大きな行列をより小さなタイルで処理するために積極的なチャンキングを採用しています。また、FastFold のような他の技術では、自動チャンキング(autochunking)を用いて動的にチャンキング戦略を調整し、ピークメモリ使用率を改善しています。詳細については、FastFold: Reducing AlphaFold Training Time from 11 Days to 67 Hours をご覧ください。
これらの手法はすべて、特にトレーニング中にグローバルコンテキストの欠如という本質的な課題を抱えています。NVIDIA BioNeMo の CP(Context Parallelism)フレームワークは、単一の巨大な分子システムを複数の GPU にシャードすることでこれらの限界を克服します。従来のデータ並列性(Data Parallelism)が各 GPU に異なるタンパク質の折りたたみタスクを割り当てるのに対し、CP は単一の膨大なサンプルを GPU 間で分割します。
BioNeMo コンテキスト並列性の実装
NVIDIA BioNeMo の CP 実装は、GPU 間通信のための Torch distributed APIs を基盤として構築されています。このアーキテクチャはボトムアップアプローチで設計されており、低レベルの通信プロトコルから始まり、高レベルのモデル固有ワークフローへと段階的に拡張されます。本稿では、Boltz をコードベースの例として使用します。
image*図 1. CP フレームワークのソフトウェアアーキテクチャ設計は、モジュールレベルの演算子をコンテキスト並列性(CP)対応とし、段階的にモデル固有のワークフローへと構築していくボトムアップアプローチを採用しています*
システムの能力が GPU 数に対して線形に成長する線形キャパシティスケーリングを実現するために、このフレームワークは多次元シャード戦略を実装しています。これにより、生体分子の完全なグローバル状態を単一のデバイスが保持してしまうことが防がれ、CP のメモリ目標が損なわれることを回避します。異なるモジュールに対してカスタムのレゴブロックのような部品が構築されており、実装の効率化と他のアーキテクチャへの移植容易性が確保されています。
ペア表現の 2D タイルリング
このフレームワークは、グローバル (N x N) 行列をブロックのグリッドに分割します。10,000 残基からなる複合体(1 億回の相互作用に相当)の場合、各 GPU は特定のサブブロックのみを管理します。これにより、デバイスあたりのメモリフットプリントが O(N^2) から O(N^2/P) に局所化されます。
計算と通信の重なり合わせ
このフレームワークは、非同期のピアツーピア転送とローカル計算を調整するための分散プリミティブを実装しています。ある GPU がローカル更新を計算している間、行および列リング内の隣接ノードとの間でデータの送受信も同時に行われます。生物学的な問題サイズが大きくなるにつれて、計算から通信への比率が向上し、大規模スケールにおいてシステムはより効率的になります。
効率的な原子シーケンスローカルアテンション
AlphaFold3 のシーケンスローカルアテンションでは、原子アテンションを 32 x 128 サイズのローカルアテンションウィンドウに制限し、これらのウィンドウスタックがバッチ処理でアテンション計算を実行します。前述の原子特徴量のタイルリングは、このウィンドウバッチベースのアトムアテンションの分散バージョンのために再分割する必要があります。NVIDIA チームは、ハローエクスチェンジに基づく分散プリミティブを実装して原子特徴量を分割し、その後のウィンドウバッチアテンションで GPU 間通信が不要となるようにしました。
トライアングル乗算に対するコンテキスト並列化の実装
以下の例は、CP(コンテキスト並列)対応のレイヤーを作成し、三角形乗算を分散処理する方法を示しています。
DistributedManager.initialize(device_type="cuda")
manager = DistributedManager()
size_ring = math.isqrt(manager.world_size)
DistributedManager.create_grid_group({"dp": 1, "cp": (size_ring, size_ring)})
ring_comm = Ring2DComm(manager.group["cp"], manager.subgroups["cp"][0], manager.layout_subgroups["cp"])
x_dtensor, mask_dtensor = …
layer_serial = TriangleMultiplicationOutgoing(size_input_embed)
layer_serial.load_state_dict(layer_state_dict)
layer_serial = layer_serial.to(manager.device)
layer = DistributedTriangleMultiplication(Outgoing, layer_serial, manager.device_mesh_subgroups, ring_comm)
result_dtensor = layer(x_dtensor, mask_dtensor)
DistributedManager.cleanup()
このコードは、DistributedManager を使用して正方形の 2D デバイスメッシュを設定することで CP 環境を初期化します。これは行方向および列方向の通信パターンが対称かつ効率的に保たれるようにするための特定のアーキテクチャ要件です。次に、Ring2DComm ハンドルがインスタンス化され、データブロックを連続ループで循環させるための特殊なピアツーピア通信を管理します。このリングアプローチは極めて重要であり、ローカル計算とデータ転送のオーバーラップを可能にすることで、pair 表現テンソルのサイズが単一の GPU のメモリ容量を超えないように保証します。
スクリプトの後半部分は、標準的なシリアルモデルから DTensor ベースのモデルへの移行を処理します。TriangleMultiplicationOutgoing などの標準レイヤーは、NVIDIA BioNeMo CP フレームワークに適応したアルゴリズムの分散版を実装する DistributedTriangleMultiplication にラップされる前に CPU にロードされます。入力を分散テンソル(DTensors)として処理することで、モデルは大規模な活性化テンソルをグリッド全体にシャードします。
構造生物学におけるトークンスケーリングの解放
図 2 は、CP の導入により、生体分子アーキテクチャに対して token(トークン)容量のスケーリング法則が解き放たれたことを示しています。Boltz の予測は最大約 20,000 トークンを 256 台の GPU で実行可能であり、NVIDIA H100 GPU では最大トークン長をスケーリングでき、NVIDIA B300 GPU では加速されたスケーリングが可能です。
image*図 2. NVIDIA BioNeMo CP フレームワークを用いて達成したトークン容量のスケーリング*
追加のトレーニングや長いクロップ長でのファインチューニングを行わずに、チームは 3,605 個のアミノ酸残基からなる TTC7A/PI4KA/FAM126A/EFR3A(700–823) システムを折りたたみました。これは 4 つの鎖にまたがる構造であり、Boltz-2 のトレーニング用クロップサイズである 768 残基や、単一の GPU のメモリ容量を大幅に上回っています。CP(文脈並列処理)を活用することで、4 枚の NVIDIA H100 GPU を使用して、モデル内のコンテキストウィンドウ内ですべての長距離サブユニット間接触を維持したまま、5 つの構造サンプルを 5 分未満(1 サンプルあたり約 54 秒)で生成することが可能になりました。
image*図 3. TTC7A/PI4KA/FAM126A/EFR3A(700–823)複合体(3,605 残基)に対する Boltz-2 の予測。PI4KA(緑)、TTC7A(シアン)、FAM126A(マゼンタ)、そして本質的に無秩序な EFR3A C 末端(黄色)*
並行して、チームは CP フレームワークの開発に深く貢献した Rezo Therapeutics、Proxima、Earendil Labs などの協力者と連携し、この次世代の最前線を開拓しています。
Rezo Therapeutics は CP フレームワークを統合し、最大 6,500 残基にわたる大規模なタンパク質間相互作用(PPIs)の予測を実現しました。これにより、既知のタンパク質複合体の绝大多数に対する構造予測が可能となり、新規複合体の迅速な発見が実現しています。実際、公的データベースで高い信頼性を持つ PPI のみを用いて行われた予測と比較して、CP で解決された高品質な新規タンパク質複合体は 3 倍以上に富んでいます。
Proxima は、すべての原子からなる生成基盤モデル Neo に文脈並列処理(Context Parallelism)を組み込み、独自の大質量分光法プラットフォームによってマッピングされたプロテオーム全体にわたる治療的に重要な相互作用を構造的に解明するために、最大 4,000 トークンまでのアセンブリに対する推論を可能にしました。これにより、分子接着剤やその他の近接ベースの創薬アプローチの開発における創薬研究が支援されています。
Earendil Labs はこのフレームワークを独自の生体分子基盤モデルに統合し、従来は計算コストが高すぎて不可能だった複雑な多タンパク質システムをモデル化するために、入力シーケンス長を拡張することに成功しました。Earendil Labs は、文脈並列処理(CP)が、シーケンスの複雑さがスケールしても高い忠実度の構造予測を維持する可能性があり、次世代バイオ医薬品の発見期間を短縮できることを示しました。
生体分子モデリングのための文脈並列処理の活用
初期の実証実験により、文脈並列処理(CP)が以前のメモリ制約を打破し、無制限サイズの構造モデル化を可能にすることが示されましたが、物理的な容量だけでは生物学的な正確さが保証されるわけではありません。現在のモデルは、小断片でトレーニングされているため、スケールした高忠実度の折りたたみ性能を発揮するのが難しい傾向があります。長距離相互作用の創発するロジックを正確に捉えるためには、より大きなクロップサイズでのファインチューニングが不可欠です。
この取り組みの一環として、この分野における主要なボトルネックの一つであるデータ不足の問題は、AlphaFold Protein Structure Database への貢献を通じて解決されています。NVIDIA の加速コンピューティングソフトウェアである NVIDIA cuEquivariance や NVIDIA TensorRT を活用して、大規模なホモマーおよびヘテロマー複合体の高スループット予測を AFCDB に追加することで、生物学におけるより大きなシステムを表すファウンデーションモデルのトレーニングに有用となる可能性のある合成複合体データの構築に向けた基盤が整えられています。
詳しくは、Boltz CP code open-source documentation をご覧ください。また、Fold-CP: A Context Parallelism Framework for Biomolecular Modeling もご参照ください。
原文を表示
For decades, computational biology has operated under a reductionist compromise. To fit complex biological systems into the limited memory of a single GPU, researchers have had to deconstruct them into isolated fragments—single proteins or small domains. This created a context gap, where larger proteins or complexes could not be folded zero-shot due to GPU hardware memory constraints.
Now, a new context parallelism (CP) framework from the NVIDIA BioNeMo team is shattering the memory barriers of structural biology, enabling the holistic modeling of systems.
This post explains how to achieve CP in biomolecular architectures that diverge from standard Transformers. If you’re a structural biologist, computational chemist, or machine learning engineer seeking to model massive biomolecular complexes without sacrificing global context, read on.
To use the solution outlined in this post, you’ll need:
- Familiarity with geometric deep learning foundation models like AlphaFold3 or Boltz-2.
- Understanding of PyTorch Distributed (DTensor) operations and custom autograd functions.
- Access to an NVIDIA H100 or B200 GPU cluster, as the framework relies heavily on its interconnect bandwidth and Transformer Engine acceleration for exascale tasks.
For more details, see Fold-CP: A Context Parallelism Framework for Biomolecular Modeling.
Sharding a single large molecular system across multiple GPUs
In the absence of CP, folding large complexes (typically exceeding 1,000–3,000 residues) requires a reductionist approach where the system is physically or computationally deconstructed into manageable chunks. These methods enable researchers to stay within the strict VRAM limits of single GPUs, but often sacrifice global structural accuracy.
The most common workaround for massive proteins is to slice the sequence into smaller, overlapping segments. Fragments must overlap significantly to ensure that local secondary structures are consistent across the split points. This method destroys long-range information. For example, researchers cannot model allostery or signal transduction across the entire complex.
The other common workaround is chunking, which, unlike physical sequence fragmentation, occurs within the model architecture to save VRAM during inference. Models like Boltz use aggressive chunking to process large matrices in smaller tiles. Other techniques such as FastFold employ autochunking to dynamically adjust the chunking strategy and improve peak memory usage. To learn more, see FastFold: Reducing AlphaFold Training Time from 11 Days to 67 Hours.
All these techniques inherently suffer from a lack of global context, especially during training. The NVIDIA BioNeMo CP framework overcomes these limits by sharding a single large molecular system across multiple GPUs. Unlike traditional data parallelism, which assigns each GPU a different protein to fold, CP splits a single massive sample across GPUs.
BioNeMo context parallelism implementation
The NVIDIA BioNeMo CP implementation is built on Torch distributed APIs for GPU-to-GPU communications. The architecture is built from the bottom up, starting with low-level communication protocols and moving up to high-level model-specific workflows. This post uses Boltz as the example codebase.

To achieve linear capacity scaling—where the capability of the system grows linearly with the number of GPUs—the framework implements a multidimensional sharding strategy. This ensures that no single device holds the full global state of the biomolecule, which would defeat the memory objectives of CP. Custom lego-like pieces are built for different modules, to make the implementation efficient and easier to port to other architectures.
2D tiling of the pair representation
The framework partitions the global (N x N) matrix into a grid of blocks. For a 10,000-residue complex, which represents 100 million interactions, each GPU manages only a specific sub-block. This localizes the memory footprint from O(N2) to O(N2/P) per device.
Overlapping computation and communication
The framework implements distributed primitives to orchestrate local computation with asynchronous peer-to-peer transfers. While a GPU is computing a local update, it is simultaneously sending and receiving data to and from its neighbors in the row and column rings. As the biological problem size grows, the ratio of computation to communication improves, making the system more efficient at larger scales.
Efficient atom sequence local attention
Alphafold3 sequence local attention limits the atom attention to local attention windows of size 32 by 128, where the stack of such windows go through the attention computation in a batch. The aforementioned tiling of atom features needs to be repartitioned for the distributed version of this window-batching-based atom attention. The NVIDIA team implemented halo-exchange-based distributed primitives to partition the atom features, so that subsequent window-batch attention requires no inter-GPU communication.
Context parallelism implementation for triangle multiplication
The following example shows how to make a CP-aware layer that computes the triangle multiplication in a distributed way.
DistributedManager.initialize(device_type="cuda")
manager = DistributedManager()
size_ring = math.isqrt(manager.world_size)
DistributedManager.create_grid_group({"dp": 1, "cp": (size_ring, size_ring)})
ring_comm = Ring2DComm(manager.group["cp"], manager.subgroups["cp"][0], manager.layout_subgroups["cp"])
x_dtensor, mask_dtensor = …
layer_serial = TriangleMultiplicationOutgoing(size_input_embed)
layer_serial.load_state_dict(layer_state_dict)
layer_serial = layer_serial.to(manager.device)
layer = DistributedTriangleMultiplication(Outgoing, layer_serial, manager.device_mesh_subgroups, ring_comm)
result_dtensor = layer(x_dtensor, mask_dtensor)
DistributedManager.cleanup()
This code initializes a CP environment by using a DistributedManager to set up a square 2D device mesh—a specific architectural requirement that ensures row-wise and column-wise communication patterns remain symmetrical and efficient. The Ring2DComm handle is then instantiated to manage specialized peer-to-peer communication, which allows for the circulation of data blocks in a continuous loop. This ring approach is critical because it enables the overlapping of local computation with data transfers, ensuring that the pair representation tensors never exceed the memory capacity of a single GPU.
The second half of the script handles the transition from a standard serial model to DTensor-based one. A standard layer, such as TriangleMultiplicationOutgoing, is loaded on the CPU before being wrapped by DistributedTriangleMultiplication, which implements a distributed version of the algorithm adapted for the NVIDIA BioNeMo CP framework. By processing inputs as distributed tensors (DTensors), the model ensures that the large activation tensors are sharded across the grid.
Unlocking token scaling for structural biology
Figure 2 shows that token capacity scaling laws are now unlocked for biomolecular architectures with the introduction of CP. Boltz predictions can be run on up to ~20,000 tokens using 256 GPUs and can scale the maximum token length on NVIDIA H100 GPUs, with accelerated scaling on NVIDIA B300 GPUs.

Without any additional training or fine-tuning with longer crop lengths, the team folded a TTC7A/PI4KA/FAM126A/EFR3A(700–823) system that contains 3,605 residues across four chains—far exceeding the Boltz-2 training crop size of 768 residues and the memory capacity of a single GPU. Using CP enabled the generation of five structural samples in under five minutes (∼54 seconds per sample), on four NVIDIA H100 GPUs—while maintaining all long-range inter-subunit contacts within the model context window.

In parallel, the team is also working to push this next-generation frontier alongside collaborators like Rezo Therapeutics, Proxima, and Earendil Labs who have deeply contributed to the CP framework development.
Rezo Therapeutics integrated the CP framework to predict massive protein-protein interactions (PPIs) spanning up to 6,500 residues, enabling structural prediction for the vast majority of known protein complexes and unlocking the rapid discovery of novel complexes. In fact, there is greater than 3x enrichment of CP-resolved, high-quality novel protein complexes when compared to predictions made using only high-confidence PPIs in the public domain.
Proxima embedded CP within their all-atom generative foundation model, Neo, enabling inference on assemblies up to 4,000 tokens to structurally resolve therapeutically relevant interactions across the proteome mapped by their unique mass spectrometry platform, thereby helping their drug discovery efforts in developing molecular glues and other proximity-based therapeutics.
Earendil Labs integrated the framework into their proprietary biomolecular foundation model, successfully extending the input sequence lengths to model complex, multi-protein systems that were previously computationally prohibitive. Earendil Labs demonstrated that CP has the potential to maintain high-fidelity structural predictions even as sequence complexity scales and also shrink discovery timelines for next-generation biotherapeutics.
Get started with context parallelism for biomolecular modeling
While initial proof-of-concepts demonstrate that CP shatters previous memory barriers to enable modeling structures of an unlimited size, physical capacity alone does not guarantee biological accuracy. Current models often struggle to perform high-fidelity folding at scale because they were trained on small fragments. Fine-tuning with larger crop sizes is essential to accurately capture the emergent logic of long-range interactions.
As part of this effort, one of the primary bottlenecks in this field, data scarcity, is being addressed through contributions to the AlphaFold Protein Structure Database. By leveraging NVIDIA accelerated computing software such as NVIDIA cuEquivariance and NVIDIA TensorRT to populate AFCDB with high-throughput predictions of massive homomeric and heteromeric complexes, this is the groundwork to build the synthetic complex data that may be valuable to train foundation models that represent larger systems in biology.
To learn more, see the Boltz CP code open-source documentation and check out Fold-CP: A Context Parallelism Framework for Biomolecular Modeling.
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み