Abstract
Data represented as strings abounds in biology, linguistics, document mining, web search and many other fields. Such data often have a hierarchical structure, either because they were artificially designed and composed in a hierarchical manner or because there is an underlying evolutionary process that creates repeatedly more complex strings from simpler substrings. We propose a framework, referred to as Lexis, that produces an optimized hierarchical representation of a given set of "target" strings. The resulting hierarchy, "Lexis-DAG", shows how to construct each target through the concatenation of intermediate substrings, minimizing the total number of such concatenations or DAG edges. The Lexis optimization problem is related to the smallest grammar problem. After we prove its NP-hardness for two cost formulations, we propose an efficient greedy algorithm for the construction of Lexis-DAGs. We also consider the problem of identifying the set of intermediate nodes (substrings) that collectively form the "core" of a Lexis-DAG, which is important in the analysis of Lexis-DAGs. We show that the Lexis framework can be applied in diverse applications such as optimized synthesis of DNA fragments in genomic libraries, hierarchical structure discovery in protein sequences, dictionary-based text compression, and feature extraction from a set of documents.
Introduction
Sequential data—strings of characters—is fundamental to numerous scientific and technical fields, from genomics to document mining. These strings are rarely random; they often exhibit a nested, hierarchical structure. For instance, in synthetic biology, complex DNA sequences are assembled from shorter, pre-existing fragments. The challenge lies in identifying the most efficient hierarchical representation for a collection of target strings, a problem that goes beyond standard compression of single strings. Lexis addresses this by modeling the shared hierarchy of a string collection as a Directed Acyclic Graph (DAG).
The Lexis Framework
The core of the framework is the Lexis-DAG, where source nodes represent the basic alphabet, target nodes represent the desired final strings, and intermediate nodes represent reusable substrings or "sub-assemblies."
Optimization and Algorithms
Lexis defines two primary cost functions for optimization:
- Edge Cost: Minimizing the total number of edges in the DAG.
- Concatenation Cost: Minimizing the total number of merge operations required to construct the targets.
As finding the absolute minimum-cost DAG is NP-hard, the authors developed G-Lexis, a greedy algorithm. G-Lexis iteratively selects substrings that maximize a "SavedCost" metric—balancing substring length and repetition frequency—to create new intermediate nodes.
To further analyze these structures, the framework employs Path-Centrality to identify "core" nodes—the vital substrings through which most construction paths must pass.
Experimental Evaluation
The Lexis framework was evaluated on three diverse datasets:
- iGEM Dataset: 1,375 synthetic DNA sequences composed of 787 elementary BioBricks.
- Yeast Proteome: 1,500 protein sequences from baker’s yeast.
- NSF Abstracts: Over 2,000 research award abstracts across four distinct fields.
Key Results and Insights
Structural Discovery: Design vs. Randomness
A key finding was the distinction between functional and random sequences. Real iGEM DNA sequences exhibited significantly deeper hierarchies (8 levels) compared to randomized versions (4.4 levels). This suggests that functional biological sequences utilize a specific, optimized vocabulary of parts.
The "Hourglass" Effect
Lexis-DAGs often reveal an "hourglass" architecture, where a small set of intermediate core nodes is responsible for constructing the vast majority of target strings. This structural property highlights the importance of specific building blocks over simple frequency-based metrics.
Performance Metrics
- DNA Synthesis: Lexis achieved an 11% improvement in cost-efficiency for assembling DNA libraries compared to existing state-of-the-art methods.
- Compression: Lexis-based compression outperformed standard greedy dictionary methods by 2% to 20%.
- Feature Extraction: Using "core" nodes as features for an SVM classifier yielded 90% accuracy on NSF abstracts. This approach utilized a sparser matrix than n-gram models, enhancing computational efficiency for machine learning tasks.
Conclusion
Lexis provides a robust optimization framework for uncovering the latent hierarchical structure in sequential data. While G-Lexis is a heuristic, its practical performance across genomics, text compression, and classification is significant. Future work aims to develop an incremental version of Lexis for real-time data processing and to further validate the biological significance of identified protein motifs with domain experts.
Summary updated