TL;DR
Sensitivity Analysis (SA) for digital pathology is incredibly compute- and memory-intensive, requiring workflows to be re-executed thousands of times across massive whole-slide images. This paper introduces the Runtime Memory-Efficient Scheduler for Reuse (RMSR), a novel scheduling strategy that aggressively reuses intermediate computations across different parameter sets. By decoupling workflow merging from memory footprint, RMSR achieves up to a 2.8× speedup over prior methods and maintains a 92% parallel efficiency when scaled up to 7,168 CPU cores.
What Problem Does This Paper Address?
In digital pathology, analyzing Whole-Slide Images (WSIs) of cancer tissue is a massive data challenge. A single WSI can exceed 50 GB or 120K×120K pixels. Processing these images involves multi-stage workflows (normalization, segmentation, and feature computation) governed by numerous parameters.
To ensure scientific conclusions are robust, researchers use Sensitivity Analysis (SA) to quantify how changes in input parameters impact the final output. However, SA requires running the entire workflow repeatedly across hundreds or thousands of parameter variations.
While many of these runs share identical parameters for early stages of the workflow, caching or merging these tasks historically hits a "memory wall." Prior state-of-the-art methods like the Reuse-Tree Merging Algorithm (RTMA) merge overlapping tasks into a single tree structure, but as more tasks are merged, the concurrent memory requirement skyrockets, causing nodes to run out of memory when handling large images.
Methods
The authors developed RMSR (Runtime Memory-Efficient Scheduler for Reuse), built on top of the open-source Region Templates Framework (RTF).
Instead of limiting how many workflows can be merged to avoid running out of memory (which limits the potential for computation reuse), RMSR introduces a smart runtime execution strategy:
- Aggressive Merging: It builds a massive task tree combining as many parameter sets as possible, ignoring traditional memory bounds during the planning phase.
- Depth-First Scheduling: At runtime, RMSR restricts the number of concurrently active execution paths (
activePaths) from the root to the leaves of the task tree. - Memory Decoupling: By processing the tree in a depth-first order and strictly controlling the number of active paths, RMSR ensures that memory utilization remains low and bounded, regardless of how many workflows were merged.
The overall architecture of this framework is illustrated below:
Datasets
The proposed system was evaluated using:
- Brain tissue images from cancer studies, processed as image tiles ranging from standard 4K×4K pixels up to large 11K×11K pixels.
- A large-scale scalability dataset consisting of 6,113 4K×4K brain tissue image tiles to test multi-node distributed performance.
Key Insights and Ideas
- Decoupling Reuse from Footprint: The core "aha" moment is that memory consumption isn't dictated by how much computation you merge, but by how you schedule the merged tasks.
- The Failure of Caching: Traditional memoization (caching results to disk/RAM) fails in data-intensive imaging because storing intermediate high-resolution images is often slower and more resource-intensive than simply recomputing them. RMSR bypasses this by structuring reuse directly into the execution graph.
- Granularity Matters: The framework exploits both coarse-grained (entire workflow stages) and fine-grained (individual internal tasks) reuse, maximizing efficiency even when parameter sets only partially overlap.
Key Results
- Up to 2.8× Speedup: In memory-constrained environments (e.g., 6 GB available memory), RMSR ran 2.8× faster than RTMA because it could merge 28 parameter sets safely, whereas RTMA could only safely merge 2.
- Resilience to Image Scaling: As image sizes grew to 11K×11K pixels, RTMA's reuse efficiency dropped significantly due to strict memory limits. RMSR maintained a high reuse rate (36.36%), outperforming RTMA's task reuse by 1.6× on a 64 GB machine.
- High Scalability: When deployed on a massive distributed cluster of 256 nodes (7,168 CPU cores), RMSR achieved a parallel efficiency of 92%, proving its viability for large-scale clinical datasets.
Limitations and Future Work
- Homogeneous Task Assumption: RMSR assumes that workflow tasks have relatively homogeneous memory demands. If a workflow contains highly heterogeneous tasks, RMSR must optimize for the worst-case memory-hogging task, which leads to suboptimal scheduling.
- Future Directions: The authors plan to explore automatic task granularity adjustment to dynamically balance scheduling overhead against reuse gains. They also aim to incorporate input dataset characteristics directly into the workflow generation phase to further optimize execution graphs.
Summary updated