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

Exact and Approximate Median Splitting on Distributed Memory Machines

Matthieu Garrigues, Antoine Manzanera2013

TL;DR

This paper introduces a novel, fine-grained, randomized algorithm for finding the median of a large dataset distributed across multiple processors. It achieves an average convergence time of O(N/P * (log(N) + µ)), making it efficient for massively parallel distributed memory systems.

What Problem Does This Paper Address?

Finding the median of a dataset is a fundamental operation in statistics and computer science. While sequential algorithms like QuickSelect and Median of Medians exist, efficiently performing this task on distributed memory systems (where data is spread across multiple computers) presents a significant challenge. Existing parallel approaches often struggle with load balancing or don't fully leverage the capabilities of modern distributed architectures. This paper aims to bridge this gap by proposing a decentralized parallel median splitting algorithm that can effectively utilize the power of these systems.

Methods

The authors develop a series of algorithms, starting with a basic "swap on tree" approach and progressively refining it. The core idea is to map the data onto a binary tree structure and use specialized operations like selectmin, selectmax, and reorder to efficiently move elements towards their correct positions relative to the median.

The key innovations lie in:

  • Decentralized Operation: Each processor works on its local data and exchanges information with only one other processor at a time, avoiding a central bottleneck.
  • Randomized Approach: The use of random offsets in the "Final Algorithm" (Section 5) is crucial. This "horizontal motion" at each level of the tree helps to break symmetry and avoid worst-case scenarios, leading to faster convergence.
  • Pipeline Parallelism: The final algorithm is designed to be pipelined, allowing multiple iterations to run concurrently across different stages of the tree, further boosting performance.

Datasets

Not discussed in the paper. The algorithms are evaluated using random arrays of varying sizes.

Key Insights and Ideas

  • The Power of Randomness: Introducing random shifts (offsets) at each level of the tree is surprisingly effective at preventing the algorithm from getting stuck in inefficient states, significantly improving convergence speed compared to deterministic approaches.
  • Pipelining for Throughput: The ability to pipeline operations across different levels of the tree is a critical insight for achieving high performance on parallel architectures. This allows for overlapping computation and communication.
  • Balancing Local and Global: The algorithm cleverly balances local operations (selectmin, selectmax) with controlled inter-processor communication (reorder), making it suitable for distributed memory systems.

Key Results

The paper demonstrates that their final randomized algorithm achieves an average convergence time of O(N/P * (log(N) + µ)), where N is the input size, P is the number of processors, and µ is the time to swap a pair of elements. This is a significant improvement over previous methods, especially for large datasets and many processors. Figure 9 shows that, on average, 99% of elements are correctly placed within 10 pipeline steps, regardless of input size.

Limitations and Future Work

  • Worst-Case Scenarios: While the randomized algorithm performs well on average, the paper acknowledges that worst-case scenarios for the underlying operations can still lead to a higher number of iterations (though still better than earlier versions).
  • Hardware Specifics: The authors suggest that their approach is well-suited for "networks on chip" with thousands of processing elements, implying that further work could focus on optimizing implementations for specific hardware architectures.
  • Theoretical vs. Practical: While the theoretical complexity is promising, practical performance will depend on the efficiency of the selectmin, selectmax, and reorder operations on the target distributed system.

Summary updated

Abstract

We present in this paper a new fine grained median split algorithm which places the median on the middle index of an input array of size N. Running on P processors, the randomized version converges in O ( N P × (log(N) + µ)) average time where 0 < P < N 4 and µ is the time to swap a pair of elements between two nodes. At each iteration, the nodes process only its local elements and exchange part of them with another processor of the network. This makes it a decentralized parallel algorithm and offers the possibility to take advantage of massively parallel computing networks based on distributed memory systems.
BibTeX
@misc{garrigues2013exact,
  author = {Matthieu Garrigues and Antoine Manzanera},
  title = {{Exact and Approximate Median Splitting on Distributed Memory Machines}},
  year = {2013},
}
Figure