In classical parallel computing, we typically achieve speedups by partitioning data across space—distributing the pixels of an image or the rows of a matrix across multiple processors. However, for many modern machine learning tasks, such as sampling from diffusion models or solving differential equations, the primary bottleneck is time. These processes are inherently sequential: the state at time $t+1$ depends strictly on the state at time $t$.
To break this sequential bottleneck, researchers have developed "parallel-in-time" methods. The fundamental intuition behind these techniques is to trade memory (space) for speed (time). By storing and updating entire trajectories or multiple potential states simultaneously, we can reduce the number of sequential rounds required, but at the cost of a significantly larger memory footprint.
Breaking the Sequential Chain with Picard Iterations
The most direct way to parallelize a sequential process is to treat the entire time evolution as a single object to be optimized. In the context of diffusion models and log-concave sampling, Zhou et al. and the authors utilize a "diagonal-style" parallel Picard iteration.
In a standard sequential sampler, you compute $x_1$ from $x_0$, then $x_2$ from $x_1$, and so on. In a parallel Picard framework, the system maintains a guess for the entire path $\{x_0, x_1, \dots, x_T\}$ in memory. Multiple processors then update different segments of this path simultaneously. As Zhou et al. demonstrate, this can reduce the number of sequential communication rounds from $O(d)$ to $O(\log d)$.
However, this speed comes with a steep price. Chen et al. point out that achieving sub-linear time complexity often requires space complexity that scales quadratically with the data dimension. Because the algorithm must store and update the entire trajectory at once, the memory requirement explodes. This is further exacerbated by the "roughness" of the dynamics; as Zhou et al. note, rougher trajectories (like those in Langevin dynamics) require a much finer discretization grid, demanding even more memory to maintain accuracy.
Multiple Shooting and Boundary States
A similar trade-off appears in continuous-depth neural networks, such as Neural ODEs. Traditionally, these models are solved by integrating a differential equation from start to finish. Massaroli et al. propose Differentiable Multiple Shooting Layers (MSLs) to parallelize this.
The intuition here is to divide the total time interval into several independent sub-intervals. Each sub-interval is solved in parallel, but this introduces a new problem: the end of one interval must match the start of the next. To handle this, the algorithm must store the "boundary states" for every sub-interval simultaneously. The authors observe that memory consumption scales proportionally with the number of subdivisions, creating a direct conflict between execution speed and the memory limits of high-dimensional state spaces.
This concept extends to optimal control. Särkkä et al. show that parallelizing the Hamilton–Jacobi–Bellman (HJB) equation requires storing a matrix or grid of costs for pairs of states rather than a single value function. This allows for logarithmic time complexity ($O(\log T)$) but significantly increases the spatial complexity of the solver.
The Memory Explosion of Work-Stealing
Beyond specific mathematical solvers, the memory-parallelism tradeoff manifests as a structural problem in general software execution. In fork-join parallel programs, a phenomenon known as memory explosion can occur.
Kaler et al. explain that while a serial program might be memory-efficient, its parallel counterpart can consume memory linearly proportional to the number of processors. This happens because idle processors "steal" tasks that involve memory allocations. In a sequential execution, these allocations would happen one after another, reusing the same memory space. In parallel, they happen concurrently, causing the "Memory High-Water Mark" to spike.
To mitigate this, researchers often employ strategies that sacrifice some parallelism for memory stability:
- Tiling: Ashish Agarwal describes how limiting the number of concurrent iterations in vectorized loops (tiling) allows practitioners to balance throughput against hardware memory constraints.
- Lazy Distribution: Pietracaprina et al. propose "lazy" work-distribution for combinatorial searches, which maintains a low memory footprint by avoiding the explicit storage of massive unexplored subtrees.
Replication vs. Contention
Finally, a common source of memory overhead in parallel systems is the use of data replication to avoid thread contention. In high-throughput tasks like tomographic reconstruction, Biçer et al. and the authors show that replicating data structures for each thread eliminates the need for slow locking mechanisms.
While this maximizes throughput and allows for massive scaling (up to 32,000 cores), it creates a high demand for system RAM. The scalability of these systems is ultimately not limited by the number of cores, but by the memory-per-core ratio of the hardware. As Frank Wood notes in the context of probabilistic programming, managing these independent execution paths via state-copying is essential for parallel efficiency but remains a primary driver of memory bottlenecks.
Summary of the Tradeoff
The transition from sequential to parallel execution is rarely free. Whether through storing entire trajectories in Picard iterations, maintaining boundary states in multiple shooting, or replicating data to avoid contention, the path to faster inference and training is paved with increased memory requirements. Understanding this tradeoff is critical for designing algorithms that can scale to the next generation of high-dimensional machine learning problems.
Key Foundational Work
hve Parallel Algorithms for Production System Execution on the DADO Machine (1984) — contributed 1 concept elements to this direction.
Implementation of Parallel Numerical Algorithms Using Hierarchically Tiled Arrays (2004) — contributed 1 concept elements to this direction.