---
title: Exactly-Mergeable Summaries
url: https://www.emergentmind.com/topics/exactly-mergeable-summaries
type: topic
---

# Exactly-Mergeable Summaries

Exactly mergeable summaries are compact data structures or objects, together with a binary operator, enabling the precise and efficient aggregation of information from disjoint subsets of data. They guarantee that the summary over the union of disjoint sets can be reconstructed deterministically and losslessly from the summaries of its constituent parts, with bounded or constant space complexity relative to data set size. Exactly mergeable summaries underpin scalable streaming, parallel, and distributed data analytics, supporting the execution of merge and reduce computations with strong theoretical guarantees [2303.15465].

## 1. Formal Definition and Algebraic Structure

Let $U$ be a universe and $A \subseteq U$. A summary function $\Sigma$ maps subsets $A$ to a compact set $S$ (the summary or sketch domain), such that:
- **Space constraint:** The data representation $\Sigma(A)$ is bounded in size, i.e., $O(1)$ or $O(\log |A|)$.
- **Mergeability:** Given disjoint $A,B \subseteq U$, there exists a binary operator $F : S \times S \to S$ such that:
  $$
  \Sigma(A \cup B) = F(\Sigma(A), \Sigma(B))
  $$
  This operator $F$ must be commutative and associative, so that mergeability generalizes from pairs to arbitrary finite disjoint collections.

An *exactly mergeable summary* is thus determined by the pair $(\Sigma,F)$ with the above structural properties [2303.15465].

## 2. Fundamental Examples and Taxonomy

Exactly mergeable summaries include a broad spectrum of aggregation types:
- **Scalar monoid summaries:** $\mathbb{R}$ or $\mathbb{R}^k$ equipped with $+$, $\min$, $\max$ (e.g., sum, count, min, max).
- **Top-$k$ summaries:** Store the $k$ largest (or smallest) elements. Merge via partial sort of $2k$ elements.
- **Histograms:** Fixed-length frequency vectors indexed by bins or categories, merged by component-wise addition.
- **Moments and means:** E.g., $(n_A, \mu_A)$ where $\mu_A = (1/n_A)\sum_{x \in A} v(x)$. Merge via weighted averages.
- **Intervals:** $[ \min_{x \in A} v(x), \max_{x \in A} v(x) ]$. Merge via $[\text{min}, \text{max}]$ of endpoints.
- **Composed summaries:** Direct product of mergeable summaries is itself mergeable (cf. Lemma 6.1 in [2303.15465]).

A decisive theoretical result is that the median is not exactly mergeable: equal medians among two pairs of subsets can yield different union medians, violating the merge property (Example 6.3 in [2303.15465]).

| Type             | Representation         | Merge Rule              |
|------------------|-----------------------|-------------------------|
| Count            | $n$                   | $n_A + n_B$             |
| Sum              | $s$                   | $s_A + s_B$             |
| Top-$k$          | $k$-item list         | Top-$k$ of $A \cup B$   |
| Histogram        | Bin counts            | Elementwise sum         |
| (Count, Mean)    | $(n, \mu)$            | Weighted mean           |

## 3. Algorithmic Framework and Complexity

Exactly mergeable summaries require one-pass scanning over subsets. For summary types such as count, sum, min, and max, both computation and merging are $O(1)$; for top-$k$, $O(k)$; for histograms, $O(|K|)$ where $K$ is the number of bins or categories [2303.15465]. Merge operations never revisit raw data. This property is leveraged in streaming and parallel reductions (e.g., MapReduce), where summaries from separate partitions are merged hierarchically with no loss in final summary fidelity.

For streaming quantile estimation, advanced sketches such as DDSketch [1908.10693], UDDSketch [2101.06758], and adaptive compactors [2511.17396] instantiate exactly mergeable summaries for approximate order statistics under space and error guarantees.

## 4. Exactly Mergeable Quantile Sketches

Parallel and distributed quantile computation critically depends on exactly mergeable sketches. Several key architectures exemplify this:

- **DDSketch**: For $\alpha \in (0,1)$, maintains logarithmically spaced buckets covering positive real values. The insertion procedure assigns each observation to a bucket; the merge operation combines by summing per-bucket counts, followed by bucket collapses if an upper bound is exceeded [1908.10693]. The quantile estimate for a rank $p$ is within multiplicative error $\alpha$ of the empirical quantile. Merging two DDSketches (same $\gamma, m$) yields a summary identical to that computed on the union stream.

- **UDDSketch**: Refines DDSketch via a uniform collapsing rule to guarantee, after merging, that the output matches the one-pass sketch of the combined data. Parallel reduction is enabled by a commutative, associative merge that preserves the error and size bounds, with the merged summary accurately covering all quantiles regardless of the incoming data's distribution [2101.06758].

- **Adaptive Compactors**: Organize the sketch as a stack of compactors with adaptive section sizes and markers, so that during merge, invariants on buffer sizes and compaction tokens are preserved. Marker and token bookkeeping guarantees that the relative error and space remain within prescribed bounds even after nontrivial merges, and simplified proofs eliminate difficult schedule/charging arguments present in earlier designs. Mergeability remains exact: merging two adaptive compactor sketches with compatible parameters yields a sketch that encodes the same distributional summary as processing the combined set [2511.17396].

## 5. Theoretical Framework and Non-Mergeability Criteria

The theoretical underpinnings require that the summary $\Sigma(A)$ be a function of $A$ satisfying compositionality under disjoint union:
$$
\Sigma(A \cup B) = F(\Sigma(A), \Sigma(B)), \quad \forall A \cap B = \emptyset
$$
The operation $F$ is typically commutative and associative, forming a semigroup or monoid.

**Lemma (Composition):** The direct product of two exactly mergeable summaries is again exactly mergeable via componentwise application of their respective operators. See Lemma 6.1 in [2303.15465].

**Theorem (Non-mergeability test):** If there exist $A_1,B_1, A_2,B_2$ disjoint with $\Sigma(A_1) = \Sigma(A_2), \Sigma(B_1) = \Sigma(B_2)$, but $\Sigma(A_1 \cup B_1) \ne \Sigma(A_2 \cup B_2)$, then $\Sigma$ is not exactly mergeable [2303.15465].

Median fails this criterion; mean, count, and variance do not.

## 6. Applications and Advantages

Exactly mergeable summaries are foundational in high-throughput, distributed, and parallel data analysis:

- **MapReduce and streaming frameworks:** Partial summaries allow segment-level processing with global aggregation by iterative merging, eliminating the need for raw data shuffling.
- **Big data analytics:** Support for fixed-space, high-fidelity summarization (histograms, top-$k$, frequency moments, quantile sketches).
- **Symbolic and interval data analysis:** Mergeable summaries facilitate modal clustering, categorical distribution tracking, and streaming histogram maintenance.
- **Quantile and distribution estimation in network telemetry or distributed storage:** DDSketch, UDDSketch, and adaptive compactors offer relative-error guarantees, speed, space efficiency, and near-linear scalability with number of streams or nodes [2511.17396, 2101.06758, 1908.10693].

The principal advantages are strict space guarantees, lossless merge when summaries are properly constructed and merged, and independence from the order of operations or data partitioning [2303.15465].

## 7. Extensions, Limitations, and Connections to Abstractive Fusion

The exactly mergeable summaries paradigm is tightly linked to algebraic aggregation theory. While mean, sum, min, max, and histograms are exactly mergeable, statistics such as the median or quantiles (without approximation) are not, owing to their lack of compositionality [2303.15465].

A closely related but structurally distinct concept is *summary-candidate fusion* in neural abstractive summarization, as in SummaFusion [2210.08779]. Here, the fusion operator is learned (neural cross-attention), and the merged output is not guaranteed to encode the full union of all salient tokens from the inputs—so formal exact mergeability is absent. Instead, fusion empirically synthesizes and rescues key content from diverse inputs, but can also abstract, paraphrase, or discard information. Thus, while neural fusion methods yield superior qualitative and quantitative results in second-stage summarization, they do not provide the exact mergeability formalized in the data summarization literature.

A plausible implication is that exactly mergeable summaries remain the only family supporting strict, lossless parallel and incremental computation for complex aggregation under hard space constraints, while fusion-based neural summarization offers high-quality empirical “soft merges” without formal guarantees of completeness.

Source: https://www.emergentmind.com/topics/exactly-mergeable-summaries