Skip to content
AI.info

Research

On the Token Collapse Phenomenon in Textual Graph Soft Prompting

Overview Research area: Graph soft prompting for large language models (graph–language interfaces), with a focus on evaluation methodology and mechanistic auditing of learned graph tokens. Technical l

arXiv
2610.31572
Published
2026-10-22
Authors
Andrea Giuseppe Di Francesco, Rishabh Jain, Franco Maria Nardini, Nicola Tonellotto, Pietro Liò, Fabrizio Silvestri

AI summary

Overview

Research area: Graph soft prompting for large language models (graph–language interfaces), with a focus on evaluation methodology and mechanistic auditing of learned graph tokens.

Technical level: Advanced. The paper assumes familiarity with graph neural networks, soft prompting, LoRA adaptation, and causal intervention methods, and it reports paired statistical tests and likelihood-based measurements.

Scope: A systematic audit of whether the graph tokens produced by G-Retriever (and later graph soft-prompting methods) actually encode and causally contribute graph-specific information, plus a two-stage training pipeline intended to prevent the failure mode the authors identify.

What This Paper Is About

Methods such as G-Retriever inject graph structure into LLM prompts by training a graph neural network to produce a "graph token" that is prepended to a verbalized description of the same graph and to the question. The authors show that in this setup the graph token becomes almost identical across different inputs — a failure they name token collapse — so the token stops carrying graph content and instead behaves like a generic learned soft prompt, while the verbalized graph text does the real work. The paper's goal is to prove this with controlled interventions and to test whether a redesigned training pipeline can produce tokens that genuinely vary with, and are used for, the input graph.

Key Contributions

  1. Identification and generalization of token collapse. The authors show that G-Retriever's projected tokens are nearly input-invariant across three benchmarks, three graph encoders (graph transformer, GAT, GCN), two LLM families (Llama-2-7B, Qwen2.5-3B), and both frozen and LoRA-adapted regimes, and that a controlled WebQSP audit finds the same geometry in later single- and multi-token graph-prompting methods (GRAG, GRETPool, GraSP).

  2. A causal protocol distinguishing token variation, graph content, and downstream use. The protocol combines token-geometry statistics, fixed-weight token substitutions (mean, swap, gswap, node/edge/rel corruption), gold-answer negative log-likelihood, decoding-based retrieval probes, and graph-free controls (CONST, MLPQ, PT) that reuse the same projector.

  3. Evidence that accuracy alone cannot establish graph-token alignment. A learned constant token that never observes a graph matches or exceeds G-Retriever on all three benchmarks, and removing the verbalized graph costs far more than perturbing the graph token.

  4. A two-stage pipeline that mitigates collapse. Stage 1 aligns a question-conditioned graph encoder with an InfoNCE objective and freezes it; Stage 2 trains a GELU projector over the frozen encoder alongside a separate graph-independent prompt token. This reduces token cosine from above 0.99 to 0.099–0.142 (Llama-2) and 0.103–0.200 (Qwen2.5-3B), but the authors show non-collapse does not guarantee graph use or better accuracy.

Main Findings

  • Collapse is pervasive and invisible in scores. Token cosine ranges from 0.985 to 0.998 across every tested configuration, while the input-specific residual is only 4–12% of the shared mean, whose norm is 22–97 times that of an ordinary word embedding. Models with similarly collapsed tokens still obtain substantially different scores (ExplaGraphs 78.88–85.56; SceneGraphs 80.20–81.35; WebQSP 55.47–70.33).

  • Collapse happens after projection, not in the encoder. Encoder-level cosines range from 0.423 to 0.693, so GNN oversmoothing is an insufficient explanation; the near-identity appears only after the projector.

  • The graph-specific component has no resolved answer-level effect. Under the default setup, replacing the token with the training-set mean, with another example's token, or with a token recomputed from a different graph (gswap) stays within the 2-point resolution threshold on all three benchmarks (e.g., WebQSP gswap −0.55, mean −1.84). Corrupting entities, edges, or relations gives the same result.

  • The token's shared value is essential. Replacing the token with zero costs 59.64–81.95 points, showing the model relies on the token's shared component even though its input-specific variation is not measurably used.

  • The verbalized graph is the dominant graph channel. Removing the textual graph costs 19–51 points (e.g., WebQSP falls from 70.33 to 41.34; SceneGraphs from 81.35 to 30.20; ExplaGraphs from 85.56 to 66.43), whereas replacing the remaining token with its mean shifts performance by at most 1.04 points.

  • A graph-free constant matches the full model. CONST, a learned graph-independent vector passed through the same projector, scores 85.56 on ExplaGraphs, 81.40 on SceneGraphs, and 71.25 on WebQSP, matching or exceeding G-Retriever (85.56, 81.35, 70.33).

  • Likelihood detects small residual effects that accuracy misses. On WebQSP, swap and gswap raise gold-answer NLL by 0.0183 and 0.0182, both below the paper's 0.03 criterion.

  • Two factors are associated with collapse, neither isolated as sole cause. With a frozen, aligned Stage-1 encoder (cosine 0.024), a Sigmoid projector still yields token cosine 0.9870 before training and 0.9918 after it, whereas GELU yields 0.0910 and 0.3229. Under end-to-end training, GELU still produces cosine 0.9139, and combining the frozen encoder with GELU prevents collapse but drops ExplaGraphs to 57.76 versus a majority-class rate of 58.8. GRAG and GRETPool inherit the Sigmoid projector and collapse; GraSP collapses despite using tanh.

  • The pipeline restores variation and often preserves performance. With Llama-2, WebQSP is 69.90 versus 70.33 and ExplaGraphs 85.74 versus 85.56 (both below resolution), and the separate prompt pathway lifts ExplaGraphs from the 57.76 single-token result to 85.74. SceneGraphs degrades from 81.35 to 72.50 even though gswap now produces a resolved −5.30-point effect.

  • Qwen2.5-3B shows the trade-off is not inevitable. Under a matched training budget, WebQSP improves from 57.13 to 65.79 (p = 4.5×10⁻²⁰) with a resolved gswap effect of −2.09 (p = .0027); ExplaGraphs improves from 74.37 to 83.94 (p = 1.5×10⁻⁵) but gswap has no effect (+0.36); SceneGraphs shows the strongest graph-replacement effect in the study (−6.50, p < .001) while scoring 3.40 points below G-Retriever.

  • Collapse does not imply complete insensitivity. Qwen G-Retriever on ExplaGraphs keeps collapsed tokens (cosine 0.998) yet gswap causes a resolved −4.51-point effect.

  • Non-collapsed tokens encode heterogeneous content. Retrieval probes show the pipeline's WebQSP token recovers the question at median rank 65 and the answer at 60 against a control of 407, but graph content at 315; its gswap effect becomes resolved (−2.27) only after the verbalized graph is removed, yielding a "masked" diagnosis. On SceneGraphs the token is genuinely "used" (gswap −5.30, NLL +0.1665), on ExplaGraphs graph content is decodable (rank 41 versus control 139) but unused, and the no-entity variant acts as an answer/question "prior" (WebQSP 72.73 without resolved graph use). A no-question variant on ExplaGraphs reaches 87.55.

Methodology in Plain English

The authors first reproduce G-Retriever faithfully — same data, prompt, answer loss, and optimisation — and then ask three separate questions rather than one: do tokens differ across inputs, does the LLM actually use those differences, and what information do the tokens hold?

To answer the first, they measure the average cosine similarity between tokens from different examples, the size of each token's deviation from the dataset mean, and its norm relative to ordinary word embeddings, and they repeat this before projection to locate where similarity arises.

To answer the second, they keep all weights fixed and surgically substitute tokens: swap in the training-set mean, swap in another example's token, or recompute the token from a different graph while keeping the original question (gswap). They also corrupt nodes, edges, or relations, delete the verbalized graph, and retrain variants with entity features or question conditioning removed. Because accuracy only sees changes in the decoded answer, they additionally track gold-answer negative log-likelihood under teacher forcing.

To answer the third, they fit a simple map from stored tokens to frozen embeddings of the question, answer, or verbalized graph on half the test set, and report the median rank of the correct target on the held-out half, using a constant token as the control rank.

Throughout, they use graph-free controls that keep the same projector but remove the graph (CONST), replace the encoder with an MLP over the question (MLPQ), or fall back to raw prompt tuning (PT), and they pair accuracy comparisons with exact McNemar tests. Because re-evaluating identical WebQSP weights in a separate process moves Hit@1 by 1.04 points, they only treat differences above 2 points with p < .05, or |ΔNLL| > 0.03, as resolved. Finally, they design the two-stage pipeline: align and freeze the graph encoder, then train separate graph-token and prompt-token pathways.

Why This Matters

Impact on research. The paper reframes a common architectural assumption — that a trained graph token conveys graph structure — as an empirical claim that must be tested. Its protocol gives the graph–language community a way to separate four properties that prior work conflated: token variation, recoverable graph information, downstream use, and task accuracy. It also complicates the interpretation of G-Retriever's own ablations, which the authors read as evidence of complementary graph representations.

Real-world applications.

  • Retrieval-augmented assistants over enterprise knowledge graphs, where teams need to know whether a learned graph channel contributes anything beyond the textual context already supplied.
  • Scientific and biomedical knowledge-graph question answering, where a token that silently encodes an answer prior rather than the graph could produce confident but unsupported answers.
  • Scene-graph and multimodal grounding pipelines, where the SceneGraphs results show graph-conditioned token use can appear only after the textual channel is removed.
  • Model auditing and procurement, where a buyer needs a cheap diagnostic proving that a claimed graph interface is actually used rather than being a repackaged soft prompt.

Industry relevance. The paper offers a low-cost audit recipe — token geometry, one graph-free control through the same projector, and mean/swap/gswap interventions — that can be run before attributing accuracy gains to a graph component. Its finding that a constant token matches a full graph pipeline is directly relevant to vendors making graph-integration claims, and its Stage-1 alignment plus separated prompt pathway is a practical recipe for teams that want graph-conditioned behavior without sacrificing task scores.

Future Directions

  • Isolating the mechanism. The evidence linking collapse to the Sigmoid projector and end-to-end answer training is associative; the authors state that neither is isolated as the sole cause, and that the cross-method audit is limited to WebQSP, runnable implementations, and controlled variants using G-Retriever's retrieved subgraphs.
  • Training objectives beyond answer cross-entropy. The audited recipe trains from scratch with answer cross-entropy; collapse may behave differently with pretrained encoders or with explicit contrastive, reconstructive, or counterfactual objectives, and Stage 1's question conditioning and targets can themselves introduce priors.
  • Auditing beyond graph–question pairing. Gswap tests whether the token is paired with the right graph, not whether it supports fact-level reasoning, and decodability measures recoverability rather than use; finer-grained tests are needed.
  • Designing interfaces that guarantee use. The open goal is to preserve task-relevant graph information and verify the LLM exploits it, since the pipeline can make answers depend on graph-specific token variation without improving accuracy, and can improve accuracy without graph use.

Target Audience

Researchers and engineers working on graph–language models, retrieval-augmented generation over knowledge graphs, and soft prompting will benefit most, particularly those evaluating or building on G-Retriever and its successors. The paper is also valuable to practitioners who need a practical audit checklist before crediting accuracy gains to a graph component, and to reviewers and benchmark designers interested in evaluation protocols that separate decodability from causal use. Readers should be comfortable with GNN architectures, LLM embedding interfaces, and paired statistical testing.

Authors’ abstract

Recent methods for injecting graph structure into LLM prompts include graph soft prompting, in which a graph neural network (GNN) learns graph-specific tokens that capture relational information among entities in textual prompts. G-Retriever combines graph soft prompts with a verbalized description of the same graph to strengthen the textual prompt signal. We conduct an in-depth analysis of G-Retriever and uncover a pathological behavior we term token collapse. Across three benchmarks, three graph encoders, two LLM families, and both frozen and LoRA-adapted models, G-Retriever's graph tokens become almost indistinguishable across inputs. We provide evidence that the same failure is inherited by subsequent methods, even with multi-token pooling. Under the standard setup, swapping a token with the dataset mean, a token from another example, or one derived from a corrupted graph produces no resolved answer-level effect in accuracy. Moreover, a learned constant prompt that never accesses the graph matches or surpasses G-Retriever on all three benchmarks. These findings indicate that, rather than conveying graph content as intended, the collapsed token functions primarily as a generic soft prompt. We also examine conditions linked to this collapse and propose a two-stage procedure that yields non-collapsed tokens while maintaining competitive performance in most cases. However, token variability alone does not prove that the model uses graph information: via interventions and decoding probes, we show that depending on the configuration, a token can reflect the question, an answer prior, or graph-derived content that the LLM may or may not use. Overall, our results offer a practical approach to evaluating graph-token alignment rather than inferring it from task accuracy alone. Code to reproduce our experiments is available at https://github.com/difra100/Token_Collapse_KGQA.

Read the original paper