Fast and Continual Knowledge Graph Embedding via Incremental LoRA

Jiajun Liu, Wenjun Ke, Peng Wang, Jiahao Wang, Jinhua Gao, Ziyu Shang, Guozheng Li, Zijie Xu, Ke Ji, Yining Li

Abstract

Continual Knowledge Graph Embedding (CKGE) aims to efficiently learn new knowledge and simultaneously preserve old knowledge. Dominant approaches primarily focus on alleviating catastrophic forgetting of old knowledge but neglect efficient learning for the emergence of new knowledge. However, in real-world scenarios, knowledge graphs (KGs) are continuously growing, which brings a significant challenge to fine-tuning KGE models efficiently. To address this issue, we propose a fast CKGE framework (FastKGE), incorporating an incremental low-rank adapter (IncLoRA) mechanism to efficiently acquire new knowledge while preserving old knowledge. Specifically, to mitigate catastrophic forgetting, FastKGE isolates and allocates new knowledge to specific layers based on the fine-grained influence between old and new KGs. Subsequently, to accelerate fine-tuning, FastKGE devises an efficient IncLoRA mechanism, which embeds the specific layers into incremental low-rank adapters with fewer training parameters. Moreover, IncLoRA introduces adaptive rank allocation, which makes the LoRA aware of the importance of entities and adjusts its rank scale adaptively. Experimental results demonstrate that FastKGE can reduce training time by 34%-68% while achieving competitive or superior link prediction performance against state-of-the-art models.

Introduction

Knowledge Graphs (KGs) are structured databases representing facts as triples, such as (Harry Potter, friend, Ron Weasley). In practice, these graphs are dynamic; for instance, Wikidata grows by millions of entities annually. The challenge of Continual Knowledge Graph Embedding (CKGE) is to update models with new facts without suffering from catastrophic forgetting (losing old knowledge) or incurring prohibitive costs (the expense of full retraining).

While existing CKGE methods focus on preventing forgetting through data replay or constraints, they often overlook training efficiency. As KGs scale, full-parameter fine-tuning becomes a significant bottleneck. FastKGE addresses this by leveraging the efficiency of Low-Rank Adaptation (LoRA), traditionally used in Large Language Models, and tailoring it for graph structures.

Methodology

The FastKGE framework operates in three main stages: Graph Layering, IncLoRA Learning, and Link Predicting.

The three-stage FastKGE framework: Graph Layering, IncLoRA Learning, and Link Predicting.

1. Graph Layering

FastKGE organizes new entities into $N$ distinct layers based on their structural importance. It utilizes Breadth-First Search (BFS) to determine the distance of new entities from the existing graph and considers degree centrality to prioritize highly connected entities. This layering isolates new knowledge, preventing interference with established embeddings.

2. IncLoRA (Incremental Low-Rank Adapter)

Instead of updating the entire embedding matrix, FastKGE freezes original weights and injects small, trainable low-rank matrices ($A$ and $B$). A key innovation is Adaptive Rank Allocation, which assigns higher ranks (more parameters) to layers containing influential entities and lower ranks to peripheral ones, ensuring the parameter budget is spent where the graph is most complex.

Experimental Evaluation

The framework was evaluated on four standard benchmarks (ENTITY, RELATION, FACT, HYBRID) and two new, larger-scale datasets: FB-CKGE and WN-CKGE. These new datasets are designed to reflect realistic scenarios, starting with a large foundational graph (60% of triples) followed by incremental snapshots.

Results and Discussion

FastKGE achieves significant efficiency gains without compromising accuracy. On traditional datasets, it reduces training time by 34%–49%. On the larger FB-CKGE and WN-CKGE datasets, the reduction is even more pronounced at 51%–68%.

Link prediction performance (MRR) and parameter efficiency across various CKGE datasets.

In terms of accuracy, FastKGE maintained a competitive average Mean Reciprocal Rank (MRR) of 21.0% on public datasets, nearly matching the 21.1% of state-of-the-art models. Notably, on the larger, more realistic datasets, FastKGE outperformed all baselines in link prediction by approximately 1.5%, demonstrating superior scalability.

Conclusion

FastKGE demonstrates that LoRA can be effectively adapted for graph data by incorporating structural awareness. By isolating new knowledge into incremental adapters and using adaptive rank allocation, the framework solves the dual challenges of catastrophic forgetting and training efficiency. Future work will explore handling knowledge deletion and reducing dependency on the initial KGE architecture.

Summary updated

BibTeX
@inproceedings{liu2024fast,
  author = {Jiajun Liu and Wenjun Ke and Peng Wang and Jiahao Wang and Jinhua Gao and Ziyu Shang and Guozheng Li and Zijie Xu and Ke Ji and Yining Li},
  title = {{Fast and Continual Knowledge Graph Embedding via Incremental LoRA}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2024},
  url = {https://openreview.net/forum?id=7N0oGRG8vU},
}
Figure