Exploration of MSC Trees Using Genetic Algorithms

Jakub Rada, Tomás Musil, Vít FáberaSOFSEM (Doctoral Student Research Forum) 2020

Abstract

Multistream Compression (MSC) is a lossless data compression algorithm that utilizes a binary tree structure. Traditionally, these trees are constructed using Huffman coding principles based on symbol frequency. This paper explores whether Genetic Algorithms (GAs) can evolve more efficient tree structures for MSC. Our results indicate that while Huffman-style trees are effective for raw data, they are sub-optimal for preprocessed data. By employing a GA, we achieved compression improvements of 3–5% on datasets preprocessed with the Burrows-Wheeler Transform (BWT). The findings suggest that the non-linear coding characteristics of methods like Zero Ending Binary Complement (ZEBC) necessitate a departure from standard frequency-based tree building.

Introduction

In lossless data compression, the Multistream Compression (MSC) algorithm organizes data into a binary tree. Historically, MSC has adopted the tree-building rules of Huffman coding, where nodes are merged based on symbol frequency. However, MSC's internal mechanism is distinct; it partitions data into counter streams and applies specific coding methods—such as Elias Alpha or Zero Ending Binary Complement (ZEBC)—at each node.

Structure of an MSC tree node, showing occurrences, symbol, and first occurrence data.

The core question of this research is whether a tree optimized for Huffman coding remains the ideal structure for the more complex internal logic of MSC.

Methodology

To identify optimal tree structures, the researchers utilized a Genetic Algorithm (GA) to navigate the vast search space of potential binary trees.

Genetic Representation and Operators

  • Chromosomes: Trees were represented as sets of {symbol, depth} pairs, facilitating structural manipulation.
  • Fitness Function: Fitness was defined by the final compressed file length; shorter files corresponded to higher fitness.
  • Operators: The GA employed crossover (swapping branches), mutation (adjusting leaf depth), and translocation (swapping symbols between leaves).
  • Constraints: A custom balancing step ensured all evolved chromosomes remained valid binary trees. Additionally, the "left-child-earlier" rule was enforced, requiring the left child to represent a symbol appearing earlier in the data stream than the right child.

Experimental Results

The GA was tested on two English text datasets (5,580 and 11,508 characters) in both raw and BWT-preprocessed states. The study compared the evolved trees against the "Baseline" (BAL) MSC algorithm.

Data Type Improvement over Baseline
Raw Text (5.5k chars) ~1% decrease in efficiency
BWT Preprocessed (5.5k chars) ~5% improvement
BWT Preprocessed (11.5k chars) ~3% improvement

For raw data, the GA failed to outperform the standard Huffman-style baseline. However, for BWT-preprocessed data—the typical use case for high-performance MSC—the GA-evolved trees consistently yielded superior compression.

Discussion: The ZEBC Factor

The performance gain in preprocessed data is largely attributed to the behavior of the ZEBC coding method. Unlike simpler linear coding methods, ZEBC exhibits a logarithmic relationship between input values and coded length.

Comparison of coded lengths for Elias Alpha and ZEBC coding methods across input values.

When data is preprocessed with BWT, a majority of nodes are coded using ZEBC. The GA identifies tree structures that redistribute occurrences among internal switches to better align with ZEBC's non-linear efficiency, a factor that standard Huffman construction ignores. By changing the depths and order of leaves, the GA optimizes how occurrences are divided, leading to the observed 3–5% gain.

Conclusion and Future Work

This study demonstrates that the "Huffman trap"—the assumption that frequency-based merging is always optimal—limits MSC's potential, particularly for preprocessed data. While GAs are currently too computationally intensive for real-time compression, they serve as a vital exploratory tool. Future research will focus on deriving deterministic rules from these evolved trees to enable the rapid construction of high-efficiency MSC structures without the need for iterative optimization.

Summary updated

BibTeX
@inproceedings{rada2020exploration,
  author = {Jakub Rada and Tomás Musil and Vít Fábera},
  title = {{Exploration of MSC Trees Using Genetic Algorithms}},
  booktitle = {SOFSEM (Doctoral Student Research Forum)},
  year = {2020},
}
Figure