arXiv:2608.27029cs.PFAug 2026

Manuscript Offprint

arXiv:2608.27029

FoldPipe: Bounded Remote Streaming of Native Molecular Shards with Asynchronous Prefetch

Dhiren Mukesh Khatri

Abstract

Abstract— Training molecular machine-learning models on ephemeral or memory-constrained accelerator instances can require repeatedly retrieving preprocessed molecular graphs from remote storage. FoldPipe is a lightweight Python orchestration layer for already-sharded PyTorch and PyTorch Geometric data. It retrieves one shard ahead in a background thread while the consumer trains on the current shard, keeping the number of live shard payloads bounded with respect to total dataset size.

Asynchronous prefetch and bounded buffering are established systems techniques rather than novel scheduling algorithms. FoldPipe's contribution is a small integration targeted at native .pt molecular shards together with a source-pinned empirical characterization of its operating regime.

We evaluate a SchNet energy-and-force workload on MD17 aspirin using 20 paired, order-alternating benchmark passes on a Tesla T4. Each pass processes five pinned shards containing 25,000 structures. FoldPipe records 16.33 s mean I/O-compute overlap, compared with zero by construction for the sequential bounded baseline. Mean pass time is 76.78 s for FoldPipe and 83.37 s for the baseline. However, the geometric mean paired speedup is 1.059×1.059 \times with a 95% bootstrap interval of 0.878×−1.288×0.878 \times -1.288 \times. The experiment therefore verifies the overlap mechanism but is inconclusive about a reliable wall-clock speed advantage under the observed public-network variability.

1 Introduction

Molecular machine-learning workloads commonly represent molecular conformations as graphs containing atomic identities, coordinates, energies, and forces. Architectures such as SchNet [1] can operate on these representations through PyTorch [2] and PyTorch Geometric (PyG) [3].

In temporary notebook or cloud environments, however, processed training data may reside in remote storage while host memory and persistent disk are limited. A researcher may already possess hundreds or thousands of serialized PyTorch or PyG shard files and may not want to migrate them into a new database or archive format merely to stream them to a training process.

FoldPipe addresses this narrow integration problem. It consumes existing bounded-size .pt shards through a small source interface and overlaps retrieval of shard i+1i+1 with computation on shard i.

The system deliberately does not claim that producer–consumer queues, bounded buffering, asynchronous prefetch, or the resulting pipeline equations are new. Prefetch and computation–I/O overlap are long-established systems techniques [4]. The contribution is instead the application boundary: direct remote consumption of native PyTorch/PyG molecular shards together with an instrumented evaluation that distinguishes mechanism from observed end-to-end speed.

This paper makes three contributions:

  1. a small backend-independent interface for remotely stored native PyTorch/PyG shards;

  2. a one-stage asynchronous pipeline whose number of live shard payloads remains constant with respect to total shard count;

  3. a paired MD17/SchNet experiment that directly measures retrieval, deserialization, computation, overlap, memory, and runtime while reporting uncertainty rather than assuming that overlap necessarily produces a speedup.