SNACK 提出字符串形式的图表示,序列模型可生成 100% 有效结构
SNACK: A Sequential Notation Framework for Probabilistic Graph Generation
把图变成字符串让序列模型来生成,还能保证 100% 结构合法,做分子生成的可以看看这篇。
SNACK 是一种面向概率图生成的字符串表示,通过编码下三角邻接矩阵的非零元素将图线性化,并在有效序列与有序邻接矩阵之间建立双射对应。该表示支持无效 logit 掩码来施加化学价、排序规则等结构约束,从而保证生成序列 100% 有效。SNACK 显式处理节点排序对称性,使 GFlowNet 能基于字符串训练,训练吞吐量相比图基生成显著提升。在标准图生成任务和分子分布学习基准上,SNACK 的样本质量具有竞争力,探测分析显示仅用序列监督训练的模型也编码了局部与全局图结构。
SNACK: A Sequential Notation Framework for Probabilistic Graph Generation
We introduce SNACK, a string representation for probabilistic graph generation that enables sequence models to generate and model graphs with discrete node and edge features. SNACK linearizes graphs by encoding the nonzero entries of the lower-triangular adjacency matrix, establishing a bijective correspondence between valid sequences and ordered adjacency matrices. This design enables invalid logit masking to enforce structural constraints--such as chemical valence and ordering rules--guaranteeing 100% valid generated sequences. SNACK also enables principled string-based GFlowNet training by explicitly accounting for node-ordering symmetries. Across standard graph-generation tasks and molecular distribution-learning benchmarks, SNACK achieves competitive sample quality, while substantially improving the throughput of GFlowNet training relative to graph-based generation. Probing analyses further show that models trained on SNACK encode meaningful local and global graph structure despite receiving only sequential supervision. These results position SNACK as a practical framework for probabilistic graph generation with deep sequence models.