Skip to main content
QUICK REVIEW

[Paper Review] Tree Compression with Top Trees

Philip Bille, Inge Li Goertz|arXiv (Cornell University)|Apr 21, 2013
Algorithms and Data CompressionComputer Science21 references7 citations
TL;DR

This paper introduces top tree compression, a novel scheme that exploits tree pattern repeats—unlike traditional DAG compression which only uses rooted subtree repeats. By leveraging top trees to represent and navigate compressed trees efficiently, the method achieves near-optimal compression, supports logarithmic-time navigational queries, and can compress exponentially better than DAG compression while never being worse by more than a logarithmic factor.

ABSTRACT

We introduce a new compression scheme for labeled trees based on top trees. Our compression scheme is the first to simultaneously take advantage of internal repeats in the tree (as opposed to the classical DAG compression that only exploits rooted subtree repeats) while also supporting fast navigational queries directly on the compressed representation. We show that the new compression scheme achieves close to optimal worst-case compression, can compress exponentially better than DAG compression, is never much worse than DAG compression, and supports navigational queries in logarithmic time.

Motivation & Objective

  • To address the limitation of DAG compression, which only exploits rooted subtree repeats and fails to compress highly repetitive internal tree structures like single-path trees.
  • To develop a compression scheme that leverages tree pattern repeats—any connected subgraph—thereby capturing more structural redundancy in trees.
  • To support efficient navigational queries (e.g., parent, label, size, depth) directly on the compressed representation, with guaranteed logarithmic time complexity.
  • To achieve a provable compression ratio that is close to optimal in the worst case and never worse than DAG compression by more than a logarithmic factor.
  • To demonstrate that tree pattern repeats can yield exponentially better compression than subtree repeats, especially in repetitive tree structures.

Proposed method

  • The method uses top trees to represent the compressed tree as a hierarchical decomposition of clusters, where each cluster corresponds to a connected subgraph with shared structure.
  • It introduces a procedure, FindRepresentatives, that locates the set of clusters representing a given node’s subtree by performing a top-down and bottom-up traversal of the top tree decomposition.
  • The compression scheme stores merge information and structural metadata (e.g., height, size, boundary nodes) for each cluster to support efficient query operations.
  • Navigational queries such as parent, next sibling, size, and depth are computed using the cluster decomposition and stored metadata, enabling O(log n) time complexity.
  • The decomposition supports decompression of any subtree by unfolding the relevant clusters and combining them using merge rules stored in the top tree structure.
  • The scheme is designed to be space-efficient and supports path queries and subtree queries directly on the compressed structure without full decompression.

Experimental results

Research questions

  • RQ1Can a tree compression scheme that exploits tree pattern repeats achieve better worst-case compression than DAG compression, which only exploits rooted subtree repeats?
  • RQ2Is it possible to support efficient navigational queries (e.g., parent, size, depth) on a compressed tree representation in logarithmic time, even when exploiting arbitrary tree pattern repeats?
  • RQ3How does the compression ratio of the proposed scheme compare to DAG compression in terms of worst-case guarantees and exponential improvements?
  • RQ4Can the new scheme be both space-efficient and support fast queries, avoiding the exponential query times common in tree grammar-based approaches?
  • RQ5Is there a provable separation in compression power between tree pattern repeat-based schemes and subtree repeat-based schemes like DAG compression?

Key findings

  • The top tree compression scheme achieves a worst-case compression ratio of at least logσ^0.19 n, which is the first such provable lower bound for any scheme exploiting tree pattern repeats.
  • The scheme can compress trees exponentially better than DAG compression, particularly in cases with high internal repetition such as single-path trees with identical labels.
  • The scheme never compresses worse than DAG compression by more than a logarithmic factor, ensuring robust performance across all tree types.
  • All navigational queries (e.g., parent, size, depth, label) are supported in O(log n) time directly on the compressed representation, a significant improvement over tree grammar-based methods.
  • The decompression of any subtree T(x) is supported in O(log n + |T(x)|) time, combining efficient cluster lookup and local unfolding.
  • Preliminary experiments confirm that top tree compression outperforms standard DAG compression on typical XML datasets, with only minor advantages for balanced trees.

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.