Knowledge graph-based recommendation

Also known as: KG-based recommendation

On this page 7

Knowledge graph-based recommendation is an approach in recommender systems that enriches user-item interaction data with a knowledge graph, a network of entities such as products, brands, actors or genres connected by typed relations. The model reasons over paths and neighborhoods in that graph to infer which items a user is likely to want, instead of relying only on co-occurrence patterns in clicks or ratings.

Also called KG-based recommendation, the technique addresses three persistent weaknesses of collaborative filtering: data sparsity, the cold start problem for new items, and the lack of human-readable explanations. It is used in e-commerce, media streaming, news, music and point-of-interest recommendation.

How a knowledge graph supports recommendations

A knowledge graph stores facts as triples of head, relation and tail, for example (Inception, directed_by, Christopher Nolan). In a recommender, items from the catalog are aligned to graph entities, and user interactions are added as additional edges, producing a combined structure sometimes called a collaborative knowledge graph.

Once items are connected through shared attributes, the system can propagate preference signals along relations. A user who watched two films by one director becomes connected through multi-hop paths to that director’s other films, to frequent collaborators and to similar genres, even when no other user has watched those titles together.

ElementExampleRole in recommendation
User nodeCustomer accountSource of preferences
Item nodeProduct, film, songCandidate to recommend
Attribute entityBrand, genre, author, ingredientLinks items semantically
Interaction edgePurchased, watched, ratedObserved behavior
Knowledge edgeBelongs_to, directed_by, made_ofBackground facts that transfer signal
Typical graph elements in a recommender

Main families of methods

Research generally divides KG-based recommendation into embedding-based, path-based and propagation-based methods. Each uses the graph differently and offers a different balance between accuracy, interpretability and computational cost.

FamilyHow it uses the graphRepresentative models
Embedding-basedLearns entity vectors with knowledge graph embedding, then feeds them to the recommenderCKE, DKN
Path-basedEnumerates or samples meta-paths between user and itemMeta-path methods, KPRN
Propagation-basedAggregates information from multi-hop neighbors with graph neural networksRippleNet, KGCN, KGAT
Reinforcement path reasoningAn agent walks the graph to find an explanatory pathPGPR
LLM-assistedUses a language model to build or query the graphEmerging hybrid systems
Families of knowledge graph-based recommendation methods

Embedding-based models rely on knowledge graph embedding techniques such as TransE or TransR, which represent a relation as a translation between entity vectors. Propagation-based models, now the most common in research, apply attention over neighbors so that relevant relations receive more weight than noisy ones.

Comparison with other recommendation approaches

KG-based recommendation sits between collaborative filtering and content-based filtering. It uses behavioral signals like the former and item attributes like the latter, but adds structured relations between attributes, which neither classical approach models explicitly.

ApproachMain signalCold start for new itemsExplainability
Collaborative filteringUser-item interactionsPoorLow
Content-based filteringItem featuresGoodModerate
Knowledge-based recommender systemExplicit rules and constraintsGoodHigh
KG-based recommendationInteractions plus graph relationsGoodHigh via paths
LightGCNUser-item graph onlyPoorLow
How the approach compares with neighboring techniques

The similar names cause frequent confusion. A knowledge-based recommender system asks users for requirements and applies rules, as in configuring a car or a mortgage, whereas KG-based recommendation learns from a graph statistically and still depends on behavioral data.

Building and deploying a knowledge graph recommender

The graph is the most expensive part of the system. Teams either link items to public knowledge graphs such as Wikidata or build a domain graph from internal catalogs, supplier data and extracted text. Entity linking accuracy has a large effect: a wrong link adds misleading relations to every recommendation that passes through it.

DecisionRecommended choiceReason
Graph sourceStart with catalog attributes, add public data laterHigher precision, easier maintenance
Number of hopsTwo to three hopsDeeper paths add noise and cost
Relation pruningRemove relations with weak signalReduces over-smoothing and memory
Serving architecturePrecompute embeddings for candidate generationGraph propagation is too slow at request time
EvaluationMeasure accuracy plus coverage and noveltyGraph methods often improve long-tail exposure
Practical design decisions

In production, KG-based models usually serve as one stage of a multi-stage ranking pipeline, contributing item embeddings or candidates, while a separate ranking model handles real-time features. Offline gains do not always transfer online, so A/B testing remains essential.

Limitations and common pitfalls

  • Incomplete or noisy graphs. Missing relations limit benefit, and wrong relations actively mislead the model.
  • Scalability. Graphs with millions of entities make multi-hop propagation memory-intensive.
  • Popularity bias in the graph. Well-documented entities have many edges, so popular items can gain even more exposure.
  • Plausible but unfaithful explanations. A displayed path may look sensible without being the real reason for the score.
  • Maintenance cost. Catalogs change daily, and the graph must be updated to stay useful.

In simple terms

Most recommendation engines work like this: people who bought this also bought that. That works when many people have shopped before. It fails for new products or unusual tastes.

A knowledge graph adds facts about how things are connected. It knows that a film has a director, that a director made other films, and that a book belongs to a series. The system can then say: you liked two films by this director, so here is a third. It recommends by understanding connections, not only by copying the crowd, and it can show you the reason.

A practical example

An online bookstore with about 400,000 titles finds that new releases receive almost no recommendations during their first weeks, because few customers have bought them yet. The data science team builds a graph linking books to authors, series, publishers, subjects and translators, roughly 2 million edges in total.

They train a propagation-based model with two-hop attention and use its embeddings to generate candidates, keeping the existing ranking model unchanged. A newly published third volume in a fantasy series is now recommended to readers of the first two volumes on release day, with the explanation that it continues a series the reader has bought.

In a four-week A/B test, the share of recommendations pointing to titles under 30 days old roughly doubles, and click-through rate on new releases rises noticeably while overall conversion stays stable. The team also schedules a nightly graph update so that newly cataloged titles join the graph immediately.