Skip to main content
QUICK REVIEW

[Paper Review] Hierarchical Bin Buffering: Online Local Moments for Dynamic External Memory Arrays

Daniel Lemire, Owen Kaser|R-libre (Université Téluq)|Oct 21, 2006
Algorithms and Data CompressionComputer Science23 references5 citations
TL;DR

This paper introduces Hierarchical Bin Buffering, a method for efficiently computing local moments in massive external memory arrays using a small internal buffer. By organizing data into overlapping bins and applying polynomial interpolation, it achieves logarithmic query time with minimal storage—supporting progressive, approximate queries akin to wavelets but with far lower memory overhead.

ABSTRACT

Local moments are used for local regression, to compute statistical measures such as sums, averages, and standard deviations, and to approximate probability distributions. We consider the case where the data source is a very large I/O array of size n and we want to compute the first N local moments, for some constant N. Without precomputation, this requires O(n) time. We develop a sequence of algorithms of increasing sophistication that use precomputation and additional buffer space to speed up queries. The simpler algorithms partition the I/O array into consecutive ranges called bins, and they are applicable not only to local-moment queries, but also to algebraic queries (MAX, AVERAGE, SUM, etc.). With N buffers of size sqrt{n}, time complexity drops to O(sqrt n). A more sophisticated approach uses hierarchical buffering and has a logarithmic time complexity (O(b log_b n)), when using N hierarchical buffers of size n/b. Using Overlapped Bin Buffering, we show that only a single buffer is needed, as with wavelet-based algorithms, but using much less storage. Applications exist in multidimensional and statistical databases over massive data sets, interactive image processing, and visualization.

Motivation & Objective

  • Address the I/O bottleneck in processing massive external memory arrays by reducing reliance on slow disk access.
  • Enable fast online computation of local moments (e.g., sum, variance, regression) over arbitrary ranges in large arrays.
  • Minimize storage requirements compared to wavelet-based methods while supporting progressive query approximation.
  • Support dynamic updates and algebraic queries (e.g., polynomial fitting) in external memory systems with limited internal buffer space.

Proposed method

  • Partition the array into overlapping bins of fixed size b, enabling efficient buffering and reuse of precomputed values.
  • Use hierarchical buffering with multiple levels to reduce query time complexity to O(b log_b n) using N buffers of size n/b.
  • Apply bin-wise Lagrange interpolation to approximate local moments using only a few bins near query range boundaries.
  • Leverage the binomial expansion to express any local moment about an arbitrary point c in terms of moments about the start of the range.
  • Use a single real-valued buffer to store and update moment information across multiple orders N, enabling multi-query support.
  • Enable progressive query evaluation by retrieving only the necessary bins near the range edges, reducing both time and storage.
Figure 1: An algebraic range query supported by Bin Buffering, as in Eq. ( 2 ).
Figure 1: An algebraic range query supported by Bin Buffering, as in Eq. ( 2 ).

Experimental results

Research questions

  • RQ1Can local moment queries over massive external arrays be computed efficiently with minimal internal memory?
  • RQ2How can hierarchical buffering reduce query time complexity while maintaining low storage requirements?
  • RQ3To what extent can bin-wise Lagrange interpolation approximate local moments with only a few bins near the range edges?
  • RQ4Can a single buffer support multiple local moment queries simultaneously without significant storage overhead?
  • RQ5How does the error in approximation decay as more bins are used near the range boundaries?

Key findings

  • Using N buffers of size √n, the time complexity for local moment queries drops to O(√n), significantly improving performance over naive approaches.
  • With hierarchical buffering, query time complexity achieves O(b log_b n), offering logarithmic scalability with minimal buffer usage.
  • Overlapped Bin Buffering allows only one buffer to support multiple local moments, reducing storage to a fraction of wavelet-based methods.
  • For N=16 and b=8, using just 5 bins per edge captures 97% of the error, demonstrating high accuracy with minimal bin usage.
  • The amplitude of interpolation error decays faster than exponentially with distance from the bin edge, validating the effectiveness of partial bin evaluation.
  • The method supports progressive query evaluation—users can obtain approximate results quickly and refine them by accessing more bins.
Figure 2: An algebraic range query supported by Hierarchical Bin Buffering. We essentially repeat Figure 1 over the buffer itself. In the example given, by aggregating buffer components, we replace 6 first-scale buffer components by 2 second-scale components.
Figure 2: An algebraic range query supported by Hierarchical Bin Buffering. We essentially repeat Figure 1 over the buffer itself. In the example given, by aggregating buffer components, we replace 6 first-scale buffer components by 2 second-scale components.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.