Paper deep dive
Visual Graph Reasoning via Knowledge Compilation
Rongzheng Wang, Zhe Wang, Ke Qin, Rongwei Wang, Muquan Li, Yizhuo Ma, Yihong Huang, Jielei Wang, Shuang Liang
Intelligence
Status: succeeded | Model: Gemma-4-26B-A4B | Prompt: intel-v1 | Confidence: 92%
Last extracted: 9/22/2026, 4:35:34 AM
Summary
The paper introduces VGCompiler, a framework for visual graph reasoning that addresses the limitations of current Vision-Language Models (VLMs) by treating the task as a knowledge compilation problem. VGCompiler utilizes two specialized compilers: a representation compiler to extract structure-preserving graph data from images and an operation compiler to determine executable graph operations based on the recovered state. The system is built on Qwen3-VL-8B, trained with reinforcement learning using layered rewards, and employs a frozen observer to generate condition signatures for code reuse. It demonstrates significant performance improvements on benchmarks like GVLQA, VisionGraph, and VGCURE, and generalizes well to real-world domains such as metro routing and logistics.
Entities (10)
Relation Signals (9)
VGCompiler → uses → Qwen3-VL-8B
confidence 95% · Specifically, we build VGCompiler on Qwen3-VL-8B
Visual Graph Reasoning → formulatedas → Knowledge Compilation
confidence 93% · This makes it a knowledge compilation problem... where the visual input acts as a weak source language
VGCompiler → comprises → Representation Compiler
confidence 92% · VGCompiler organizes reasoning around two compilers: a representation compiler... and an operation compiler
VGCompiler → comprises → Operation Compiler
confidence 92% · VGCompiler organizes reasoning around two compilers: a representation compiler... and an operation compiler
VGCompiler → evaluatedon → GVLQA
confidence 90% · Experiments on three benchmarks GVLQA, VisionGraph, and VGCURE
VGCompiler → evaluatedon → VisionGraph
confidence 90% · Experiments on three benchmarks GVLQA, VisionGraph, and VGCURE
VGCompiler → evaluatedon → VGCURE
confidence 90% · Experiments on three benchmarks GVLQA, VisionGraph, and VGCURE
VGCompiler → trainswith → Reinforcement Learning
confidence 90% · train it with reinforcement learning guided by a layered reward
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Visual graph reasoning requires answering graph-theoretic questions directly from graph images, where graph topology and state are conveyed visually rather than given in symbolic form. Despite recent progress of vision-language models (VLMs), current approaches to visual graph reasoning still fail on simple visual graph problems. This reveals a fundamental limitation of existing approaches: they prioritize final-answer supervision over the intermediate recovery of an explicit graph representation that preserves graph topology and state from visual input. To address this limitation, we propose VGCompiler, a compilation-centric paradigm for visual graph reasoning via knowledge compilation. VGCompiler organizes reasoning around two compilers: a representation compiler that recovers a structure-preserving intermediate graph representation from visual input, and an operation compiler that compiles query intent under the recovered graph state into an executable graph operation. Specifically, we build VGCompiler on Qwen3-VL-8B and train it with reinforcement learning guided by a layered reward over executability, compiled graph validity, representation quality, and operation quality. VGCompiler uses a frozen observer to summarize graph and question conditions into lightweight signatures, enabling archive retrieval and code reuse across similar regimes. Experiments on three benchmarks GVLQA, VisionGraph, and VGCURE, show that Qwen-VGCompiler, built on an 8B backbone, surpasses the strongest closed-source VLM baseline by 28.9% and the strongest code-based baseline by 23.7%, while maintaining high efficiency. We further evaluate VGCompiler on three real-world domains, including metro routing, logistics delivery, and network fault assessment, where it generalizes across heterogeneous visual graphs and domain-grounded tasks.
Tags
Links
- Source: https://arxiv.org/abs/2609.22327v1
- Canonical: https://arxiv.org/abs/2609.22327v1
Trouble viewing inline? Open PDF directly →
Full Text
58,907 characters extracted from source content.
Expand or collapse full text
Visual Graph Reasoning via Knowledge Compilation CCS: Computing methodologies Computer vision tasksCCS: Computing methodologies Knowledge representation and reasoningCCS: Computing methodologies Reinforcement learning Rongzheng Wang email: wangrongzheng@std.uestc.edu.cn Affiliation: University of Electronic Science and Technology of China, Chengdu, China , Zhe Wang email: wzhe@std.uestc.edu.cn Affiliation: University of Electronic Science and Technology of China, Chengdu, China , Ke Qin email: qinke@uestc.edu.cn Affiliation: University of Electronic Science and Technology of China, Chengdu, China , Rongwei Wang email: wrw24@mails.tsinghua.edu.cn Affiliation: Tsinghua Shenzhen International Graduate School, Shenzhen, China , Muquan Li email: muquanli831@foxmail.com Affiliation: University of Electronic Science and Technology of China, Chengdu, China , Yizhuo Ma email: myz@std.uestc.edu.cn Affiliation: University of Electronic Science and Technology of China, Chengdu, China , Yihong Huang email: 2021080910004@std.uestc.edu.cn Affiliation: University of Electronic Science and Technology of China, Chengdu, China , Jielei Wang email: jieleiwang_uestc@163.com Affiliation: University of Electronic Science and Technology of China, Chengdu, China and Shuang Liang Note: Corresponding author. Alternate Affiliation: Ubiquitous Intelligence and Trusted Services Key Laboratory of Sichuan Province, Chengdu, China email: shuangliang@uestc.edu.cn Affiliation: University of Electronic Science and Technology of China, Chengdu, China © none Abstract. Visual graph reasoning requires answering graph-theoretic questions directly from graph images, where graph topology and state are conveyed visually rather than given in symbolic form. Despite recent progress of vision-language models (VLMs), current approaches to visual graph reasoning still fail on simple visual graph problems. This reveals a fundamental limitation of existing approaches: they prioritize final-answer supervision over the intermediate recovery of an explicit graph representation that preserves graph topology and state from visual input. To address this limitation, we propose VGCompiler, a compilation-centric paradigm for visual graph reasoning via knowledge compilation. VGCompiler organizes reasoning around two compilers: a representation compiler that recovers a structure-preserving intermediate graph representation from visual input, and an operation compiler that compiles query intent under the recovered graph state into an executable graph operation. Specifically, we build VGCompiler on Qwen3-VL-8B and train it with reinforcement learning guided by a layered reward over executability, compiled graph validity, representation quality, and operation quality. VGCompiler uses a frozen observer to summarize graph and question conditions into lightweight signatures, enabling archive retrieval and code reuse across similar regimes. Experiments on three benchmarks GVLQA, VisionGraph, and VGCURE, show that Qwen-VGCompiler, built on an 8B backbone, surpasses the strongest closed-source VLM baseline by 28.9% and the strongest code-based baseline by 23.7%, while maintaining high efficiency. We further evaluate VGCompiler on three real-world domains, including metro routing, logistics delivery, and network fault assessment, where it generalizes across heterogeneous visual graphs and domain-grounded tasks. Keywords: Visual Graph Reasoning, Visual Language Model, Knowledge Compilation, Reinforcement Learning 1. Introduction Vision-language models (VLMs) (Radford et al., 2021; Alayrac et al., 2022; Li et al., 2023; Dai et al., 2023; Liu et al., 2024) have shown strong capability on broad multimodal reasoning benchmarks (Yue et al., 2024; Lu et al., 2024), yet current VLM-based methods still struggle with even simple visual graph reasoning tasks (Wei et al., 2024; Li et al., 2024; Zhu et al., 2025). Visual graph reasoning asks a model to answer graph queries such as reachability, cycle existence, and shortest path directly from graph images, where graph topology and state are conveyed visually rather than given in symbolic form (Wei et al., 2024; Li et al., 2024). Reliable solving therefore depends on recovering an explicit graph representation from visual input. However, existing approaches often prioritize the final answer over this intermediate recovery, so they may still produce plausible but incorrect answers from partial or incorrect graph representations. Figure 1 illustrates this failure: even for a simple reachability query, strong VLMs remain unreliable across visually diverse graph renderings. This failure reveals two explicit limitations. (1) Graph style affects representation recovery. Unlike text graph reasoning, where relational structure is directly available in symbolic or textual form, visual graph reasoning must recover a faithful graph representation from visually varied renderings. Benchmarks such as Visual Graph Arena (Babaiee et al., 2025) show that severe errors can persist even when graph semantics remain unchanged and only layout or style is altered, indicating that visually irrelevant factors can destabilize this recovery. (2) Graph state affects downstream operation. Even with a recovered graph representation, solving a graph query still requires an operation consistent with the graph state. For example, shortest-path reasoning (Bellman, 1958; Dijkstra, 1959; Floyd, 1962) over unweighted graphs, nonnegative-weighted graphs, and graphs with negative edges relies on different executable procedures (Warshall, 1962; Tarjan, 1972). Text-based methods such as GraphTool-Instruction (Wang et al., 2025b) and GraphCogent (Wang et al., 2025a) assume explicit graph states and therefore select downstream operations more directly, whereas visual graph reasoning must infer graph state first. Consequently, early state-recognition errors directly propagate into downstream execution. Figure 1. Representative visual graph examples together with a simple reachability evaluation across mainstream VLMs. These two limitations originate from the same mismatch: visual graphs present graph semantics in a visual form whose appearance varies with style, layout, and rendering, whereas graph queries require an explicit graph representation together with a valid downstream operation. Visual graph reasoning therefore requires recovering a faithful graph representation from the input and identifying an operation consistent with the recovered graph state. This makes it a knowledge compilation problem (Darwiche and Marquis, 2002), where the visual input acts as a weak source language and is mapped into a target representation that preserves graph semantics and supports downstream operations. This view reframes visual graph reasoning into two compilers: a representation compiler that compiles the visual graph into a structure-preserving graph representation, and an operation compiler that determines the executable graph operation required by the query under the recovered graph state. Inspired by the knowledge compilation view, we propose VGCompiler, a compilation-centric paradigm for visual graph reasoning via knowledge compilation. In VGCompiler, executable code serves as the basic unit of learning and reuse, and organizes reasoning around two compilers: the representation compiler maps a visual graph into a structure-preserving intermediate representation; the operation compiler determines the executable graph operation required under the recovered graph state. To learn code that adapts to different graph-question conditions, VGCompiler uses a VLM as the code generator and trains it with reinforcement learning to generate candidate code conditioned on the current graph-question pair. The optimization is driven by a layered reward over executability, compiled graph validity, representation quality, and operation quality. To archive similar graph-question pairs and enable code reuse, VGCompiler employs a frozen observer to extract lightweight cues from each pair. These cues serve as compact condition signatures for organizing archived code during training and retrieving the most compatible archived code during inference. Figure 2. Three representative real-world visual graph reasoning scenarios: metro routing, logistics delivery, and network fault assessment. We further fine-tune Qwen3-VL-8B (Team, 2025) with reinforcement learning to obtain Qwen-VGCompiler. Across three public benchmarks, GVLQA (Wei et al., 2024), VisionGraph (Li et al., 2024), and VGCURE (Zhu et al., 2025), Qwen-VGCompiler demonstrates strong effectiveness and generalization, outperforming prior state-of-the-art methods by 28.9%. We further evaluate VGCompiler on three real-world scenarios, as illustrated in Figure 2: metro routing, logistics delivery, and network fault assessment. Across these heterogeneous settings, VGCompiler also demonstrates real-world generalization. Our contributions are summarized as follows: (1) We formulate visual graph reasoning under a knowledge compilation view, where solving a visual graph query requires both recovering a structure-preserving graph representation from visual input and identifying a valid downstream operation under the recovered graph state; (2) We propose VGCompiler, a compilation-centric paradigm that instantiates this view through VLM-generated executable code. VGCompiler comprises a representation compiler and an operation compiler, together with a reusable code archive indexed by lightweight graph-question signatures for retrieval and reuse; (3) We introduce a layered reward over executability, compiled graph validity, representation quality, and operation quality to guide reinforcement learning, and we validate strong effectiveness on public benchmarks together with real-world generalization across heterogeneous visual graph scenarios. 2. Related Work 2.1. LLMs for Graph Reasoning LLM-based graph reasoning was first studied mainly in text-based settings, where the graph is already given in symbolic form and the main challenge lies in selecting and executing the correct graph operation. Representative methods strengthen this process through explicit programs (Wang et al., 2026), tool use (Ma et al., 2026), and multi-step collaboration, including Chain-of-Thought prompting (Wei et al., 2022), Self-Consistency (Wang et al., 2023), PAL (Gao et al., 2023), ReAct (Yao et al., 2023), and Toolformer (Schick et al., 2023). Attention-based mechanisms offer another direction for graph reasoning by improving long-context information selection and adaptively controlling reasoning generation (Li et al., 2025a; Li et al., 2026a). Graph-specific systems such as GraphWiz (Chen et al., 2024), GraphTool-Instruction (Wang et al., 2025b), GraphCogent (Wang et al., 2025a), and NeuroPath (Li et al., 2025b) further adapt these ideas to graph reasoning. However, these methods assume that graph topology and state are already externalized. More recently, graph reasoning has been extended to visual graph inputs, where the graph must first be recovered from images. GITA (Wei et al., 2024), VisionGraph (Li et al., 2024), VGCURE (Zhu et al., 2025), and GraphVis (Deng et al., 2024) move in this direction through graph-aware modeling, staged reasoning, or task-specific visual adaptation. However, current visual methods still weakly model the interface between graph recovery and downstream graph operation, especially under style variation and heterogeneous graph-state conditions (Babaiee et al., 2025). 2.2. Visual Graph Reasoning Benchmarks Beyond broad multimodal benchmarks such as MMMU (Yue et al., 2024) and MathVista (Lu et al., 2024), recent work has begun to study visual graph reasoning as a distinct problem. Visual graph reasoning studies how to answer graph-theoretic questions when the graph is presented in visual form rather than as a symbolic input, where graph-structured information is widely conveyed through diagrams, maps, interfaces, and other visual media. GITA (Wei et al., 2024) introduces GVLQA for vision-language graph reasoning, VisionGraph (Li et al., 2024) expands the setting to a broader range of graph-theoretic tasks in visual contexts, and VGCURE (Zhu et al., 2025) further distinguishes graph understanding from graph reasoning. More recently, Visual Graph Arena (Babaiee et al., 2025) shifts the focus to robustness under layout and style variation, showing that visually irrelevant rendering changes can still alter model behavior even when graph semantics are preserved. These benchmarks indicate that topology recovery, graph-state grounding, and robustness to visual variation remain core challenges in visual graph reasoning. 2.3. Knowledge Compilation Knowledge compilation studies how to map a source representation into a target language that preserves semantics while better supporting downstream queries and operations (Darwiche, 2001; Darwiche, 2002; Darwiche and Marquis, 2002). Classical work focuses on symbolic forms such as BDDs (Bryant, 1986) and DNNF (Darwiche, 1999). This perspective is directly relevant to visual graph reasoning, where graph topology and state are visually encoded rather than explicitly given in symbolic form. We follow this view by compiling a visual graph into an attributed adjacency list that preserves graph semantics and supports downstream graph operations. From a complementary compression perspective, recent dataset-distillation methods retain task-relevant information through adaptive quantization, topology-aware dynamic retrieval, and efficient inner-loop optimization (Li et al., 2025d; Li et al., 2026b; Li et al., 2025c), providing potential principles for scaling visual graph compilation while preserving the exact graph semantics required for downstream execution. Figure 3. Graph style and graph state sensitivity: (a) varies visual style while fixing the graph; (b) varies graph-state conditions and downstream operations while fixing style and layout. The results show that robust visual graph reasoning depends on both graph compilation and graph operation. 3. Knowledge Compilation in Visual Graph Reasoning 3.1. Visual Graphs as a Weak Source Language The central challenge of visual graph reasoning lies in a mismatch between how graph semantics are presented and how graph queries should be solved. Visual graphs present graph semantics in a style-variable visual form, whereas graph queries require a faithful graph representation together with a valid downstream operation. Visual graph reasoning therefore requires recovering a reliable graph representation from the rendered input and identifying the valid downstream operation under the recovered graph state. Knowledge compilation frames this mismatch as a gap between the visual source language in which the graph is presented and the target representation required for reliable downstream reasoning. Let g(x)g(x) denote the graph semantics of image x, consisting of topology t(x)t(x) and graph state s(x)s(x). A target representation z should faithfully encode these semantics and support the valid operations required by question q under graph state s(x)s(x). Let Sem(z)Sem(z) denote the graph semantics represented by z, and let (q,s(x))O(q,s(x)) and (z)Q(z) denote the required and supported operation sets. We then require: (1) Sem(z)=g(x),(q,s(x))⊆(z),Sem(z)=g(x), (q,s(x)) (z), where (q,s(x))O(q,s(x)) is the set of valid operations induced by question q under graph state s(x)s(x), and (z)Q(z) is the operation set supported by z. Visual graphs therefore form a weak source language for reasoning, since the underlying graph is not directly exposed in a form suitable for reliable downstream operation. Figure 3(a) studies graph style sensitivity by fixing the underlying graph topology and varying node style, edge style, and layout over 100 reachability queries from GVLQA. We compare three quantities: direct visual QA by Qwen3-VL-8B, QA with the complete adjacency list provided, and the F1 of the recovered adjacency list. Direct visual QA is sensitive to these perturbations, whereas QA with the explicit adjacency list remains more stable. The recovered adjacency F1 also drops under the same perturbations, indicating that style variation mainly degrades representation recovery and that the resulting errors then propagate to downstream reasoning. These observations motivate a code-based formulation. In VGCompiler, the target representation is instantiated as an attributed adjacency list, which preserves graph semantics while exposing local structure and state attributes in executable form. We therefore use the attributed adjacency list as the target representation: (2) z=(vi,(vi))i=1n,(vi)=(vj,aij),z= \ (v_i,N(v_i) ) \_i=1^n, (v_i)= \(v_j,a_ij) \, with n the number of nodes, (vi)N(v_i) the attributed neighbor set of viv_i, and aija_ij encoding edge attributes such as direction and weight. This representation preserves graph semantics and provides a unified interface for downstream reasoning. Under this interface, visual graph reasoning can be organized around two compilers: (3) z=Comp(x,crep),y^=Exec(z,q,cop),z=Comp(x;c^rep), y=Exec(z,q;c^op), where crepc^rep serves as the representation compiler, which maps visual evidence into an attributed adjacency list encoding graph semantics, and copc^op serves as the operation compiler, which determines the executable graph operation required under the recovered graph state; this operation is then carried out on the compiled representation to produce the predicted answer y y. 3.2. Representation and Operation Conditions Figure 3(b) studies graph state sensitivity by fixing the rendering style and layout and comparing four graph-question settings with different graph state conditions (e.g., direction and edge weights) and downstream operations. We compare direct visual QA by Qwen3-VL-8B, code-based QA from the same visual input, and the F1 of adjacency-list recovery via code generation. Even under the same style and layout, the variation in adjacency-list F1 shows that graph state conditions still affect representation recovery. Although code-based QA outperforms direct visual QA, its accuracy still varies substantially across settings, indicating that graph state affects not only representation recovery but also downstream operation. This observation reveals the second source of difficulty. Unlike style variation, which mainly affects representation recovery, graph-state conditions also affect how the recovered graph should be operated on. In settings such as involving direction or weights, small recovery errors are more likely to alter both the recovered representation and the validity of the downstream operation. Reliable solving therefore depends on faithful representation recovery and state-consistent execution. 4. Method 4.1. Overview of VGCompiler Motivated by the above observations, we propose VGCompiler. Unlike previous paradigms that directly map graph images to answers, VGCompiler treats executable code as the basic unit of learning and reuse for visual graph reasoning. Each generated code instance consists of two coupled code blocks, c=(crep,cop)c=(c^rep,c^op), where crepc^rep is the representation compiler that maps a visual graph into a standardized attributed adjacency list, and copc^op is the operation compiler that determines the executable graph operation required under the recovered graph state. As shown in Figure 4, VGCompiler combines three core components: a frozen observer, a trainable code policy, and a code archive. The observer summarizes representation and operation cues from each graph-question pair into a lightweight condition signature; the code policy is trained with reinforcement learning guided by a layered reward over executability, compiled graph validity, representation quality, and operation quality; and the code archive accumulates reusable priors during training and provides retrievable priors for condition-aware code reuse at inference. Figure 4. Overview of VGCompiler. A frozen observer summarizes each graph-question pair into a lightweight condition signature. Guided by a layered reward, the code policy learns a paired code instance for representation recovery and downstream operation. At inference, the signature retrieves the nearest archived code prior and either reuses it directly or revises it into new code according to representation coverage and operation compatibility. 4.2. Conditioned Code Generation A single code solution is not equally effective for all graph-question pairs. The representation compiler depends on visual graph style, whereas the operation compiler depends on both query intent and visible state cues such as direction or edge weights. We therefore condition code generation on the current graph-question pair. Given (x,q)(x,q), we freeze the VLM parameters and use it as an observer: (4) (u,τ)=Obsψ(x,q),h=Sig(u,τ),(u,τ)=Obs_ψ(x,q), h=Sig(u,τ), where ψ denotes the frozen parameters of the observer VLM, u denotes representation cues, i.e., lightweight textual descriptions of graph attributes relevant to representation recovery, including nodes, edges, edge weights, and their visual realization such as shape, heterogeneity, and color distinction. The variable τ denotes operation cues, namely lightweight descriptions of the operation requirements implied by the query together with visible state cues relevant to downstream execution. The signature h serves as a compact condition descriptor. During inference, using Hamming distance over condition signatures, we retrieve the nearest archived code prior from the code archive ⋆C : (5) s⋆=argmin(hs,c^s,R¯s)∈⋆dH(h,hs),cprior=c^s⋆,s = _(h_s, c_s, R_s) d_H(h,h_s), c_prior= c_s , where s⋆s is the retrieved archive index, and hs⋆h_s is the signature associated with the retrieved prior cpriorc_prior. The retrieved prior may either match or mismatch the current graph-question pair. A valid match requires both operation compatibility and representation coverage. Let (us⋆,τs⋆)(u_s , _s ) denote the decoded condition associated with hs⋆h_s . We define the matching indicator as: (6) m=[τ=τs⋆∧Covrep(u,us⋆)=1],m=I\! [τ= _s \; \;Cov_rep(u,u_s )=1 ], where Covrep(u,us⋆)Cov_rep(u,u_s ) checks whether the representation capability encoded by the retrieved prior covers the topology and state requirements implied by the current representation cues u. Matched. When m=1m=1, the retrieved prior is regarded as compatible with the current graph-question condition. In this case, we directly reuse cpriorc_prior as the final code instance for execution. Mismatched. When m=0m=0, the retrieved prior does not cover the current condition. This occurs when the operation cue is inconsistent (e.g., the current query requires shortest-path execution while the retrieved prior corresponds to max-flow computation), or when the representation capability is insufficient (e.g., the current graph is weighted while the retrieved prior only supports unweighted graph representation). In this case, we use the retrieved prior only as contextual guidance and let the VLM write a new code instance conditioned on the current input, the current signature, and the mismatched prior: (7) c=VLMθ(x,q,h,cprior).c=VLM_θ(x,q,h,c_prior). This inference process is designed to serve as a reusable prior when conditions are compatible, while still enabling the model to generate new code when prior reuse is not sufficient. 4.3. Layered Objective for Representation and Operation (LORO) We model visual graph reasoning as generating a paired compiler code instance for representation recovery and downstream operation, and train the code policy with reinforcement learning guided by a layered reward, denoted as LORO. Instead of rewarding final answers only, LORO applies reward in layers aligned with the task structure: the code must first be executable, then produce a valid compiled graph object, and only then receive semantic credit for representation and operation quality. This design reduces ambiguous credit assignment between representation quality and operation quality, and suppresses shortcut solutions built on incomplete compiled representations. Conditioned on the current graph-question pair and the observer signature, we denote by πθ(⋅∣x,q,h) _θ(· x,q,h) the code-generation policy induced by the VLM parameterized by θ, from which we sample G candidate code instances: (8) c(1),…,c(G)∼πθ(⋅∣x,q,h).c^(1),…,c^(G) _θ\! (· x,q,h ). For a candidate paired code instance c(g)c^(g), the system first executes crep,(g)c^rep,(g) to produce a compiled representation z(g)z^(g), and then executes cop,(g)c^op,(g) to produce a final answer y^(g) y^(g). We use E(g)∈0,1E^(g)∈\0,1\ to indicate whether the code is executable, and V(g)∈0,1V^(g)∈\0,1\ to indicate whether the compiled representation can be instantiated as a valid graph object under the target schema, regardless of whether the recovered graph is semantically correct. For valid code, we further define: (9) C(g)=1|ℳ(x,q)|∑m∈ℳ(x,q)F1m(g),O(g)=q(y^(g),y⋆),C^(g)= 1|M(x,q)| _m (x,q)F1_m^(g), O^(g)=J_q( y^(g),y ), where ℳ(x,q)M(x,q) denotes the set of topology and state attributes that must be recovered for the current graph-question pair, such as node set, edge set, direction, and edge weight; F1m(g)F1_m^(g) is the F1 score on attribute m; and q(⋅,⋅)∈[0,1]J_q(·,·)∈[0,1] is a task-specific operation score normalized to [0,1][0,1], with y⋆y denoting the reference answer. In particular, qJ_q is exact match for binary questions, and a normalized score for scalar outputs such as shortest path length. LORO defines the reward for candidate g as: (10) r(g)=E(g)V(g)(C(g)+C(g)O(g))−1.r^(g)=E^(g)V^(g)\! (C^(g)+C^(g)O^(g) )-1. The −1-1 offset assigns a common failure penalty r(g)=−1r^(g)=-1 to unusable code, keeps rewards in [−1,1][-1,1], and makes positive reward possible only when representation recovery and downstream operation jointly reach sufficient quality. The factor E(g)V(g)E^(g)V^(g) gates semantic credit to executable code that produces a valid compiled graph object, preventing malformed compilations with nontrivial attribute-level F1 from receiving reward. Within this valid branch, C(g)C^(g) rewards faithful representation recovery, while C(g)O(g)C^(g)O^(g) rewards downstream operation only through representation quality. This coupling suppresses shortcut codes that solve the query from a small local fragment and instead drives optimization toward faithful graph recovery before downstream task success. For the G candidates sampled from the same input, we compute group-relative advantages directly from their rewards: (11) A^(g)=r(g)−mean(r(1:G))std(r(1:G))+ϵ. A^(g)= r^(g)-mean\! (r^(1:G) )std\! (r^(1:G) )+ε. We then update the code policy with the following objective, where ϵε is a small constant for numerical stability, β is the KL regularization coefficient, and πref _ref is the reference policy: (12) ℒ(θ)=−1G∑g=1GA^(g)logπθ(c(g)∣x,q,h)+βKL(πθ∥πref).L(θ)=- 1G _g=1^G A^(g) _θ\! (c^(g) x,q,h )+β\,KL\! ( _θ\| _ref ). 4.4. Code Archive and Inference During training, VGCompiler pairs a frozen observer with a trainable code policy. In our main experiments, both are instantiated from Qwen3-VL-8B (Team, 2025). For each graph-question pair, the observer produces a condition signature, and the code policy samples a group of G candidate code instances. LORO evaluates these candidates by checking executability and compiled graph validity, then assigning representation and operation rewards within the valid branch before updating the policy with the group-relative objective. In parallel, VGCompiler accumulates stable code under similar graph-question conditions into a code archive, without using the archive to assist the current training sample: (13) ⋆=(hs,c^s,R¯s)s=1S,C =\(h_s, c_s, R_s)\_s=1^S, where S is the archive size, hsh_s is the condition signature, c^s c_s is the retained code, and R¯s R_s is its average validation reward. In practice, we group candidate code by condition signature, retain only executable candidates with valid compiled graphs, and keep the highest-reward code as the archive entry. During inference, both the observer and the code policy are frozen, and the fixed code archive is queried for reuse. Given a new graph-question pair (x,q)(x,q), VGCompiler computes its condition signature, retrieves the nearest code prior, checks representation coverage and operation compatibility, and either directly executes the matched prior or generates a new code instance conditioned on the current input and the mismatched prior. Table 1. Main results on three public visual-graph benchmarks. Vis.-Only denotes visual graph input only, Hybrid VL denotes the setting that combines visual input with adjacency-list input. We report mean ± standard deviation over five runs. Method GVLQA-Base GVLQA-AUG VisionGraph VGCURE Average Vis.-Only Hybrid VL Vis.-Only Hybrid VL Node Rec. Edge Rec. Graph Und. Graph Reas. Closed-source VLMs GPT-5-mini 49.40±0.9849.40± 0.98 45.20±1.0045.20± 1.00 46.40±4.8146.40± 4.81 47.60±2.8047.60± 2.80 85.70±1.9285.70± 1.92 1.80±0.071.80± 0.07 75.00±3.4575.00± 3.45 60.11±2.6260.11± 2.62 50.29±2.1150.29± 2.11 GPT-5.2 53.60±5.5153.60± 5.51 45.20±4.7945.20± 4.79 59.51±7.7559.51± 7.75 51.20±5.4951.20± 5.49 91.70±1.0391.70± 1.03 14.30±1.6814.30± 1.68 85.72±1.7585.72± 1.75 68.51±3.8068.51± 3.80 57.55±3.9657.55± 3.96 Gemini-3.1-Flash 54.80±8.9554.80± 8.95 53.00±12.6353.00± 12.63 47.60±8.5647.60± 8.56 56.00±15.7756.00± 15.77 91.10±0.0691.10± 0.06 6.00±0.926.00± 0.92 83.92±0.1183.92± 0.11 77.40±1.07¯ 77.40± 1.07 57.46±6.0157.46± 6.01 Gemini-3.1-pro 59.11±5.85¯ 59.11± 5.85 52.00±6.7852.00± 6.78 62.51±8.54¯ 62.51± 8.54 57.40±9.4657.40± 9.46 96.88±0.73 96.88± 0.73 18.00±1.4118.00± 1.41 90.68±1.25¯ 90.68± 1.25 75.51±2.9875.51± 2.98 62.83±4.6262.83± 4.62 Claude-Haiku-4.5 20.20±1.0020.20± 1.00 48.80±0.9648.80± 0.96 24.40±1.0724.40± 1.07 44.00±1.0144.00± 1.01 69.60±7.6369.60± 7.63 0.03±0.060.03± 0.06 70.80±1.0370.80± 1.03 61.91±3.7161.91± 3.71 41.18±2.1541.18± 2.15 Claude-Sonnet-4.5 49.86±4.1649.86± 4.16 47.20±3.4647.20± 3.46 55.51±5.8355.51± 5.83 51.51±3.9551.51± 3.95 89.72±3.0389.72± 3.03 13.53±1.1513.53± 1.15 84.84±1.6584.84± 1.65 68.94±3.8668.94± 3.86 56.45±3.4056.45± 3.40 Open-source VLMs LLaVA-1.5-7B 9.51±2.109.51± 2.10 11.31±4.1611.31± 4.16 11.91±1.5611.91± 1.56 11.91±2.1011.91± 2.10 3.58±1.373.58± 1.37 0.10±0.100.10± 0.10 16.08±3.6116.08± 3.61 14.29±1.3614.29± 1.36 9.33±1.949.33± 1.94 LLaVA-1.5-13B 10.80±2.0110.80± 2.01 13.37±3.8213.37± 3.82 13.20±1.7413.20± 1.74 13.66±2.1513.66± 2.15 4.20±1.444.20± 1.44 0.07±0.110.07± 0.11 18.24±3.0418.24± 3.04 16.51±1.5216.51± 1.52 10.68±1.8910.68± 1.89 InternVL3.5-8B 32.14±1.4732.14± 1.47 20.83±3.9120.83± 3.91 29.17±5.8129.17± 5.81 26.20±4.2026.20± 4.20 63.70±2.3363.70± 2.33 0.12±0.120.12± 0.12 61.32±0.8161.32± 0.81 55.94±2.2855.94± 2.28 35.13±2.6335.13± 2.63 Qwen3-VL-8B 32.74±2.4032.74± 2.40 23.80±0.8223.80± 0.82 34.51±0.8734.51± 0.87 23.20±1.4123.20± 1.41 73.20±0.0773.20± 0.07 0.70±0.780.70± 0.78 75.00±0.1475.00± 0.14 58.34±2.4058.34± 2.40 38.83±1.1138.83± 1.11 Direct-visual methods GITA-7B 17.86±0.6817.86± 0.68 21.37±0.7321.37± 0.73 20.83±0.2620.83± 0.26 22.11±0.2722.11± 0.27 16.57±0.6516.57± 0.65 0.12±0.150.12± 0.15 22.00±0.3222.00± 0.32 19.29±0.2919.29± 0.29 17.03±0.4217.03± 0.42 GITA-13B 16.86±0.7116.86± 0.71 24.77±0.6724.77± 0.67 20.26±0.2720.26± 0.27 25.60±0.3125.60± 0.31 16.80±0.6216.80± 0.62 0.15±0.160.15± 0.16 28.00±0.3728.00± 0.37 24.00±0.3224.00± 0.32 18.86±0.4218.86± 0.42 MCDGraph-8B 48.80±3.8948.80± 3.89 39.29±1.8339.29± 1.83 42.26±1.0242.26± 1.02 47.63±8.6147.63± 8.61 85.12±3.5685.12± 3.56 5.35±2.875.35± 2.87 72.04±1.0872.04± 1.08 63.11±3.8963.11± 3.89 49.49±3.4249.49± 3.42 Code-based methods DPR + GPT-5.2 51.20±0.9551.20± 0.95 91.06±0.41¯ 91.06± 0.41 47.63±4.8647.63± 4.86 98.43±2.56¯ 98.43± 2.56 86.30±3.4886.30± 3.48 37.75±1.92¯ 37.75± 1.92 75.60±0.9575.60± 0.95 60.11±2.5560.11± 2.55 68.03±2.24¯ 68.03± 2.24 Qwen3-VL-8B + Code 31.20±1.0331.20± 1.03 82.06±0.4482.06± 0.44 36.63±5.2636.63± 5.26 87.80±5.9987.80± 5.99 79.10±5.0479.10± 5.04 23.00±1.9623.00± 1.96 60.32±0.9860.32± 0.98 58.46±2.6758.46± 2.67 56.99±3.0056.99± 3.00 Qwen-VGCompiler 91.09±1.04 91.09± 1.04 97.20±1.06 97.20± 1.06 88.23±0.33 88.23± 0.33 98.91±1.00 98.91± 1.00 96.30±0.78¯ 96.30± 0.78 77.75±3.74 77.75± 3.74 95.64±0.33 95.64± 0.33 91.11±1.09 91.11± 1.09 91.72±1.23 91.72± 1.23 5. Experiments 5.1. Experimental Setup Benchmarks and data splits. We train and evaluate VGCompiler on three public visual graph reasoning benchmarks: GVLQA from GITA (Wei et al., 2024), VisionGraph (Li et al., 2024), and VGCURE (Zhu et al., 2025). GVLQA is reported on GVLQA-Base, the clean benchmark with seven graph-theoretic tasks, and GVLQA-AUG, which keeps the same tasks but introduces rendering perturbations. Both are evaluated under Vis.-Only, which uses only the rendered graph, and Hybrid VL, which additionally provides the adjacency-list input. For VisionGraph, we report Node Recognition and Edge Recognition, which test node counting and full edge-set recovery. For VGCURE, we report Graph Understanding, which covers basic structural queries, and Graph Reasoning, which covers relation-based and path-based reasoning over entity-relation graphs. For training and evaluation, we follow the default settings of the three benchmarks. Baselines. We compare VGCompiler with four groups of baselines: (1) Closed-source VLMs, including GPT-5-mini (OpenAI, 2026), GPT-5.2 (OpenAI, 2026), Gemini-3.1-Flash (DeepMind, 2026), Gemini-3.1-pro (DeepMind, 2026), Claude-Haiku-4.5 (Anthropic, 2026), and Claude-Sonnet-4.5 (Anthropic, 2026); (2) Open-source VLMs, including LLaVA-1.5-7B (Liu et al., 2024), LLaVA-1.5-13B (Liu et al., 2024), InternVL3.5-8B (Wang et al., 2025c), and Qwen3-VL-8B (Team, 2025); (3) Direct-visual methods, including GITA (Wei et al., 2024), which is trained on top of LLaVA-1.5-7B (Liu et al., 2024) and LLaVA-1.5-13B (Liu et al., 2024), and MCDGraph (Zhu et al., 2025), which we reproduce with Qwen3-VL-8B (Team, 2025); and (4) Code-based methods, including Description Programming Reasoning (DPR) (Li et al., 2024), instantiated with GPT-5.2 (OpenAI, 2026), Qwen3-VL-8B + Code based on Qwen3-VL-8B (Team, 2025), a prompt-only control that uses our prompting scheme without training and without code-archive retrieval, and our Qwen-VGCompiler. Evaluation protocol. We use exact-match Accuracy as the primary metric, reported as percentages and shown as mean ± standard deviation over five runs. Implementation details. Both the trainable code policy and the frozen observer are initialized from Qwen3-VL-8B (Team, 2025). During training, we sample G=8G=8 candidate programs per input and maintain a key-value code archive indexed by condition signatures, which is queried only at inference by Hamming-distance retrieval. At inference, the observer uses temperature 0 and the code policy uses temperature 0.7. Both training and inference are conducted on 8×8× NVIDIA A800 80GB GPUs. We set β=0.01β=0.01, with πref _ref taken as a frozen copy of the initial code policy before LORO training. Our experiment is designed to answer the following three research questions: • RQ1 (Main Results): How effective and efficient is VGCompiler on public visual graph reasoning benchmarks? • RQ2 (Ablation and Mechanism Analysis): Why does VGCompiler work, how do its key designs contribute to the gains? • RQ3 (Generalization and Case Analysis): How does VGCompiler generalize beyond synthetic benchmarks and reuse code? Figure 5. Training dynamics of four optimization objectives. We report smoothed reward, executable rate, compiled graph F1, and final task accuracy during training. LORO-Direct uses result-only reward, LORO-Uncoupled removes representation-operation coupling, LORO-Flat removes executability-and-validity gating, and LORO uses the full layered reward. 5.2. Main Results (RQ1) Table 1 reports the main results on three public benchmarks. Overall, VGCompiler achieves the best average accuracy, surpassing the strongest closed-source VLM baseline by 28.89% and the closed-source code-based baseline DPR by 23.69%, despite using an 8B open-source backbone. We draw the following observations: • VGCompiler outperforms all baselines across the benchmarks. The gain is largest when representation recovery is the main bottleneck, especially on VisionGraph Edge Recognition, which requires exact recovery of the full graph topology. This shows that a major source of VGCompiler’s advantage lies in improving representation faithfulness from visual input. • The gain does not come from code generation alone. Although Qwen3-VL-8B + Code outperforms direct visual methods in several settings, it remains unstable and can even fall behind direct Qwen3-VL-8B on some tasks. This indicates that generated code is useful only when the compiled graph is sufficiently faithful. • The advantage of VGCompiler is not limited to representation recovery. Its lead remains clear on reasoning settings that require state-matched downstream operation, rather than only graph understanding, showing that faithful compilation must be paired with valid operation on the recovered graph state. • Compared with prior code-based pipeline DPR, VGCompiler is stronger not only because it compiles graphs more faithfully, but also because it more reliably couples representation recovery with downstream graph operation. This is especially important for tasks whose answers are sensitive to edge completeness, direction, weights, and the validity of the executed operation. Table 2. Inference efficiency on the public benchmarks. For code-based methods, Time includes both model generation and code execution; for closed-source VLMs, the Input/Output tokens are taken from API usage statistics. Method Accuracy In Tokens Out Tokens Time GPT-5-mini 50.29 1.89k 0.05k 4.8s GPT-5.2 57.55 1.91k 0.13k 7.3s Gemini-3.1-pro 62.83 1.17k 1.02k 13.1s DPR + GPT-5.2 68.03 5.26k 3.34k 18.9s Qwen3-VL-8B + Code 56.99 3.01k 1.91k 12.8s Qwen-VGCompiler 91.72 3.98k 1.10k 7.7s Table 3. Ablation on target language. We report task accuracy, executable rate, compiled graph validity, and compiled graph F1 denote as Accuracy, E, V, and F1, respectively. Target language Accuracy E V F1 Adjacency matrix 82.7 89.7 85.6 76.5 Edge list 84.8 94.0 91.4 80.3 Attr. adjacency list 91.7 96.8 92.8 94.6 Table 2 shows that VGCompiler also has a clear inference efficiency advantage. Compared with Gemini-3.1-pro, it achieves substantially lower latency, suggesting that code execution can be more efficient than relying on heavy closed-source internal reasoning. Compared with DPR, VGCompiler is faster because DPR depends on a closed-source model to recover graph structure through staged prompting, whereas VGCompiler uses a lightweight VLM observer to extract cues and delegates the downstream graph operation to code execution. Compared with Qwen3-VL-8B + Code, VGCompiler slightly increases input tokens due to archive retrieval and prior code prompting, but reduces output tokens and latency, leading to a better overall efficiency-accuracy trade-off. 5.3. Ablation and Mechanism Analysis (RQ2) Table 4. Factorizing the effect of archive priors and LORO on the public benchmarks. Variant Accuracy E V F1 Qwen3-VL-8B + Code 57.0 72.3 74.1 69.8 VGCompiler w/o Archive 80.1 91.0 88.5 89.1 VGCompiler w/o LORO 71.6 94.1 85.4 87.4 VGCompiler 91.7 96.8 92.8 94.6 Figure 6. Error analysis on 200 sampled cases. We classify errors into four categories: non executable code, invalid compiled graph, low fidelity compilation, and wrong operation. Table 3 shows that the advantage of the attributed adjacency list does not mainly come from representational completeness. All three target languages can encode the required graph semantics, and adjacency matrices and edge lists already achieve relatively high compiled graph validity under the current definition of V. The key difference lies in how the target language shapes compilation and operation. Adjacency matrices encourage one-shot global recovery and are therefore more sensitive to visual ambiguity and style variation. Edge lists recover the graph edge by edge, making them more vulnerable to missing local relations that break the semantics required by reasoning. By contrast, the attributed adjacency list preserves local neighborhood structure while directly exposing direction, weight, and state in executable form, leading to the strongest compiled graph F1 and final task accuracy. Figure 5 compares four optimization objectives to verify the effect of LORO. LORO-Direct uses a result-only reward 2O−12O-1, LORO-Uncoupled uses C+O−1C+O-1, LORO-Flat uses C+CO−1C+CO-1, and LORO uses EV(C+CO)−1EV(C+CO)-1. The curves show that LORO-Direct improves reward and executability early on, but soon saturates in compiled graph F1 and final task accuracy because it is too weak to sustain faithful graph recovery. LORO-Uncoupled already improves both metrics, showing the importance of directly rewarding representation quality, but its operation reward remains independent of representation fidelity and can still favor codes with valid compiled graphs but low fidelity. LORO-Flat further improves compiled graph F1 and final task accuracy, indicating that coupling operation reward to representation fidelity is the key step for suppressing such shortcut behavior. Full LORO then further restricts semantic credit to executable code with valid compiled graph objects, preventing malformed but answer-sufficient programs from receiving reward. These results show that LORO improves visual graph reasoning by combining faithful compilation with validity-aware and operation-aware optimization. Table 5. Archive concentration for path-style queries. Top-1 and Top-2 report dominant-signature coverage, and main split cues summarize the factors separating signature groups. Family #Sig. Top-1 Top-2 Main split cues GVLQA-Base 4 47% 79% Text support; Edge.density GVLQA-AUG 11 19% 37% Node.style; Edge.thickness VisionGraph 7 27% 50% Node.density; Weight.placement VGCURE 6 31% 59% Edge.label; Direction Table 4 and Figure 6 jointly clarify how archive reuse and LORO contribute to VGCompiler. Relative to Qwen3-VL-8B + Code, introducing LORO already brings substantial gains in compiled graph validity, compiled graph F1, and final task accuracy. Removing the archive from VGCompiler mainly lowers executability, while removing LORO more directly influences compiled graph validity and final task accuracy. Figure 6 shows the same pattern at the error level: removing the archive mainly increases non executable and invalid compiled graph errors, whereas removing LORO mainly increases low fidelity compilation and wrong operation errors. Together, these results suggest that archive reuse mainly stabilizes executable code under matched conditions, while LORO provides the stronger semantic optimization over faithful compilation and downstream operation. 5.4. Generalization and Case Analysis (RQ3) Table 5 shows that the code archive does not collapse each benchmark family into a single universal program. Instead, each family is covered by a small set of dominant signatures. GVLQA-Base is the most concentrated, mainly split by text support and edge density, whereas GVLQA-AUG is the most diverse because style perturbations expand the signature space through node appearance and edge thickness. VisionGraph remains relatively diverse because dense weighted renderings require distinct representation routes, while VGCURE is mainly separated by relation labels and direction cues. These results suggest archive retrieval is organized around a small number of reusable but non-universal graph-reasoning programs. We further evaluate whether VGCompiler generalizes beyond synthetic benchmarks to real-world graph diagrams. To this end, we build a real-world benchmark with three domains: metro routing, logistics delivery, and network fault assessment, and evaluate VGCompiler directly without training. Each task requires both faithful graph representation recovery and a domain-grounded downstream operation. Metro reasoning requires least-transfer routing, logistics reasoning requires capacity-constrained warehouse assignment, and network reasoning requires single-point network fault assessment. Table 6 shows that Qwen-VGCompiler achieves the best performance in both final task accuracy and compiled graph F1 across these heterogeneous real-world settings, outperforming all baselines. Compared with the strongest baseline DPR, the gains remain consistent across all three domains, despite their different visual conventions and operational objectives. This suggests that the advantage of VGCompiler is not limited to benchmark-specific patterns, but comes from a more general ability to recover structure-preserving graph representations from visually diverse diagrams and support valid downstream operations reliably. Logistics remains the hardest setting in Accuracy for all methods, which is consistent with the fact that warehouse assignment still requires reliable state recovery together with capacity-aware customer allocation. Meanwhile, network fault assessment provides a complementary challenge, as heterogeneous device types and semantically richer links make the mapping from visual evidence to graph structure and downstream operation more explicit. Figure 7 further provides a concrete real-world case from network fault assessment, showing how VGCompiler compiles device connectivity from the diagram and then executes final analysis. Table 6. Results on the real-world generalization benchmark. We report final task accuracy and compiled graph F1. Method Metro Logistics Network Accuracy Graph F1 Accuracy Graph F1 Accuracy Graph F1 GPT-5.2 45.7±2.145.7± 2.1 63.8±1.663.8± 1.6 30.5±1.830.5± 1.8 46.5±1.746.5± 1.7 43.2±2.343.2± 2.3 59.7±2.059.7± 2.0 Gemini-3.1-pro 48.2±2.448.2± 2.4 65.1±1.865.1± 1.8 33.5±2.033.5± 2.0 49.1±1.849.1± 1.8 46.3±1.646.3± 1.6 62.4±1.662.4± 1.6 InternVL3.5-8B 19.2±1.619.2± 1.6 34.8±1.734.8± 1.7 11.8±1.211.8± 1.2 27.8±1.127.8± 1.1 23.7±1.923.7± 1.9 39.5±1.539.5± 1.5 Qwen3-VL-8B 23.8±1.223.8± 1.2 39.7±1.139.7± 1.1 15.0±1.315.0± 1.3 31.7±1.231.7± 1.2 27.3±1.227.3± 1.2 42.7±1.342.7± 1.3 GITA-7B 11.3±0.811.3± 0.8 25.9±0.925.9± 0.9 8.2±0.68.2± 0.6 20.4±0.720.4± 0.7 14.8±1.014.8± 1.0 29.2±1.029.2± 1.0 DPR + GPT-5.2 61.7±1.4¯ 61.7± 1.4 77.3±1.0¯ 77.3± 1.0 45.5±1.8¯ 45.5± 1.8 60.4±1.4¯ 60.4± 1.4 58.0±1.7¯ 58.0± 1.7 72.6±1.2¯ 72.6± 1.2 Qwen-VGCompiler 90.3±0.8 90.3± 0.8 91.8±0.8 91.8± 0.8 63.5±1.5 63.5± 1.5 81.2±1.2 81.2± 1.2 70.0±1.3 70.0± 1.3 82.2±1.1 82.2± 1.1 Figure 7. A real-world case from network fault assessment. The left panel summarizes the query, signature, operation process, and returned answer, while the right panel shows the corresponding network diagram. 6. Conclusions We present VGCompiler, a compilation-centric paradigm for visual graph reasoning under a knowledge compilation view. VGCompiler organizes reasoning through graph representation recovery and valid downstream operation. It further combines condition-aware code retrieval with reinforcement learning guided by a layered reward over executability, compiled graph validity, representation quality, and operation quality. Across three public benchmarks and real-world scenarios, VGCompiler consistently outperforms prior methods while remaining efficient. The results suggest that treating visual graph reasoning as a knowledge compilation process with reusable executable code provides an effective foundation for robust reasoning over heterogeneous visual graphs. References Alayrac et al. (2022) J. Alayrac, J. Donahue, P. Luc, A. Miech, I. Barr, Y. Hasson, K. Lenc, A. Mensch, K. Millican, M. Reynolds, R. Ring, E. Rutherford, S. Cabi, T. Han, Z. Gong, S. Samangooei, M. Monteiro, J. L. Menick, S. Borgeaud, A. Brock, A. Nematzadeh, S. Sharifzadeh, M. Binkowski, R. Barreira, O. Vinyals, A. Zisserman, and K. Simonyan Flamingo: a visual language model for few-shot learning. In NeurIPS, New Orleans, LA, USA. Cited by: §1. Anthropic (2026) AnthropicClaude 4.5 system cards(Website) External Links: Link Cited by: §5.1. Babaiee et al. (2025) Z. Babaiee, P. M. Kiasari, D. Rus, and R. Grosu Visual graph arena: evaluating visual conceptualization of vision and multimodal large language models. In ICML, Vancouver, BC, Canada. Cited by: §1, §2.1, §2.2. Bellman (1958) R. Bellman On a routing problem. Quarterly of Applied Mathematics 16 (1), p. 87–90. Cited by: §1. Bryant (1986) R. E. Bryant Graph-based algorithms for boolean function manipulation. IEEE Transactions on Computers 35 (8), p. 677–691. Cited by: §2.3. Chen et al. (2024) N. Chen, Y. Li, J. Tang, and J. Li GraphWiz: an instruction-following language model for graph computational problems. In KDD, Barcelona, Spain, p. 353–364. Cited by: §2.1. Dai et al. (2023) W. Dai, J. Li, D. Li, A. M. H. Tiong, J. Zhao, W. Wang, B. Li, P. Fung, and S. C. H. Hoi InstructBLIP: towards general-purpose vision-language models with instruction tuning. In NeurIPS, New Orleans, LA, USA. Cited by: §1. Darwiche and Marquis (2002) A. Darwiche and P. Marquis A knowledge compilation map. Journal of Artificial Intelligence Research 17, p. 229–264. Cited by: §1, §2.3. Darwiche (1999) A. Darwiche Compiling knowledge into decomposable negation normal form. In IJCAI, Stockholm, Sweden, p. 284–289. Cited by: §2.3. Darwiche (2001) A. Darwiche Decomposable negation normal form. Journal of the ACM 48 (4), p. 608–647. Cited by: §2.3. Darwiche (2002) A. Darwiche A compiler for deterministic, decomposable negation normal form. In AAAI, Edmonton, Alberta, Canada, p. 627–634. Cited by: §2.3. DeepMind (2026) G. DeepMindGemini 3.1 model cards(Website) External Links: Link Cited by: §5.1. Deng et al. (2024) Y. Deng, C. Ye, Z. Huang, M. D. Ma, Y. Kou, and W. Wang GraphVis: boosting llms with visual knowledge graph integration. In NeurIPS, Vancouver, BC, Canada. Cited by: §2.1. Dijkstra (1959) E. W. Dijkstra A note on two problems in connexion with graphs. Numerische Mathematik 1 (1), p. 269–271. Cited by: §1. Floyd (1962) R. W. Floyd Algorithm 97: shortest path. Communications of the ACM 5 (6), p. 345–345. Cited by: §1. Gao et al. (2023) L. Gao, A. Madaan, S. Zhou, U. Alon, P. Liu, Y. Yang, J. Callan, and G. Neubig PAL: program-aided language models. In ICML, Honolulu, Hawaii, USA, p. 10764–10799. Cited by: §2.1. Li et al. (2026a) J. Li, K. Qin, R. Wang, Y. Ma, Q. Chen, M. Li, and S. Liang Stop when further reasoning won’t help: attention-state adaptive generation in reasoning models. CoRR abs/2606.15070. Cited by: §2.1. Li et al. (2025a) J. Li, R. Wang, Y. Ma, S. Liang, G. Luo, and K. Qin DSAS: a universal plug-and-play framework for attention optimization in multi-document question answering. In NeurIPS, San Diego, CA, USA / Mexico City, Mexico, p. 174538–174564. Cited by: §2.1. Li et al. (2025b) J. Li, R. Wang, Y. Huang, Q. Chen, J. Zhang, and S. Liang NeuroPath: neurobiology-inspired path tracking and reflection for semantically coherent retrieval. In NeurIPS, San Diego, CA, USA / Mexico City, Mexico. Cited by: §2.1. Li et al. (2023) J. Li, D. Li, S. Savarese, and S. C. H. Hoi BLIP-2: bootstrapping language-image pre-training with frozen image encoders and large language models. In ICML, Honolulu, Hawaii, USA, p. 19730–19742. Cited by: §1. Li et al. (2026b) M. Li, H. Gou, Y. Ma, R. Wang, K. Qin, and T. He Fixed anchors are not enough: dynamic retrieval and persistent homology for dataset distillation. In CVPR, Denver, CO, USA, p. 33963–33972. Cited by: §2.3. Li et al. (2025c) M. Li, H. Gou, D. Zhang, S. Liang, X. Xie, D. Ouyang, and K. Qin Beyond random: automatic inner-loop optimization in dataset distillation. In NeurIPS, San Diego, CA, USA / Mexico City, Mexico. Cited by: §2.3. Li et al. (2025d) M. Li, D. Zhang, Q. Dong, X. Xie, and K. Qin Adaptive dataset quantization. In AAAI, Philadelphia, PA, USA, p. 12093–12101. Cited by: §2.3. Li et al. (2024) Y. Li, B. Hu, H. Shi, W. Wang, L. Wang, and M. Zhang VisionGraph: leveraging large multimodal models for graph theory problems in visual context. In ICML, Vienna, Austria, p. 27903–27919. Cited by: §1, §1, §2.1, §2.2, §5.1, §5.1. Liu et al. (2024) H. Liu, C. Li, Y. Li, and Y. J. Lee Improved baselines with visual instruction tuning. In CVPR, Seattle, WA, USA, p. 26286–26296. Cited by: §1, §5.1. Lu et al. (2024) P. Lu, H. Bansal, T. Xia, J. Liu, C. Li, H. Hajishirzi, H. Cheng, K. Chang, M. Galley, and J. Gao MathVista: evaluating mathematical reasoning of foundation models in visual contexts. In ICLR, Vienna, Austria. Cited by: §1, §2.2. Ma et al. (2026) Y. Ma, R. Wang, S. Liang, G. Luo, and K. Qin TopoLLM: LLM-driven adaptive tool learning for real-time emergency network topology planning. Digital Communications and Networks 12 (2), p. 273–282. Cited by: §2.1. OpenAI (2026) OpenAI OpenAI GPT-5 system card. CoRR abs/2601.03267. Cited by: §5.1. Radford et al. (2021) A. Radford, J. W. Kim, C. Hallacy, A. Ramesh, G. Goh, S. Agarwal, G. Sastry, A. Askell, P. Mishkin, J. Clark, G. Krueger, and I. Sutskever Learning transferable visual models from natural language supervision. In ICML, Virtual Event, p. 8748–8763. Cited by: §1. Schick et al. (2023) T. Schick, J. Dwivedi-Yu, R. Dessì, R. Raileanu, M. Lomeli, E. Hambro, L. Zettlemoyer, N. Cancedda, and T. Scialom Toolformer: language models can teach themselves to use tools. In NeurIPS, New Orleans, LA, USA. Cited by: §2.1. Tarjan (1972) R. E. Tarjan Depth-first search and linear graph algorithms. SIAM Journal on Computing 1 (2), p. 146–160. Cited by: §1. Team (2025) Q. Team Qwen3-vl technical report. CoRR abs/2511.21631. Cited by: §1, §4.4, §5.1, §5.1. Wang et al. (2025a) R. Wang, Q. Chen, Y. Huang, Y. Ma, M. Li, J. Li, K. Qin, G. Luo, and S. Liang GraphCogent: overcoming llms’ working memory constraints via multi-agent collaboration in complex graph understanding. CoRR abs/2508.12379. Cited by: §1, §2.1. Wang et al. (2026) R. Wang, Y. Huang, M. Li, J. Li, D. Liang, B. Simons, P. Ke, S. Liang, and K. Qin Rethinking LLM-driven heuristic design: generating efficient and specialized solvers via dynamics-aware optimization. CoRR abs/2601.20868. Cited by: §2.1. Wang et al. (2025b) R. Wang, S. Liang, Q. Chen, J. Zhang, and K. Qin GraphTool-instruction: revolutionizing graph reasoning in llms through decomposed subtask instruction. In KDD, Toronto, ON, Canada, p. 1492–1503. Cited by: §1, §2.1. Wang et al. (2025c) W. Wang, Z. Gao, L. Gu, H. Pu, L. Cui, X. Wei, Z. Liu, L. Jing, S. Ye, J. Shao, Z. Wang, Z. Chen, H. Zhang, G. Yang, H. Wang, Q. Wei, J. Yin, W. Li, E. Cui, G. Chen, Z. Ding, C. Tian, Z. Wu, J. Xie, Z. Li, B. Yang, Y. Duan, X. Wang, Z. Hou, H. Hao, T. Zhang, S. Li, X. Zhao, H. Duan, N. Deng, B. Fu, Y. He, Y. Wang, C. He, B. Shi, J. He, Y. Xiong, H. Lv, L. Wu, W. Shao, K. Zhang, H. Deng, B. Qi, J. Ge, Q. Guo, W. Zhang, S. Zhang, M. Cao, J. Lin, K. Tang, J. Gao, H. Huang, Y. Gu, C. Lyu, H. Tang, R. Wang, H. Lv, W. Ouyang, L. Wang, M. Dou, X. Zhu, T. Lu, D. Lin, J. Dai, W. Su, B. Zhou, K. Chen, Y. Qiao, W. Wang, and G. Luo InternVL3.5: advancing open-source multimodal models in versatility, reasoning, and efficiency. CoRR abs/2508.18265. Cited by: §5.1. Wang et al. (2023) X. Wang, J. Wei, D. Schuurmans, Q. V. Le, E. H. Chi, S. Narang, A. Chowdhery, and D. Zhou Self-consistency improves chain of thought reasoning in language models. In ICLR, Kigali, Rwanda. Cited by: §2.1. Warshall (1962) S. Warshall A theorem on boolean matrices. Journal of the ACM 9 (1), p. 11–12. Cited by: §1. Wei et al. (2022) J. Wei, X. Wang, D. Schuurmans, M. Bosma, B. Ichter, F. Xia, E. H. Chi, Q. V. Le, and D. Zhou Chain-of-thought prompting elicits reasoning in large language models. In NeurIPS, New Orleans, LA, USA. Cited by: §2.1. Wei et al. (2024) Y. Wei, S. Fu, W. Jiang, Z. Zhang, Z. Zeng, Q. Wu, J. T. Kwok, and Y. Zhang GITA: graph to visual and textual integration for vision-language graph reasoning. In NeurIPS, Vancouver, BC, Canada. Cited by: §1, §1, §2.1, §2.2, §5.1, §5.1. Yao et al. (2023) S. Yao, J. Zhao, D. Yu, N. Du, I. Shafran, K. R. Narasimhan, and Y. Cao ReAct: synergizing reasoning and acting in language models. In ICLR, Kigali, Rwanda. Cited by: §2.1. Yue et al. (2024) X. Yue, Y. Ni, T. Zheng, K. Zhang, R. Liu, G. Zhang, S. Stevens, D. Jiang, W. Ren, Y. Sun, C. Wei, B. Yu, R. Yuan, R. Sun, M. Yin, B. Zheng, Z. Yang, Y. Liu, W. Huang, H. Sun, Y. Su, and W. Chen MMMU: A massive multi-discipline multimodal understanding and reasoning benchmark for expert AGI. In CVPR, Seattle, WA, USA, p. 9556–9567. Cited by: §1, §2.2. Zhu et al. (2025) Y. Zhu, X. Bai, K. Chen, Y. Xiang, J. Yu, and M. Zhang Benchmarking and improving large vision-language models for fundamental visual graph understanding and reasoning. In ACL, Vienna, Austria, p. 30678–30701. Cited by: §1, §1, §2.1, §2.2, §5.1, §5.1.