# CoKE: Contextualized Knowledge Graph Embedding

arXiv: https://arxiv.org/abs/1911.02168 · HTML: https://mlsanity.com/paper/1911.02168/

## Key facts

- Cited by 30 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 6 Nov 2019.

## Built on by (most cited first, 30 of 30)

- [Link Prediction on N-ary Relational Facts: A Graph-based Approach](https://mlsanity.com/paper/2105.08476/) (2021)
- [DisenKGAT: Knowledge Graph Embedding with Disentangled Graph Attention Network](https://mlsanity.com/paper/2108.09628/) (2021)
- [MKGL: Mastery of a Three-Word Language](https://mlsanity.com/paper/2410.07526/) (2024)
- [Tri-Modal Motion Retrieval by Learning a Joint Embedding Space](https://mlsanity.com/paper/2403.00691/) (2024)
- [I Know What You Do Not Know: Knowledge Graph Embedding via Co-distillation Learning](https://mlsanity.com/paper/2208.09828/) (2022)
- [Language Models as Knowledge Embeddings](https://mlsanity.com/paper/2206.12617/) (2022)
- [Transformer-based Entity Typing in Knowledge Graphs](https://mlsanity.com/paper/2210.11151/) (2022)
- [Self-attention Presents Low-dimensional Knowledge Graph Embeddings for Link Prediction](https://mlsanity.com/paper/2112.10644/) (2021)
- [Learning Representations for Hyper-Relational Knowledge Graphs](https://mlsanity.com/paper/2208.14322/) (2022)
- [OKGIT: Open Knowledge Graph Link Prediction with Implicit Types](https://mlsanity.com/paper/2106.12806/) (2021)
- [Unleashing the Power of Transformer for Graphs](https://mlsanity.com/paper/2202.10581/) (2022)
- [A Survey On Few-shot Knowledge Graph Completion with Structural and Commonsense Knowledge](https://mlsanity.com/paper/2301.01172/) (2023)
- [Joint Pre-training and Local Re-training: Transferable Representation Learning on Multi-source Knowledge Graphs](https://mlsanity.com/paper/2306.02679/) (2023)
- [Random Entity Quantization for Parameter-Efficient Compositional Knowledge Graph Representation](https://mlsanity.com/paper/2310.15797/) (2023)
- [StarGraph: Knowledge Representation Learning based on Incomplete Two-hop Subgraph](https://mlsanity.com/paper/2205.14209/) (2022)
- [Efficient Relation-aware Neighborhood Aggregation in Graph Neural Networks via Tensor Decomposition](https://mlsanity.com/paper/2212.05581/) (2022)
- [Efficient Learning of Discrete-Continuous Computation Graphs](https://mlsanity.com/paper/2307.14193/) (2023)
- [Multi-view Contrastive Learning for Entity Typing over Knowledge Graphs](https://mlsanity.com/paper/2310.12008/) (2023)
- [Learning Relation-Specific Representations for Few-shot Knowledge Graph Completion](https://mlsanity.com/paper/2203.11639/) (2022)
- [IMKGA-SM: Interpretable Multimodal Knowledge Graph Answer Prediction via Sequence Modeling](https://mlsanity.com/paper/2301.02445/) (2023)
- [Knowledge Reasoning via Jointly Modeling Knowledge Graphs and Soft Rules](https://mlsanity.com/paper/2301.02781/) (2023)
- [Two-dimensional Taxonomy for N-ary Knowledge Representation Learning Methods](https://mlsanity.com/paper/2506.05626/) (2025)
- [KARL-Trans-NER: Knowledge Aware Representation Learning for Named Entity Recognition using Transformers](https://mlsanity.com/paper/2111.15436/) (2021)
- [Using Graph Algorithms to Pretrain Graph Completion Transformers](https://mlsanity.com/paper/2210.07453/) (2022)
- [Context-driven Visual Object Recognition based on Knowledge Graphs](https://mlsanity.com/paper/2210.11233/) (2022)
- [ReInform: Selecting paths with reinforcement learning for contextualized link prediction](https://mlsanity.com/paper/2211.10688/) (2022)
- [DsMtGCN: A Direction-sensitive Multi-task framework for Knowledge Graph Completion](https://mlsanity.com/paper/2306.10290/) (2023)
- [COTET: Cross-view Optimal Transport for Knowledge Graph Entity Typing](https://mlsanity.com/paper/2405.13602/) (2024)
- [Efficient Relational Context Perception for Knowledge Graph Completion](https://mlsanity.com/paper/2501.00397/) (2024)
- [A Survey of Task-Oriented Knowledge Graph Reasoning: Status, Applications, and Prospects](https://mlsanity.com/paper/2506.11012/) (2025)

## Abstract (arXiv)

Knowledge graph embedding, which projects symbolic entities and relations into continuous vector spaces, is gaining increasing attention. Previous methods allow a single static embedding for each entity or relation, ignoring their intrinsic contextual nature, i.e., entities and relations may appear in different graph contexts, and accordingly, exhibit different properties. This work presents Contextualized Knowledge Graph Embedding (CoKE), a novel paradigm that takes into account such contextual nature, and learns dynamic, flexible, and fully contextualized entity and relation embeddings. Two types of graph contexts are studied: edges and paths, both formulated as sequences of entities and relations. CoKE takes a sequence as input and uses a Transformer encoder to obtain contextualized representations. These representations are hence naturally adaptive to the input, capturing contextual meanings of entities and relations therein. Evaluation on a wide variety of public benchmarks verifies the superiority of CoKE in link prediction and path query answering. It performs consistently better than, or at least equally well as current state-of-the-art in almost every case, in particular offering an absolute improvement of 21.0% in H@10 on path query answering. Our code is available at urlhttps://github.com/PaddlePaddle/Research/tree/master/KG/CoKE.
