Greedy Feature Construction

Dino Oglic, Thomas Gärtner

The Trade-off: Scalability vs. Capacity

In machine learning, practitioners frequently face a strict trade-off between scalability and capacity. Linear models are the highly scalable "workhorses" of large-scale data science, but they suffer from low capacity, restricted to learning only linear relationships. To capture non-linear patterns, researchers typically turn to kernel methods, which implicitly map data into a high-dimensional feature space.

However, standard kernel methods (such as Support Vector Machines with a Gaussian kernel) require selecting the kernel before observing the data. A poor upfront choice leads to poor generalization. While techniques like Random Fourier Features (RFF) help scale kernel methods, they remain "unsupervised"—generating features randomly without considering target labels. This raises a critical question: Can we construct features in a supervised, theoretically sound, and computationally efficient manner?

Introducing Greedy Feature Construction (GFC)

To address this gap, researchers propose Greedy Feature Construction (GFC). The core innovation is treating feature construction as a form of functional gradient descent.

Instead of training all features simultaneously, GFC builds a high-capacity feature space incrementally:

  1. Residual Fitting: The algorithm adds features one by one. At each step, it evaluates the current error (the residual) and searches for a new feature that best approximates that error.
  2. Ridge-Wave Basis: Features are selected from a set of "ridge-wave" functions—specifically cosine-wave features ($a \cos(\langle w, x \rangle + b)$). These serve as the building blocks of shift-invariant kernels, such as the Radial Basis Function (RBF) kernel.
  3. The Pipeline:
    • The process initializes with a simple bias (the mean of the outputs).
  4. It executes multiple "greedy descents" in parallel across different cores or machines to discover candidate features.
  5. A linear ridge regression model is fitted over the constructed features to determine their final weights (amplitudes).
  6. Finally, redundant features with negligible weights are pruned.

Unlike competing methods like "á la carte" (ALC) learning—which uses a mixture of Gaussians to learn the kernel spectral measure and requires complex hyperparameter optimization—GFC simply "greedily" selects the best next direction.

Key Insights and Empirical Results

GFC was evaluated on a diverse set of regression benchmarks, including massive datasets like the Year Prediction MSD (over 500,000 instances), the Luís Torgo Regression Suite, and standard artificial benchmarks.

The results highlight several major advantages:

  • Supervised Efficiency: Because GFC leverages labels to build features, it achieves the accuracy of Random Fourier Features using significantly fewer features.
  • Speed and Scalability: GFC is consistently faster than the state-of-the-art ALC method. In many scenarios, GFC constructs 500 features in less time than ALC takes to construct 100. The method scales linearly with both the number of instances ($m$) and the problem dimension ($d$).
  • No Pre-specified Kernel: The greedy process effectively "discovers" the necessary spectral components by fitting residuals, eliminating the need to guess whether the data follows a Gaussian or Laplacian distribution.
Performance comparison of GFC and ALC across various datasets.

As shown in the performance table above, GFC frequently outperforms or matches ALC in Root Mean Squared Error (RMSE) while requiring a fraction of the wall-clock time, particularly on complex datasets like UJIndoorLoc and CT-slice.

Limitations and Future Directions

While powerful, GFC has a few limitations. Finding the optimal parameters ($w, b$) for a new feature is a non-convex optimization problem. Although parallel restarts help find strong solutions, there is no strict guarantee of finding the global best feature at each step. Additionally, storing a massive number of constructed features for exceptionally large datasets can lead to high memory overhead during the final linear model fit.

Future work may explore alternative basis functions. While the current framework focuses on cosine waves to relate to shift-invariant kernels, the underlying functional gradient approach could theoretically be adapted for other dictionaries, such as sigmoids or ReLUs, opening new avenues for scalable, high-capacity learning.

Summary updated

BibTeX
@inproceedings{oglic2016greedy,
  author = {Dino Oglic and Thomas Gärtner},
  title = {{Greedy Feature Construction}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2016},
}
Figure