Manuscript Offprint

arXiv:2609.03229

Language-encoded network topology enables large language models to reason about complex networks

Ucchwas Talukder Utsha, Sakib Mostafa, James Zou, Md Tauhidul Islam

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Networks describe diverse systems in biology and beyond, from protein interactions and social relationships to power grids and citation records. Reasoning about such systems requires understanding their structure: which elements are central, which connections bridge otherwise separate communities, how the network is organized, and how its structure changes when elements are removed. Although large language models (LLMs) excel at reasoning over natural language, they often struggle with such structural questions when networks are represented as edge lists, sentences or tables of numerical measurements, because the structural meaning of these representations must be inferred. Here we introduce BioGlyph, a method that compiles network topology into an interpretable and transferable language of structural roles. BioGlyph combines graph-partitioning algorithms and structural measurements to identify roles such as hubs, community cores and cross-community connectors, and uses fixed rules to translate their algorithmic signatures into a universal vocabulary. The resulting representation describes each network element through its structural role, supporting evidence and semantic consequences, while leaving both the original network and the LLM unchanged. Across twenty networks spanning five different domains including biological, social and information systems, BioGlyph substantially improves the ability of open LLMs to answer structural reasoning questions, outperforming edge-based, numerical and learned representations by up to 26 percentage points in system accuracy. Ablation experiments show that the improvement comes from explicitly encoding structural roles in semantically interpretable terms by BioGlyph. The performance improvement becomes even more prominent in dense, community-structured networks and diminishes in sparse networks whose topology can be more readily inferred from direct textual representations. Applied to a budding-yeast protein-interaction network, BioGlyph also exposes biologically meaningful organization: cross-community connectors are enriched for essential genes, whereas peripheral proteins are depleted. BioGlyph thus provides a common, interpretable representation through which both language models and scientists can reason about complex network structure.

Introduction

Networks provide a natural way to describe how parts of a system are connected. Protein interactions inside a cell, gene-regulatory circuits, and connections in the brain can all be represented as graphs. The same representation is used for power grids, transport systems, citation records, the World Wide Web, and social networks. In a graph, nodes represent the parts of a system and edges represent the relationships between them. Decades of network science have shown that the behavior of a system depends not only on the individual nodes, but also on the pattern of connections among them¹,². Several structural patterns appear across very different networks. Hubs have unusually many connections. Cut nodes, or articulation points, separate a connected network when removed. Bridges provide the only link between otherwise disconnected regions. Many networks also form dense communities connected by a small number of nodes that link one community to another³,⁴. Such structural features can have direct scientific meaning. Network position has been linked to gene essentiality⁵,⁶, infrastructure vulnerability⁷, and the flow of information through social systems. Understanding a network therefore requires more than knowing which nodes are connected. The important question is often what those connections imply for the system, especially when a node or edge is removed.

Large language models are strong general-purpose systems for reasoning over text. Models trained on large text collections can learn new tasks from examples in a prompt⁸ and can solve multi-step problems through explicit reasoning⁹. Network reasoning presents a different challenge. When a graph is written as an edge list or as sentences describing which nodes are connected, a language model must recover the relevant structure from the text before answering the question. The model must determine, for example, whether a node connects two regions, whether removing an edge separates the graph, or which candidate is most important for connectivity. Language models often make errors on such problems even when standard graph

Figure

Figure 1. BioGlyph translates network structure into interpretable roles. a, An illustrative network of 31 nodes organized into five communities. BioGlyph identifies complementary structural roles, including hubs, cut nodes, bridges, community cores, cross-community connectors and bottleneck links. For example, node A is a highly connected hub, whereas removal of node B separates the network into three components. The dashed outline indicates a fragile community connected to the rest of the network through a single link. b, BioGlyph applies classical network-analysis algorithms and fixed rules to identify eleven structural roles. The rules use either exact perturbation tests or thresholds derived from the network structure. The procedure is deterministic for a given random seed and uses network topology alone, without node labels or biological annotations. c, BioGlyph converts the resulting structural information into a human- and language-model-readable description. Each entry specifies the structural role, the evidence supporting it and, where relevant, the consequence of removing the node or link. The resulting description provides an interpretable summary of network organization that can be used by a frozen language model to answer questions about connectivity, importance and perturbation. Answers can then be checked against exact graph algorithms.

algorithms can compute the answers exactly 10,11^{10,11}.

Perturbation-based questions make this limitation particularly clear. Can two nodes still reach each other after a a third node is removed? Does deleting a single edge split the network? Which node causes the greatest disruption when removed? Related questions arise when a router fails in a communication system or a connection is disrupted in the brain. They are especially important in biomedicine, where many questions can be framed as network perturbations. What happens when a gene is upregulated or downregulated? Which protein is most important for maintaining a pathway? Which component connects two biological processes? Which proteins are most vulnerable to disruption? Answering these questions requires understanding how each component is positioned within the wider biological system. A list of interactions alone does not explain why a protein is important or predict what will happen when it is perturbed. In each setting, the effect of a perturbation depends on the structure of the network.

Current approaches generally provide network information to LLMs either as connections or as learned numerical representations. Connections can be written as edge lists, structured data or natural-language descriptions 10−12^{10-12}. These formats preserve the underlying network, but the model still has to infer important structural properties from the connections. Other approaches learn numerical representations of nodes or network regions and provide these representations to language models 13−15^{13-15}. Although such representations can capture complex patterns, they are difficult for researchers to interpret. A numerical representation does not readily explain why a protein is important, which other proteins it connects, or what might happen when it is removed. These limitations raise a simple question: can network structure be expressed directly in terms that both language models and researchers can understand?

2/52

Here we introduce BioGlyph, a method that translates network structure into a simple language of structural roles (Fig. 1). BioGlyph first uses established network-analysis algorithms to identify properties such as hubs, community cores, cut nodes, bridges and proteins that connect different communities. It then uses fixed rules to describe these properties in words. Each protein or interaction can therefore be described not only by its structural role, but also by the measurements supporting that role and by what its position means for the surrounding network. For example, rather than providing only the number of interactions of a protein, BioGlyph can describe it as a hub or as a connector between two communities and explain how the network would change if that protein were removed. The method uses only the network itself and does not require biological labels or task-specific training. The LLM is also kept unchanged. BioGlyph therefore changes how network information is presented rather than changing the underlying model. By expressing network properties in words, BioGlyph makes the results of network analysis easier to interpret and incorporate into a broader reasoning process.

We evaluated BioGlyph across eight networks representing biological, social and information systems. We asked LLMs questions about network connectivity, importance and the consequences of removing nodes or interactions, while keeping the underlying network and model fixed and changing only how the network was represented. We compared BioGlyph with edge lists, natural-language descriptions, numerical network measurements and learned network representations. BioGlyph consistently improved performance on questions that required understanding network structure, and approached the performance of a graph neural network trained specifically on the task. The improvement was particularly pronounced in dense networks with many interconnected communities, where directly reading the individual connections is difficult. In sparse networks, where the connections are already relatively easy to read, the advantage was smaller. These results indicate that explicitly describing meaningful structural properties can make complex network information easier for LLMs to use.

We next asked whether the same structural descriptions could reveal biologically meaningful patterns independently of their use for language-model reasoning. In the budding-yeast protein-interaction network, BioGlyph identified structural roles using network connectivity alone, without using gene-essentiality annotations. Proteins that connected different communities were substantially more likely to be essential, whereas peripheral proteins were less likely to be essential. Cross-community connectors were also more strongly enriched for essential genes than proteins selected solely by degree at the same set size. These findings suggest that the structural vocabulary captures biologically meaningful organization rather than simply providing a convenient format for prompting an LLM.

Together, these results show that network structure can be translated into a common language that is accessible to both computational models and researchers. BioGlyph preserves information obtained from established network-analysis methods while making important structural relationships easier to interpret, communicate and use in biomedical reasoning. This provides a general framework for using LLMs with biological networks and, more broadly, for connecting quantitative network analysis with human-readable scientific interpretation.

References (51)