Leaf-FM: A Learnable Feature Generation Factorization Machine for Click-Through Rate Prediction

Qingyun She, Zhiqiang Wang, Junlin ZhangarXiv 2021

TL;DR

Leaf-FM introduces a Feature Generation Network (FGNet) that automatically learns non-linear transformations of feature embeddings. This approach automates manual feature engineering while achieving the high predictive accuracy of complex deep learning models and maintaining the $O(m \times d)$ online serving speed of standard Factorization Machines (FM).

Introduction: The Efficiency-Expressiveness Trade-off

In Click-Through Rate (CTR) prediction, engineers face a constant tug-of-war between model expressiveness and serving efficiency. Simple models like Factorization Machines (FMs) are production favorites due to their inference speed. However, they often require labor-intensive manual feature engineering (e.g., creating $x^2$ or $\sqrt{x}$ transformations) to capture complex patterns.

Conversely, deep learning models like DeepFM or AutoInt automate feature discovery but introduce significant computational overhead, making them difficult to deploy in high-throughput, low-latency environments. Leaf-FM bridges this gap by learning complex transformations during training that can be efficiently served online.

The Leaf-FM Architecture

The core innovation is the Feature Generation Network (FGNet). Instead of manual transformation, a small sub-network is attached to each feature embedding to learn non-linear representations.

Feature Generation Network (FGNet)

As illustrated in the architecture, FGNet utilizes a "bottleneck" structure with two fully connected layers. The first layer expands the embedding dimension (via an expansion ratio $r$), while the second shrinks it back to the original size. This allows the model to capture intricate, non-linear versions of raw features automatically.

The overall architecture of Leaf-FM and its Feature Generation Network (FGNet).

Integration Strategies

The authors propose three variants for merging generated features ($g_i$) with original embeddings ($v_i$):

  1. LA-FM (Add): Treats generated features as independent entities.
  2. LS-FM (Sum): Combines original and generated features into a single vector.
  3. LP-FM (Product): Applies an element-wise product between the two.

Crucially, because these transformations can be pre-computed or treated as simple preprocessing, the online serving complexity remains $O(m \times d)$, matching the efficiency of a standard FM.

Experimental Evaluation

The model was benchmarked against three large-scale datasets: Criteo (45M instances), Avazu (40M instances), and Malware (8.9M instances).

Key Results and Performance

  • Predictive Accuracy: All Leaf-FM variants significantly outperformed standard FMs and FFMs. On the Avazu and Malware datasets, LA-FM achieved performance competitive with heavy deep learning models like DeepFM and AutoInt.
  • Scalability: While DNNs initially led on the Criteo dataset with small embeddings, increasing the embedding size to 100 allowed Leaf-FM to surpass them.
  • Serving Efficiency: The primary advantage of Leaf-FM is its scalability in production. As shown in the complexity comparison, it avoids the parameter explosion of Field-aware FMs (FFMs) and the MLP overhead of deep models.
Comparison of model complexities for parameters, offline training, and online serving.

Insights and Future Directions

Leaf-FM effectively replaces manual "expert knowledge" with automated feature generation, learning optimal power forms (like squares or roots) through backpropagation. The authors noted that increasing the number of generated features generally improves AUC, peaking at around 11 features for the Criteo dataset.

While offline training is more intensive due to the FGNet parameters, the preservation of $O(m \times d)$ serving complexity makes it a highly practical solution for industry. Future work may explore combining these learnable features with higher-order interaction layers to further boost performance without sacrificing inference speed.

Summary updated

BibTeX
@misc{she2021leaf,
  author = {Qingyun She and Zhiqiang Wang and Junlin Zhang},
  title = {{Leaf-FM: A Learnable Feature Generation Factorization Machine for Click-Through Rate Prediction}},
  year = {2021},
  eprint = {2107.12024},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2107.12024},
}
Figure