Abstract
Learning over sparse, high-dimensional data frequently necessitates the use of specialized methods such as the hashing trick. In this work, we design a highly scalable alternative approach that leverages the low degree of feature co-occurrences present in many practical settings. This approach, which we call Chromatic Learning (CL), obtains a low-dimensional dense feature representation by performing graph coloring over the co-occurrence graph of features—an approach previously used as a runtime performance optimization for GBDT training. This color-based dense representation can be combined with additional dense categorical encoding approaches, e.g., submodular feature compression, to further reduce dimensionality. CL exhibits linear parallelizability and consumes memory linear in the size of the co-occurrence graph. By leveraging the structural properties of the co-occurrence graph, CL can compress sparse datasets, such as KDD Cup 2012, that contain over 50M features down to 1024, using an order of magnitude fewer features than frequency-based truncation and the hashing trick while maintaining the same test error for linear models. This compression further enables the use of deep networks in this wide, sparse setting, where CL similarly has favorable performance compared to existing baselines for budgeted input dimension.
Introduction
In domains such as ad-tech and user behavior analysis, datasets are characterized by extreme sparsity and high dimensionality. A typical dataset might feature 50 million possible dimensions, yet any single observation may only contain a handful of active features. While linear models can occasionally manage such scale, modern dense architectures—including Deep Neural Networks (DNNs) and Factorization Machines—struggle with the memory overhead. For instance, training a standard "Wide and Deep" model on the KDD Cup 2012 dataset can require over 16GB of GPU memory for a minimal batch size.
Traditionally, engineers have relied on the hashing trick (randomly collapsing features) or frequency truncation (discarding rare features) to manage this dimensionality. However, these methods are inherently lossy and often degrade model accuracy. Chromatic Learning (CL) offers a more structured alternative by exploiting the fact that most features in these datasets never appear together.
The Chromatic Learning Framework
Chromatic Learning treats dimensionality reduction as a graph optimization problem through a three-step process:
- Co-occurrence Graph Construction: A graph is built where each feature is a node. An edge is drawn between two nodes if the corresponding features ever appear in the same data row.
- Graph Coloring: A greedy graph coloring algorithm is applied. Features assigned the same color are guaranteed to never co-occur in the training set.
- Feature Bundling: Mutually exclusive features (those sharing a color) are bundled into a single "virtual" categorical variable. This allows them to share a single slot in a dense vector or embedding layer without interference.
To further refine this representation, the authors apply Submodular Feature Compression, which reduces dimensions based on the information each bundle provides about the target label. This entire pipeline is designed for high scalability, utilizing a parallelized coloring approach to handle datasets with tens of millions of features.
Experimental Results
The researchers evaluated CL against standard benchmarks including url, kdda, kddb, and the massive kdd12 (50.33M features).
As shown in the performance comparisons, CL consistently outperforms frequency truncation and existing sorting-based baselines. On the kdd12 dataset, CL achieved a log loss of 0.159 with a budget of only 1,024 features, significantly better than the 0.173 achieved by the hashing trick.
Key findings include:
- 10x Efficiency: CL requires an order of magnitude fewer features than frequency truncation to reach the same test error.
- Deep Learning Enablement: By compressing 50M features into 1,024 dimensions, CL makes it feasible to train sophisticated models like DeepFM and Neural Factorization Machines on previously "untouchable" sparse data.
Discussion and Limitations
A central insight of this work is that sparsity is highly structured. In the kdd12 dataset, over 99.9997% of feature pairs never co-occur. While graph coloring is essentially lossless for the training set, the authors addressed the "unseen edge" problem—where features might co-occur during testing—using Good-Turing estimators. Their analysis proves that such collisions are rare enough in practice to be negligible.
However, the method does face limitations. Using label information for submodular compression can lead to target leakage, necessitating careful data splitting. Additionally, at very high feature budgets, simple frequency truncation occasionally performs better, likely due to quantization effects in the CL process. Future research will focus on "balanced coloring" to ensure more uniform memory utilization across embedding layers.
Summary updated