Abstract
Traditional graph feature extraction relies on exhaustive searches for frequent subgraphs, often leading to computational bottlenecks and redundant feature sets. We present a randomized approach that samples Maximum Common Subgraphs (MCS) from pairs of examples. By leveraging the outerplanar nature of chemical datasets and specialized isomorphism algorithms, this method achieves a 400% speedup over traditional mining while improving predictive performance and reducing feature redundancy. Our results on National Cancer Institute (NCI) datasets demonstrate that MCS-based features provide superior predictive accuracy compared to traditional mining methods.
1. Introduction
Graph classification is a fundamental task in domains like chemoinformatics, where molecular structures are analyzed to predict biological activities, such as tumor inhibition. Converting these graphs into fixed-length feature vectors is a prerequisite for standard machine learning algorithms like Support Vector Machines (SVMs). Traditional "local pattern mining" attempts to find all subgraphs that meet a frequency or correlation threshold. However, this approach suffers from the "pattern explosion" problem, where thousands of nearly identical, redundant patterns are generated, leading to bloated models and high computational costs.
2. Methodology
We propose a "direct" feature generation approach: instead of searching the entire dataset for global patterns, we randomly sample pairs of molecules and compute their Maximum Common Subgraph (MCS). The MCS represents the largest structural component shared between two specific instances.
2.1 Computational Efficiency via Outerplanar Graphs
While computing the MCS is generally NP-hard, we observe that approximately 95% of molecules in standard benchmarks (e.g., NCI datasets) are outerplanar. By restricting our feature space to outerplanar patterns and employing a specialized "Block-and-Bridge Preserving" (BBP) isomorphism algorithm, we can extract these features in polynomial time.
2.2 The Workflow
The process involves four main steps:
- Sampling: Randomly selecting pairs of molecules from the training set.
- Extraction: Computing the MCS for each pair using the BBP algorithm.
- Filtering: Retaining only unique MCSs to construct the feature set.
- Classification: Representing molecules as bitvectors based on the presence of these MCSs and training an SVM.
3. Experimental Results
The approach was evaluated on 10 datasets from the National Cancer Institute, each containing roughly 3,500 examples of chemical structures.
3.1 Predictive Performance
As shown in Figure 1, using 1,000 random MCS features consistently outperformed the 1,000 most correlated patterns identified through traditional mining. The predictive performance, measured by AUROC, continued to scale as more MCSs were sampled, reaching a peak of 80.5 with approximately 7,500 patterns.
3.2 Redundancy and Efficiency
A key advantage of the MCS approach is the diversity of the generated features. Traditional mining often produces features with high redundancy, where many patterns cover nearly identical sets of examples. In contrast, our random sampling approach yields a much higher percentage of unique encodings.
Quantitatively, the MCS approach achieved a 4x speedup, reducing feature generation time from 2 hours to 28 minutes. Furthermore, the algorithm only required sampling approximately 45,000 pairs to find 1,000 unique features, demonstrating high efficiency relative to the total possible pairwise combinations.
4. Conclusion
Randomized MCS sampling offers a robust alternative to exhaustive subgraph mining. By focusing on shared structures between instances rather than global frequency, the method generates a diverse and effective feature set with significantly lower computational overhead. Future work will explore more sophisticated sampling strategies, such as class-aware pair selection, and adaptations for non-outerplanar graph domains.
Summary updated