arXiv:2611.12160cs.LGNov 2026

Manuscript Offprint

arXiv:2611.12160

Beyond Flat Walks: Compositional Abstraction for Autoregressive Graph Generation

Kaiwen Bian, Andrew H. Yang, Yusu Wang, Ali Parviz, Gal Mishne

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

Abstract

Autoregressive graph generators typically linearize graphs through flat node-edge walks, which can obscure higher-order structure in large and complex graphs. We introduce a hierarchical graph abstraction and coarse-to-fine generation pipeline that separates coarsening, tokenization, and decoding. This exposes three design axes: community coarsening, hierarchical tokenization, and order randomization. Across these axes, traversal-based hierarchy consistently improves distributional and structural fidelity, while its V.U.N. cost depends strongly on the coarsening and randomization policy. In particular, the fidelity–V.U.N. trade-off observed under within-community randomization is substantially reduced when traversal order is randomized across the full hierarchy. With a fixed backbone, training protocol, and matched training time across five molecular and five non-molecular benchmarks, hierarchical serialization yields consistent distributional and structural gains on all molecular datasets, while the non-molecular results further show that these gains depend on how well the supplied hierarchy aligns with structure in the target distribution. Together, these results characterize when and how hierarchical serialization benefits autoregressive graph generation.

1 Introduction

Recent progress in generative modeling has been driven by scalable architectures such as transformers and diffusion models, together with the availability of increasingly large-scale datasets. These advances have transformed generation across multiple modalities, including images [Rombach et al., 2022], natural language [Brown et al., 2020, Touvron et al., 2023a,b], and audio [Dhariwal et al., 2020, Huang et al., 2024]. Motivated by the importance of graphs in scientific applications, recent work has extended diffusion-based generation to graph-structured data, achieving strong performance on molecular and general graph synthesis tasks [Jo et al., 2022, Vignac et al., 2023, Mathiasen et al., 2024, Ingraham et al., 2019, Brockschmidt et al., 2018]. However, most diffusion-based graph models rely on dense adjacency representations and iterative denoising procedures, resulting in quadratic memory complexity and additional computational overhead from structural encodings such as spectral features, limiting their scalability to large graphs.

Autoregressive graph generation provides an alternative paradigm in which graphs are constructed sequentially through node and edge generation decisions [Liao et al., 2019, You et al., 2018]. Early approaches relied on handcrafted sequentializations and recurrent architectures, enabling structurally valid generation on small graphs but struggling to capture long-range dependencies and global topology, which led to weaker performance compared to recent diffusion-based methods [Vignac et al., 2023, Jo et al., 2023, Lim et al., 2020]. More recent work has explored adapting

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

Figure

Figure 1: Encoding pipeline, illustrated on camptothecin. Motif coarsening gives two non-singleton communities (C6, C7) and six singleton communities (C0–C5), defining H\mathcal{H}. HDT serializes the hierarchy depth-first: [ENTER]/[EXIT] delimit communities, and back-edge brackets connect each atom to previously emitted neighbors within or across communities (orange arcs). The sequence is abridged, retains original atom indices, and omits atom- and bond-type tokens.

autoregressive transformers to graph generation by representing graphs as token sequences compatible with causal language modeling [Chen et al., 2025]. Existing tokenization strategies typically linearize graphs through random walks [Bojchevski et al., 2018] or depth-first traversals [Goyal et al., 2020]. Although these representations preserve local connectivity, they often fail to capture the hierarchical and compositional structure of graphs, such as motifs, rings, and communities [Jin et al., 2018, Newman and Girvan, 2004], making it increasingly difficult to model large and structurally complex graphs using flat token sequences alone.

In this work, we introduce a hierarchical graph abstraction, H\mathcal{H}, and a coarse-to-fine framework for autoregressive graph generation (Figures 1 and 2). The framework first coarsens a graph into a hierarchy of communities, then serializes that hierarchy into a token sequence, and finally decodes the sequence exactly back into graph space. This formulation exposes three design axes: how the graph is coarsened, how the hierarchy is tokenized, and how ordering is randomized during training. We study domain-agnostic and chemistry-aware coarsening strategies together with several hierarchical tokenizers. Our main tokenizer, Hierarchical Depth Traversal (HDT), traverses the hierarchy depth-first while representing both intra- and inter-community connectivity through standard back edges. We also consider Hierarchical SENT (HSENT), which represents communities and cross-community connectivity explicitly, and HDTC, a chemistry-aware variant of HDT that augments community blocks with semantic type labels. All representations are lossless and compatible with standard causal transformers.

Our contributions are threefold and concern the serialization rather than a new model architecture: we keep a standard causal transformer throughout and compare how graphs are structured and presented to it. First, we introduce a generic hierarchical framework for autoregressive graph generation that decomposes generation into graph coarsening, hierarchical tokenization, and exactly invertible decoding, making it applicable across molecular, biological, and synthetic graph domains. Second, we propose simple and scalable coarse-to-fine hierarchical tokenization schemes that expose global community structure before local connectivity, and show that they substantially improve distributional and structural fidelity over flat tokenization across five molecular benchmarks and non-molecular datasets when meaningful hierarchy is present, while in some settings introducing a trade-off with V.U.N. Third, and critically, we study the three design axes exposed by this framework (coarsening strategy, hierarchical serialization scheme, and order-randomization strategy) showing how the quality of the recovered hierarchy, the way it is represented, and the extent of order randomization together determine the gains, with hierarchy-wide randomization largely removing the V.U.N. cost of more restricted hierarchical orderings.

The remainder of the paper is structured as follows: we review related work in Section 2, formalize the pipeline in Section 3, report empirical results in Section 4, and conclude in Section 5.

References (52)