CAKE: A Scalable Commonsense-Aware Framework For Multi-View Knowledge Graph Completion

Guanglin Niu, Bo Li, Yongfei Zhang, Shiliang Pu

Abstract

Knowledge Graph Completion (KGC) is essential for populating large-scale factual databases, yet current methods often produce conceptually nonsensical predictions or suffer from poor training signals. We propose CAKE (Commonsense-Aware Knowledge Embedding), a scalable framework that automatically derives commonsense rules from factual triples. CAKE improves training through Commonsense-Aware Negative Sampling (CANS) and refines inference via Multi-View Link Prediction (MVLP). Experimental results across four benchmarks show that CAKE consistently boosts the performance of state-of-the-art embedding models, achieving up to a 16.7% improvement in Mean Reciprocal Rank.

Introduction: Challenges in Knowledge Graph Completion

Knowledge Graphs (KGs) such as Freebase and DBpedia are foundational for many AI applications but are inherently incomplete. While KGC models aim to predict missing links, they face two primary challenges that limit their effectiveness:

  1. Invalid Negative Sampling: Training KGC models requires negative examples to distinguish true facts from false ones. Standard random sampling often generates "low-quality" negatives (e.g., (Los Angeles, LocatedIn, Apple Pie)) that are too easy for the model to identify, or "false negatives" where a sampled triple is actually true but simply missing from the database.
  2. Uncertainty in Link Prediction: Models often rank entities based on geometric proximity in an embedding space without considering conceptual constraints. This leads to "uncertain" predictions that violate basic commonsense, such as predicting a city name when the relationship specifically requires a country.
Challenges in KGC: Invalid negative sampling and prediction uncertainty.

Methodology: The CAKE Framework

To address these issues, CAKE introduces a multi-stage approach that leverages latent commonsense within the KG itself to guide both training and inference.

The CAKE framework architecture, integrating ACG, CANS, and MVLK modules.

Automatic Commonsense Generation (ACG)

Rather than relying on external, manually curated knowledge bases, the ACG module automatically abstracts factual triples into concept-level rules. For instance, the fact (David, Nationality, U.S.A.) is generalized to the commonsense rule (Person, Nationality, Country). This allows the model to understand the expected "types" for any given relation.

Commonsense-Aware Negative Sampling (CANS)

CANS utilizes the generated concepts to produce high-quality negative samples. By selecting entities that match the required concept (e.g., another country) but are factually incorrect for the specific head entity, CANS creates a more challenging training environment. This helps the model learn sharper decision boundaries while minimizing the risk of false negatives.

During the inference phase, CAKE employs a "coarse-to-fine" filtering mechanism. The "Commonsense View" first excludes all candidate entities that do not satisfy the required concept constraints. Subsequently, the "Fact View" uses standard embedding scores to rank the remaining valid candidates. This ensures that the top-ranked predictions are both factually likely and conceptually sound.

Evaluation and Results

The framework was evaluated as a plug-in for several state-of-the-art models (TransE, RotatE, and HAKE) across four datasets: FB15K, FB15K-237, NELL-995, and DBpedia-242.

CAKE demonstrated significant performance gains across the board. Notably, the Mean Reciprocal Rank (MRR)—a measure of how high the correct answer is ranked—improved by 7.2% on FB15K, 11.5% on FB15K-237, and a massive 16.7% on NELL-995. These results underscore the effectiveness of using commonsense to prune the search space and improve training signal quality.

Discussion and Conclusion

CAKE demonstrates that commonsense is latent within factual data and can be extracted to improve KGC scalability and accuracy. Beyond performance, CAKE enhances model explainability by providing conceptual justifications for its predictions (e.g., "I predicted 'NBA' because the query requires a 'Sports League'").

However, the framework's effectiveness depends on the availability of entity-to-concept mappings within the KG. Future research may explore more complex logic, such as multi-hop reasoning, and methods to handle noise in existing ontologies. In summary, CAKE provides a robust, scalable solution for making Knowledge Graph Completion more "sensible."

Summary updated

BibTeX
@inproceedings{niu2022cake,
  author = {Guanglin Niu and Bo Li and Yongfei Zhang and Shiliang Pu},
  title = {{CAKE: A Scalable Commonsense-Aware Framework For Multi-View Knowledge Graph Completion}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.acl-long.205},
}
Figure