- Rating
- 5
- Clarity
- 3
- Confidence
- 3
- Originality
- 3
- Quality
- 4
- Significance
- 3
Read review
Summary
This paper introduces SNACK, a novel method that converts a graph into a sequence. The representation is proven to establish a bijective correspondence between valid sequences and ordered adjacency matrices. Because an intermediate graph can be readily decoded from any partially generated sequence, SNACK also supports invalid-logit masking to enforce structural constraints during generation. In addition, it enables principled string-based GFlowNet training. Experiments on multiple standard graph-generation tasks and molecular distribution-learning benchmarks demonstrate the effectiveness of SNACK, and probing analyses further show that models trained on SNACK encode meaningful local and global graph structure.
Strengths and weaknesses
S1. Accurate motivation and gap identification. The many-to-one nature of string representations is a genuine obstacle to their use in GFlowNets, and the proposed bijection-plus-automorphism formulation offers a principled and practical remedy.
S2. Comprehensive capability coverage. A single framework simultaneously supports distribution learning, constrained generation (grammar/valence/BFS masking), and both de novo and conditional GFlowNet training, all while guaranteeing 100% structural validity. This directly addresses the fragmentation of prior string-based methods, each of which covers only a subset of these capabilities.
S3. Convincing evidence for scalability. SNACK outperforms graph baselines across all three dimensions—training throughput, inference latency, and memory usage—and these gains are consistent with the accompanying complexity analysis (computing an entire trajectory in a single forward pass rather than passes, reducing cost from cubic to quadratic).
S4. Probing analysis with independent value. The authors show that, under pure sequence-level supervision alone, the model still internally recovers local connectivity and global geometry, supported by layer-wise visualizations—an interesting finding that stands on its own.
W1. Marginal gains in distribution learning. On QM9 and MOSES, SNACK largely ties SELFIES/STGG/GEEL within one standard deviation. The representation does not clearly improve standard generation quality, so the central case for the method rests almost entirely on GFlowNet scalability rather than on generative performance.
W2. Vocabulary scaling with bandwidth. The vocabulary grows linearly with the BFS bandwidth, so for graphs with large bandwidth the distance-token vocabulary—and consequently the masking and decoding cost—could grow substantially. While the paper bounds this by , it does not report per-dataset bandwidth statistics or empirically characterize the practical effect on large graphs.
Questions
The distance-token vocabulary size is estimated from the training-set bandwidth with some "extra allocation"—how much exactly is allocated, and on what basis? When generation genuinely requires a connection that exceeds the maximum distance seen in training, how does the masking avoid incorrectly filtering out valid molecules?
Limitations
yes
Paper formatting concerns
No formatting concerns
We sincerely appreciate for the insightful and highly encouraging review. We are deeply grateful that the reviewer recognized our core motivations and technical contributions, specifically: (1) addressing the many-to-one challenge of string representations via the proposed bijection-plus-automorphism formulation, (2) providing comprehensive capability coverage with guaranteed structural validity, and (3) demonstrating significant scalability improvements backed by both empirical evidence and complexity analysis.
Below, we address the remaining questions regarding (1) performance gains in distribution learning and (2) vocabulary scaling with respect to bandwidth.
Distribution learning performance
Our new results demonstrate that SNACK is a robust and competitive string-based method on distribution learning.
We additionally evaluated our model on the
Peptides-funcdataset from [10].Peptides-funcprovides a more challenging distribution learning benchmark, as its molecules contain 150 atoms on average (compared to 22 for MOSES). We adopted a 10,000 / 2,000 / 3,371 split for training / validation / testing. Models were trained for 100 epochs with an early stopping patience of 20, with all other hyperparameters kept identical to those in the MOSES experiments.On this challenging benchmark, SNACK demonstrates a clear advantage in validity metrics and outperforms existing baselines on FCD, the most informative metric, while being competitive on SNN. Compared to SELFIES, the only other method guaranteeing 100% validity, SNACK achieves superior performance across all metrics. This may stem from SNACK's compact, unambiguous tokens, which reduce syntax redundancies and help the model focus more effectively on structural patterns.
The results demonstrate that SNACK is a robust and competitive string-based method that enables both generic and molecular graph generation.
Finally, we would like to highlight a key insight revealed by our unified experiments: prior work on distribution learning often evaluated molecular representations under confounding factors, such as disparate backbone architectures or training tricks (e.g., using CharRNN instead of directly evaluating SMILES), making apples-to-apples comparisons difficult. By holding the experimental setup controlled and consistent across representations, our benchmark reveals that:
[10] Diamant et al., Improving graph generation by restricting graph bandwidth, ICML, 2023.
Conditioned generation results
We additionally include conditional generation results on the
Peptides-funcdataset. We selected 161 samples that have ≤30 atoms as conditional fragments. For each condition sample, we generated 100 samples using the pretrained models and computed the similarities against the remaining test set. The next table shows that both SNACK (V+B) and SNACK (None) exhibit strong performance in constrained generation.The EOS rate represents the percentage of generated sequences where the model immediately terminates generation without adding any atoms. SMILES and SELFIES exhibit relatively high EOS rates because complete fragments rarely appear as valid prefixes. In contrast, for SNACK, every subsequence ending with a node-type token constitutes a valid prefix.
In fact, SNACK functions more similarly to graph-based methods by allowing attachments to any atom within the bandwidth.
Example:
SNACK:
[C]1-[C]1-[C]3-[C]→ Can attach
3-[N]to the second atom.→ Valid prefixes:
[C],[C]1-[C],[C]1-[C]1-[C]SMILES:
C(CC)C→ The only option is to extend from the last atom.
→ Valid prefixes:
C,C(CC)This flexibility makes SNACK particularly well-suited for conditioned generation.
Distance token allocation
You are correct that SNACK's vocabulary grows O(B) with bandwidth—a clear improvement over GEEL [6], a scalable graph generation method that scales as O(B2). We are more than happy to clarify how distance tokens are allocated in advance. We separate the procedure into two cases:
Therefore, regarding the question of whether generation requires a connection that exceeds the maximum distance seen in training, the short answer is simply that this scenario will only rarely happen, if ever. Other graph tokenizers, such as GEEL [6], STGG [5], and G2PT [16], face a similar out-of-vocabulary (OOV) token issue, where the number of rings, bandwidth, or number of nodes must be estimated in advance. A common and simple practical strategy is to allocate additional vocabulary space.
If one genuinely has to deal with situations where it is difficult to estimate the maximum bandwidth in advance, the practical way will be to remove samples that exceeds the bandwidth when computing the loss. Alternatively, one could define digit tokens (0–9) and combine them to represent numbers greater than 9, similar to how character-level SMILES handles ring numbers exceeding 9.
A larger bandwidth is unlikely to increase the decoding cost. This is because the distance token directly identifies the target node for attachment, allowing the parser to determine the exact connection position. Similarly, the masking cost is unlikely to increase, as candidate tokens are straightforward to identify—for instance, if the previous distance token is k, only tokens within the range [1,k−1] are valid for the next distance token.
Regarding the training cost, we believe that the extra allocation of distance tokens does not incur significant computational overhead, as it accounts for only a small fraction of parameters. In fact, such extra allocation is intentionally leveraged to boost training speed in certain settings [71]. Likewise, masking a few additional logits in the model output imposes negligible computational cost.
Additionally, we provide the bandwidth statistics for general graphs, which are also summarized in Table 12 of the paper.
[6] Jang et al., A simple and scalable representation for graph generation, ICLR, 2024.
[3] You et al., Graphrnn: Generating realistic graphs with deep auto-regressive models, ICML, 2018.
[5] Ahn et al., Spanning tree-based graph generation for molecules, ICLR, 2021.
[16] Chen et al., Graph generative pre-trained transformer, ICML, 2025.
[71] https://github.com/rasbt/LLMs-from-scratch/tree/main/ch05/10_llm-training-speed