# GLaM: Fine-Tuning Large Language Models for Domain Knowledge Graph Alignment via Neighborhood Partitioning and Generative Subgraph Encoding

**Authors:** Stefan Dernbach, Khushbu Agarwal, Alejandro Zuniga, Michael Henry, Sutanay Choudhury  
**arXiv:** [2402.06764](https://arxiv.org/abs/2402.06764)  
**Date:** 2024-02-09  
**Summary page:** https://www.summarizepaper.com/en/paper/2402.06764v3/

## Key points

- Integrating large language models (LLMs) with knowledge graphs enhances reasoning capabilities
- Multi-step inferences over real-world knowledge graphs while minimizing hallucination are crucial for evolving models
- Existing LLMs have limited capacity for reasoning over domain-specialized interconnected entities
- Introduction of a fine-tuning framework for developing Graph-aligned Language Models (GLaM) addresses the technical gap
- GLaM transforms knowledge graphs into text representation with labeled question-answer pairs, expanding reasoning capacity
- High-value applications in science, security, and e-commerce can benefit from enhanced reasoning capabilities of GLaM
- Training setup involved splitting natural language questions and answers into training and test sets using datasets from DBLP, ACM, MAG, etc.
- Microsoft Deepspeed framework was utilized for supervised prompt and response fine-tuning using base models like Llama-7b-chat-hf
- Evaluation tasks included fact recall testing and inverse fact recall testing across UMLS and DBLP datasets
- Results showed promising performance of GLaM in both fact recall tasks
- Development of Graph-aligned Language Models bridges the gap between text-based models and structured data representations to enable effective reasoning over domain-specific knowledge graphs

## Summary

, , , , 

Integrating large language models (LLMs) with knowledge graphs derived from domain-specific data is a significant advancement in enhancing reasoning capabilities. The ability to perform multi-step inferences over real-world knowledge graphs while minimizing hallucination is crucial as these models continue to evolve. While LLMs excel at conversation and text generation, their capacity for reasoning over domain-specialized interconnected entities is limited. For instance, querying a LLM to identify the optimal contact in a professional network based on relationships and attributes in a private database is currently beyond existing methods. To address this technical gap, a fine-tuning framework for developing Graph-aligned Language Models (GLaM) has been introduced. This framework transforms knowledge graphs into an alternate text representation with labeled question-answer pairs, expanding the models' capacity for structure-based reasoning. By grounding the models in specific graph-based knowledge, high-value applications in areas such as science, security, and e-commerce can benefit from enhanced reasoning capabilities. For training the GLaM, focus was placed on a dataset extracted from DBLP, ACM, MAG, and other sources containing paper citations, abstracts, authors, publication years, venues, and titles. The training setup involved splitting natural language questions and answers into training and test sets for both UMLS and DBLP datasets. Microsoft Deepspeed framework was utilized for supervised prompt and response fine-tuning using base models like Llama-7b-chat-hf. Evaluation tasks included fact recall testing the model's ability to remember domain-level facts seen during training and inverse fact recall testing its capability to infer reverse relationships from trained facts. The results demonstrated that GLaM showed promising performance in both fact recall tasks across UMLS and DBLP datasets. In conclusion, the development of Graph-aligned Language Models represents a significant step towards enabling large language models to reason effectively over domain-specific knowledge graphs. By bridging the gap between text-based models and structured data representations like knowledge graphs, GLaM holds great potential for advancing various applications requiring complex reasoning abilities.
