Abstract
In machine learning, entity representation often relies on either Knowledge Graphs (KGs) for structured facts or Behavior Graphs (BGs) for user interactions. Bayes EMbedding (BEM) is a novel framework that unifies these complementary sources using a Bayesian generative approach. By treating KG embeddings as a prior for generating BG embeddings, BEM refines both representations, yielding significant improvements in node classification and industrial-scale recommendation tasks.
Introduction
Representing entities as low-dimensional vectors, or embeddings, is a cornerstone of modern recommendation systems and knowledge discovery. Traditionally, these embeddings are derived from two distinct sources: Knowledge Graphs (KGs), which store static, structured facts (e.g., "this product belongs to the PC category"), and Behavior Graphs (BGs), which capture dynamic interactions (e.g., "users who viewed this item also purchased that one").
While KGs provide a factual "skeleton," BGs offer behavioral "flesh." However, most existing models treat these as independent inputs, often resorting to simple concatenation or one-way initialization. BEM (Bayes EMbedding) addresses this gap by integrating them into a single, mutually reinforcing Bayesian framework.
The Challenge of Heterogeneous Data
The primary difficulty in unifying KGs and BGs lies in their structural differences. KGs are highly heterogeneous, directed networks of triplets, whereas BGs are typically simpler, undirected networks of interactions. Simple concatenation often fails to preserve the unique topological information of each graph. Furthermore, static knowledge doesn't always reflect how entities behave in specific contexts—for instance, a product's category in a KG might not fully capture its seasonal relevance in a purchase graph.
The BEM Framework
BEM conceptualizes the relationship between facts and behaviors through a top-down generative process. It assumes that an entity's behavior is a manifestation of its underlying knowledge, adjusted by specific contextual biases.
The generative process consists of four key stages:
- The Prior: Utilizes pre-trained KG embeddings ($w$) as the foundational knowledge.
- The Correction: Introduces a behavior-specific bias term ($\delta$) to account for contextual variations in entity behavior.
- The Projection: Employs a non-linear function ($f_\phi$) to project the refined knowledge into the behavior space.
- The Observation: Samples the final BG embedding ($z$) based on this projection.
Technical Implementation and Variational Inference
To handle the complexity of large-scale graphs, BEM utilizes Variational Inference. An "Inference Network" approximates the posterior distribution of latent variables, making the model computationally efficient.
The authors also introduced BEM-P, a variant that incorporates pairwise node interactions. This ensures that the refined embeddings respect the original topological structure of the graphs by pulling related entities closer in the embedding space while pushing dissimilar ones apart.
Experimental Evaluation
BEM was rigorously tested on both benchmark and industrial datasets:
- Small-Scale Benchmarks: Using FB15K237 as the KG and Wikipedia pagelinks/descriptions as BGs, BEM-P achieved node classification accuracy boosts of 2% to 10%.
- Industrial Scale: On a massive Alibaba Taobao dataset (17.37M entities, billions of edges), BEM improved hit recall by 1% to 3%, a significant margin at such a scale.
Beyond performance metrics, BEM demonstrated an ability for "knowledge discovery," predicting factual relationships (e.g., linking "sports training" to "yoga mats") that were absent in the original static KG but evident in behavioral patterns.
Conclusion
BEM represents a significant step forward in multi-source representation learning. By treating knowledge as a prior and behavior as an observation, it creates a feedback loop where behaviors refine facts and facts ground behaviors. Future work will explore end-to-end joint training and real-time "online" updates to further enhance the framework's adaptability.
Summary updated