Large Language Models (LLMs) excel at processing sequential text, but real-world data is frequently web-like, structured as networks, knowledge bases, or molecular graphs. The naive approach to bridging this gap is verbalization—flattening a graph structure into a natural language string (e.g., writing out "Node A is connected to Node B"). However, as Runjin Chen et al. and Yu Liu et al. observe, text-based serialization strips away the inherent web-like topology of the data, introduces severe information loss, and causes prompt lengths to explode.
To solve this, a powerful research direction has emerged: cross-modal embedding projection. Instead of translating graphs into words, researchers design lightweight alignment layers that project continuous graph representations directly into a language model's internal latent space.
Why It Works: The Transformer's Agnostic Input Space
To understand why this approach succeeds, we must look at how a Transformer views the world. A language model does not natively read text; it reads sequences of continuous vectors within a high-dimensional token embedding space. It is entirely agnostic to the origin of these vectors. If a non-textual modality can be mapped precisely into this same vector space, the language model can process it using its pre-trained attention mechanisms.
[Graph Structure] ---> (Graph Encoder) ---> [Graph Embeddings]
|
(Lightweight Projector)
|
[Text Tokens] ------> (Token Embedder) ---> [Token Embeddings] ---> [Joint Attention Space]
In this paradigm, a specialized graph model—such as a Graph Neural Network (GNN) or a Knowledge Graph Embedding (KGE) framework—first encodes the structural layout or relational density of the graph. A trainable projection layer then translates these structural features into the language model's token space.
This projection layer can take several forms depending on the complexity of the task:
- Linear Matrices or MLPs: Simple, lightweight layers that translate high-dimensional graph features directly into the token space, as utilized by Zheyuan Liu et al. and Jingwen Sun et al..
- Cross-Modal Query Modules: More sophisticated layers, such as the query-based transformers used by Mengmei Zhang et al., which use learnable query tokens to extract specific semantic features from GNN embeddings.
By keeping the core language model frozen or using parameter-efficient tuning, the system preserves the model's general-purpose reasoning capabilities while introducing structural awareness (Mingqi Yang et al.; Cheng Yang et al.).
Processing Graph Topology via Soft Prompts
Once projected, the graph features act as continuous virtual tokens, often referred to as "soft prompts" or "soft tokens." When these are concatenated with standard text embeddings, the language model's self-attention mechanism treats them identically to words.
For example, Ben Liu et al. and Yuntong Hu et al. demonstrate that injecting structural graph embeddings as soft tokens allows a model to simultaneously weigh the semantic context of text and the mathematical relationships of a graph. In a question-answering or retrieval scenario, a text token in the prompt can attend directly to a soft token representing a graph node.
This mechanism underpins frameworks like the one proposed by Yijun Tian et al., where retrieved subgraphs are converted into soft prompts to ground the LLM in factual reality, significantly mitigating hallucinations without the prohibitive cost of joint training.
Directionality of the Alignment
While the dominant paradigm maps graph structures into language spaces, the alignment can operate in multiple directions depending on the task architecture:
- Graph-to-Language Projection: Mapping structural features into the language model's token space to allow the LLM to act as a zero-shot graph learner (Duo Wang et al.) or to fine-tune it for node classification (Xixi Wu et al.).
- Language-to-Graph Projection: Conversely, text can be projected into a graph's latent space. Suhong Moon et al. demonstrate that mapping text embeddings into a graph's latent space allows a system to generalize to novel scenarios where explicit graph edges do not yet exist, combining generative semantics with relational inductive biases.
- Shared Manifold Matching: Mapping both modalities into a unified space. Sayantan Mitra et al. project natural language questions and knowledge graph components into a shared embedding space, enabling direct semantic matching for multi-hop question answering without relying on literal string matching.
Applications Across Domains
By bypassing the text bottleneck, cross-modal projection enables language models to perform complex relational reasoning natively across several distinct domains:
- Knowledge Graph Completion & Fact-Checking: Yingjian Chen utilizes graph-text manifold alignment to overcome long-term text barriers in medical and technical fact-checking, allowing models to cross-reference text against dense structural knowledge.
- Multi-Hop and Temporal Reasoning: Early work by Apoorv Saxena et al. (2020) treated multi-hop questions as single latent relations projected into a KGE space to bypass explicit path traversal. In the temporal domain, Apoorv Saxena et al. (2021) and the authors of GETER fused language models with specialized temporal graph embeddings to predict future events and generate hallucination-free explanations.
- Recommendation Systems: Frameworks developed by Mingdai Yang et al. and Shijie Wang et al. map collaborative filtering signals and user-item knowledge graphs directly into LLM token spaces, delivering precise recommendations grounded in structural connectivity.
Key Foundational Work
Question Answering Over Temporal Knowledge Graphs (2021) — contributed 1 concept elements to this direction.
Improving Multi-hop Question Answering over Knowledge Graphs using Knowledge Base Embeddings (2020) — contributed 1 concept elements to this direction.