TL;DR
Knowledge Graph Tuning (KGT) enables real-time LLM personalization by editing a structured external Knowledge Graph (KG) rather than updating model weights. By adding and removing explicit knowledge triples based on user feedback, KGT eliminates the need for expensive back-propagation while achieving superior personalization accuracy, human-interpretable updates, and massive reductions in memory and latency.
What Problem Does This Paper Address?
When deploying LLMs as personal assistants, users expect them to adapt dynamically to personalized factual knowledge (e.g., "My dog is vegetarian"). Current personalization paradigms face severe trade-offs:
- Parameter-editing methods (e.g., Fine-Tuning, Knowledge Editing like ROME or MEND, and Knowledge Neurons) require gradient back-propagation. This incurs heavy GPU memory overhead and latency, making real-time on-device updates impossible. Furthermore, editing dense weights risks parameter corruption and catastrophic forgetting over long interaction histories.
- In-context learning & unstructured memory lead to context bloat, linear latency increases as context expands, and struggles with resolving conflicting or stale factual assertions.
The authors ask: Can we achieve real-time, interpretable, and conflict-aware LLM personalization without touching model parameters?
Methods
Instead of altering LLM weights $\theta$, KGT adjusts an external knowledge graph $\mathcal{G}$ via inference-only operations:
-
Probabilistic Objective Formulation (ELBO): The authors model the probability of an answer $a$ given query $q$ by marginalizing over retrieved graph triples $z$: $$P_{\theta,\mathcal{G}}(a|q) = \sum_{z\in\mathcal{G}} P_{\theta,\mathcal{G}}(a|q,z) P_{\theta,\mathcal{G}}(z|q)$$ Using an Evidence Lower Bound (ELBO), the objective optimizes two terms:
-
Knowledge Retrieval: Minimizing KL divergence between the retrieval prior and the posterior distribution of personalized triples $Q(z|q, a)$.
- Knowledge-Enhanced Reasoning: Maximizing the likelihood that the LLM generates the user-preferred response conditioned on retrieved triples.
- Relation & Triple Extraction: Given feedback $a$ and query $q$, the LLM itself generates the top-$K$ candidate relation types between the query entity $e_q$ and target entity $e_a$ using instruction prompts, constructing a candidate set $\mathcal{H}(q, a, K)$.
- Heuristic Graph Optimization: To avoid wholesale deletions that destroy unrelated knowledge, KGT applies an iterative algorithm:
- Score reasoning likelihoods for candidate triples and existing local triples connected to $e_q$.
- Iteratively insert the candidate triple that yields the highest reasoning gain and prune the existing triple with the lowest reasoning probability until generation loss falls below a threshold $\epsilon$.
[User Query + Feedback] ──> [LLM Extracts Triples Q(z|q,a)]
│
▼
[Heuristic KG Optimization (Add/Remove Triples)]
│
▼
[Updated Personalized KG] ──> [LLM Inference (Frozen θ)]
Datasets
- CounterFact: A standard benchmark evaluating counterfactual knowledge editing (measuring adaptation to facts that contradict pre-training data).
- CounterFactExtension (New): Built from the PARAREL dataset using GPT-4 with human verification. It adds 27,737 counterfactual samples equipped with paraphrase generation prompts.
- PeInt (New Benchmark): A realistic personalization benchmark derived from multi-turn dialogues with five real human users discussing schedules, preferences, hobbies, and pet details with Llama-3-8B.
- Underlying KG: ConceptNet.
Key Insights and Ideas
- Decoupling Memory from Weights: Treating facts as explicit edges in a graph converts a non-convex weight-modification problem into a discrete, transparent set-editing problem.
- Model-Guided Triple Extraction Beats Human Annotation: Letting the LLM extract the relationship labels between entities matched or surpassed human-provided relation annotations in downstream accuracy. The authors hypothesize that LLM-extracted relations implicitly align with the model's internal representations.
- Graceful Long-Term Scaling: As the sequence of edited facts grows from 1 to 10,000, traditional editing baselines collapse due to accumulated weight interference. KGT preserves its efficacy and paraphrase performance without degradation.
Key Results
Experiments spanned GPT-2-xl, Llama2-7B, and Llama3-8B:
- Personalization Accuracy (Llama3-8B on CounterFact): KGT achieved 94.58% Efficacy and 86.89% Paraphrase Score, substantially outperforming Fine-Tuning (54.44% / 50.52%), ROME (51.13% / 52.39%), and K-LaMP (59.41% / 43.35%).
- Realistic Personalization (PeInt): On real human interactions, KGT reached 95.75% Efficacy and 89.83% Paraphrase Score on Llama3-8B, whereas baseline methods failed to exceed 35% efficacy.
- Efficiency Gains: Because it avoids back-propagation, KGT cut GPU memory by 52% to 77% on Llama3-8B compared to gradient-based editing methods (15.9 GB vs. 36.6–69.5 GB). Latency was reduced to 0.15s per update, up to 84% faster than iterative optimization methods.
Limitations and Future Work
- Instruction-Following Dependency: KGT relies on the base LLM’s zero-shot capability to accurately score retrieval/reasoning prompts and infer entity relations.
- Entity Linking Assumptions: The current setup assumes entities in the query and answer are identified, and retrieval is limited to 1-hop subgraphs.
- Single-User Scope: While the paper outlines a multi-user strategy (batching parallel inferences over user-specific subgraphs on a shared frozen LLM), experimental validation was limited to single-user streams.
Summary updated