atlas

Research map / Graph learning / Graph self-supervised learning

From Sequence to Structure: Uncovering Substructure Reasoning in Transformers

NeurIPS 2025 · Graph learning › Graph self-supervised learning · approach: Diffusion-based graph generation · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes Induced Substructure Filtration (ISF) to explain how decoder-only Transformers extract substructures layer by layer, validates it on small from-scratch GPT-2-style models and fine-tuned Llama-3.1-8B, and introduces Thinking-in-Substructure (Tins) decomposition.

Problem

How a decoder-only Transformer, given a textual graph and a question prompt, identifies and extracts substructures (e.g., triangles, squares, houses) from graphs, and how that mechanism extends to LLMs and attributed molecular graphs.

Approach

Models substructure extraction as a layer-wise induced subgraph filtration: each layer progressively identifies larger induced subgraph isomorphism indicators, so the answer is determined before generation; composite patterns are handled by decomposing them into simpler substructures (Tins) to reduce complexity from O(n^k) to O(n^q).

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
decompose composite targets into simpler substructures with TinsGPT-2-style Transformer · Composite substructure: Diagonal, Diamond, House, and Complexaccuracy: 0.6314 -> 0.8648; 0.4756 -> 0.7792; 0.5887 -> 0.8066; 0.1182 -> 0.2268Helped
use a terminology-based prompt instead of a topology-based prompt (ablation)GPT-2-style Transformer · Prompt Group2: Diagonalaccuracy: 0.2332 -> 0.9082Helped
use a terminology-based prompt instead of a topology-based prompt (ablation)GPT-2-style Transformer · Prompt Group1: Triangleaccuracy: 0.9794 -> 0.9782No clear effect
shuffle node names in a topology-based prompt (ablation)GPT-2-style Transformer · Prompt Group2: Diagonalaccuracy: 0.2332 -> 0.7354Helped
increase training examples from 100K to 300K at 3 layers (ablation)GPT-2-style Transformer · Single-shape extraction across substructuresaccuracy: Triangle: 0.9662 ± 0.00 -> 0.9948 ± 0.00; Path: 0.8066 ± 0.02 -> 0.9195 ± 0.01; Square: 0.3991 ± 0.00 -> 0.7247 ± 0.01Helped
increase model depth from 3 to 4 layers with 300K training examples (ablation)GPT-2-style Transformer · Single-shape extraction across substructuresaccuracy: Square: 0.7247 ± 0.01 -> 0.9403 ± 0.02; Diagonal: 0.6313 ± 0.07 -> 0.9140 ± 0.02; Diamond: 0.6189 ± 0.02 -> 0.8765 ± 0.0Helped
use attributed adjacency-list input to extract molecular functional groupsGPT-2-style Transformer · Molecular graphsaccuracy: C-O(H): 0.9207; COO(H): 0.9159; C6(H6): 0.7245; Mix: 0.8946Helped

Surprising findings

Limitations

Experimental setup

Datasets: synthetic directed graphs (4-16 nodes, 3-120 edges) molecular graphs with functional group labels

Benchmarks: synthetic substructure extraction tasks (triangle, path, square, diagonal, pentagon, house, diamond) molecular functional group extraction

Metrics: exact-match accuracy ARI NMI

Baselines: Directly predicting substructures (no decomposition) Edge list vs adjacency list representations

Builds on: GPT-2 GraphPatt ALPINE NLGraph Weisfeiler-Lehman tests

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy