Manuscript Offprint

arXiv:2609.10923

Structurally Speaking: Motif-Oriented Graph Captioning through Bidirectional Graph-Text Translation

Hsiao-Ying Lu, Dongyu Liu, Kwan-Liu Ma

Abstract

Graph captions should help readers understand graph structure, rather than simply translate adjacency matrices into long textual edge lists. A useful graph caption abstracts connectivity into recognizable motifs, such as hubs, paths, cycles, cliques, and bridges, because these motifs provide compact structural units that are easier to read, compare, and recover. In this paper, we study motif-oriented graph captioning as a bidirectional graph-text translation task, where captions must both preserve enough topology for graph recovery and express the graph through concise motif-level descriptions. We show that direct prompting of GPT-5.1 often produces graph-recoverable captions by enumerating node-to-node connections, but these captions are verbose and can contain inconsistent motif interpretations. To address this gap, we introduce Structurally Speaking, a lightweight structured prompting protocol that guides translation between explicit connectivity and motif-level abstraction. Experiments on a synthetic motif-based dataset show that structured prompting produces shorter and more motif-consistent captions while maintaining comparable graph recovery. These results suggest that explicit topology-to-motif reasoning guidance can make LLM-generated graph captions more interpretable without model fine-tuning.

1 Introduction

Graphs encode relationships among entities, but raw representations such as adjacency matrices are difficult to read and compare directly. Graph captions can make graph structure more accessible by translating connectivity into natural language. However, a useful caption should do more than list edges: it should abstract topology into recognizable motifs, such as hubs, paths, cycles, cliques, bridges, and tails. These motifs provide compact structural units that help readers understand how local connections compose into larger graph patterns.

This distinction matters because graph recoverability alone is not sufficient for evaluating graph-caption quality. A caption may encode all edges through enumeration while offering little interpretable structural abstraction. Such captions can be verbose, difficult to read, or inconsistent in their motif-level structural inference. We therefore argue that interpretable graph captioning should be evaluated along two dimensions: structural recoverability and motif-level compactness.

Motivated by this gap, we formulate bidirectional graph-caption translation as a controlled diagnostic task. Given a graph adjacency matrix, the model generates a caption; given a caption, the model recovers the graph. This formulation allows us to probe whether LLMs can move between raw graph topology and motif-oriented natural language. Under direct prompting, GPT-5.1 often produces graph-recoverable captions, but these captions rely heavily on explicit node-to-node connection descriptions and sometimes contain inaccurate or self-contradictory motif interpretations. This suggests that direct prompting often falls back on edge enumeration rather than producing compact motif-level structural inference, even when graph recovery is successful.

To address this issue, we introduce Structurally Speaking, a lightweight structured prompting protocol for topology-to-motif abstraction. For graph-to-caption translation, the protocol guides the model to convert adjacency information into local neighborhoods, analyze motifs, and generate a compact caption. For caption-to-graph translation, it guides the model to parse motif descriptions, assign nodes, construct edges, and recover the adjacency matrix. This is not merely caption style transfer, because the model must infer motif structure from raw topology while preserving enough information for graph recovery.

We evaluate this formulation using a synthetic motif-based dataset and two cycle-consistency evaluations. Graph-Caption-Graph measures whether generated captions preserve enough structural information for graph recovery, while Caption-Graph-Caption measures whether motif-oriented descriptions remain accurate and compact after translation through graph structure. Experiments show that Structurally Speaking reduces verbosity and inconsistent motif inferences while maintaining comparable graph recovery. In summary, we contribute: (1) a bidirectional graph-captioning formulation that separates structural recoverability from motif-level abstraction; (2) a cycle-consistency evaluation that reveals recoverable captions can still be verbose and motif-inconsistent; and (3) a lightweight structured prompting protocol that improves caption compactness and motif consistency without fine-tuning.

References (21)