- The paper introduces Linearization Uncertainty (LU), the coefficient of variation of negative log-likelihood across equivalent graph encodings, to measure whether autoregressive generators assign consistent probabilities to the same graph.
- The paper finds that biased training orderings produce lower native NLL but cause up to 10ร NLL increases and major calibration failures under random permutations, with revisit tokens driving the largest errors.
- The paper shows that generation NLL can misidentify unstable molecules, while LU predicts stability with AUC 0.85 using only scalar likelihoods, making permutation-based evaluation a practical quality-control tool.
Autoregressive graph generators assign likelihoods to graphs through a sequential factorization, which presupposes that the ordering chosen for linearization does not affect the assigned probability. This paper examines that presupposition directly. Using Segmented Eulerian Neighborhood Trail (SENT) encodings [autograph2024], which are permutation-equivalent in the sense that every linearization of a graph decodes to the identical topology, the authors formalize a linearization-invariance requirement and introduce a diagnostic, Linearization Uncertainty (LU), that quantifies violations of it. The central finding is stark: autoregressive transformers trained on biased orderings learn the training linearization rather than the underlying graph, and the resulting likelihoods are not only inconsistent across orderings but actively misleading as quality signals.
Let ฯ:SโG denote the SENT decoding map. Because ฯ is many-to-one and all sequences in ฯโ1(G) decode to the same graph, any consistent distribution over graphs must assign equal likelihood to every linearization of G. An autoregressive model pฮธโ(s)=โtโpฮธโ(stโโฃs<tโ) trained by teacher forcing does not enforce this constraint, and the constraint is non-trivial to satisfy: SENT sequence length depends on the traversal, so equivalent linearizations can differ in length and in their entire conditional factorization.
The paper's metric, Linearization Uncertainty, is the coefficient of variation of NLL across K sampled linearizations of a graph:
LU(G)=ฮผ({L(s1โ),โฆ,L(sKโ)})ฯ({L(s1โ),โฆ,L(sKโ)})โ
where L(s)=โlogpฮธโ(s). A key practical property is that LU requires only scalar NLL values from K forward passes; it does not require access to full logits. LU is evaluated in two settings: under the model's native training strategy (internal consistency) and under random permutations (robustness to out-of-distribution orderings). The authors position LU as complementary to Expected Calibration Error (ECE): ECE measures whether per-token probabilities match empirical frequencies, while LU measures whether equivalent inputs receive equivalent likelihoods. A model that assigns different NLL to the same graph under different orderings does not define a well-structured distribution over graphs at all, let alone a calibrated one.
The paper also distinguishes Generation NLL, the likelihood of the model's own sampled trajectory, from mean permutation NLL computed over algorithmic re-linearizations of the decoded graph. A gap between these two indicates specialization to the training linearization.
Experimental design
The evaluation covers a data-scarce regime (the synthetic Planar dataset with N=128 training graphs, and small QM9 subsets) and a data-rich regime (full QM9, ฯ0k training molecules after explicit-hydrogen preprocessing). The backbone is a 12-layer Llama transformer following the SENT/autograph setup, with constrained decoding at inference time on QM9 that guarantees decodable graph topology without enforcing chemical validity. Four linearization strategies are compared, all producing valid SENT encodings of the same graphs but inducing different inductive biases: Random Order (maximally diverse; a fresh linearization every epoch), Min-Degree First (deferring hubs), Max-Degree First (front-loading hubs), and Anchor Expansion (anchored at the maximum-degree node, expanding leaf-first).
The robustness trade-off on QM9
In the data-rich regime, all strategies train stably, and biased strategies achieve lower native NLL per token with shorter sequences, reflecting traversal biases that minimize chordal back-references. Anchor Expansion attains the best native numbers (NLL/token ฯ1, LU ฯ2, ECE ฯ3). Under randomized evaluation, however, these advantages collapse:
| Strategy |
NLL/token (Native โ Random) |
LU (Native โ Random) |
ECE (Native โ Random) |
| Random |
0.336 โ 0.336 |
0.083 โ 0.083 |
0.000 โ 0.000 |
| Min-Degree |
0.250 โ 1.564 |
0.049 โ 0.383 |
0.001 โ 0.171 |
| Max-Degree |
0.244 โ 2.240 |
0.039 โ 0.277 |
0.002 โ 0.205 |
| Anchor |
0.222 โ 2.246 |
0.027 โ 0.217 |
0.001 โ 0.245 |
NLL rises by up to ฯ4 and ECE by two orders of magnitude off-distribution. The implication is direct: biased models act as better density estimators only under their native ordering, and their apparent likelihood quality is an artifact of memorized ordering statistics rather than graph-level understanding. Random Order shows no degradation, since its native strategy already samples uniformly.
The full ฯ5 cross-evaluation decomposition localizes the failure mechanism. New Node tokens (first occurrences of node indices, a grammatical prediction) remain well-calibrated across orderings, with ECE at or below ฯ6 for Min-Degree. Revisit tokens (cycle-closing back-references, a topological prediction) account for the largest failure, with off-diagonal ECE reaching approximately ฯ7 for Min-Degree and ฯ8 for Anchor Expansion. Node and edge label calibration also degrade substantially. The models therefore exploit topological sorting cues from their training ordering to resolve cycle-closing decisions, and lose this ability on unfamiliar orderings.
Memorization in the data-scarce regime
On Planar (ฯ9), biased strategies exhibit a characteristic overfitting signature: validation NLL rises after roughly 5k training steps, yet composite generative quality (VUN) continues to improve. The paper's decomposition shows this apparent improvement is driven entirely by Validity; Uniqueness degrades to 90โ95% and Novelty to 75โ85% as the models increasingly reproduce training graphs, with Anchor Expansion's novelty collapsing to roughly 60%. Random Order sustains high values across all three components, because the combinatorially many permutations act as inherent data augmentation. The memorization persists at scale: on QM9 subsets, biased strategies recover competitive Uniqueness only at ฯโ1(G)0, and their sequence diversity saturates early at all dataset sizes. A practical consequence is that in low-data regimes, aggregate quality metrics can mask memorization unless decomposed.
The NLL paradox and LU as a quality signal
The most consequential result concerns self-assessment of generated molecules. Under constrained decoding, Generation NLL is negatively correlated with chemical stability: unstable molecules receive lower (more confident) NLL than stable ones, yielding AUC ฯโ1(G)1 for binary stability prediction โ worse than chance. The proposed explanation is that unstable molecules arise from traversals that happen to align well with the training linearization, so every token prediction is confident even though the global structure violates valency. Mean permutation NLL alone is close to chance (AUC ฯโ1(G)2), but the variance across orderings is diagnostic: molecules whose low NLL depended on a specific traversal show high LU, whereas genuinely confident graph-level likelihoods are stable across orderings.
LU achieves AUC ฯโ1(G)3 for stability prediction, compared to ฯโ1(G)4 for Generation NLL and ฯโ1(G)5 for ECE, which requires full logit access. The signal is sample-efficient: even at ฯโ1(G)6 permutations, LU reaches AUC ฯโ1(G)7, far exceeding the Generation NLL baseline, and Anchor Expansion reaches ฯโ1(G)8 by ฯโ1(G)9. Random Order models converge more slowly (still at G0 at G1), indicating that unbiased models require more permutations for a stable LU estimate. The operational implication is that Generation NLL should not be used alone as a quality filter for generated molecules; permutation-based LU provides a more reliable, logit-free check.
A secondary observation concerns self-assessment more broadly: mean permutation NLL consistently exceeds Generation NLL, and generated sequences are systematically longer than algorithmically re-linearized versions of the same molecules (e.g., 127 vs. 89 tokens/graph for Random Order). A mechanistic analysis attributes this to traversal inefficiency rather than molecular complexity: generated sequences incur roughly G2 as many chordal back-references, often because the model learns valid but inefficient habits such as deferring explicit hydrogens to the end of the sequence, each requiring a separate back-reference.
Limitations and open questions
The paper is candid about scope. The stability-predictor results are established only on QM9, a constrained small-molecule benchmark; the authors note that more chemically diverse benchmarks such as MOSES or GuacaMol would be needed to test whether the Generation NLL inversion and the LU signal generalize. The entire analysis is confined to the SENT framework, and the invariance argument relies on SENT's permutation-equivalence property; encodings without this property would confound model-level violations with encoding-level differences, which is precisely what distinguishes this study from prior ordering comparisons. Finally, while the G3-sensitivity of LU is characterized on QM9, whether LU converges at comparable G4 on larger graphs remains open, and the slower convergence of Random Order models suggests the answer may be strategy-dependent.
Conclusion
Because SENT encodings are permutation-equivalent, any non-zero coefficient of variation of NLL across orderings is attributable to the model, not the encoding. The paper shows that autoregressive transformers trained on biased linearizations converge to their training order rather than the graph structure: they achieve lower native NLL but suffer up to G5 NLL inflation and two-orders-of-magnitude ECE degradation under permutation, with Revisit tokens as the dominant failure mode. Most pointedly, Generation NLL is anti-correlated with molecular stability (AUC G6) while permutation-based LU identifies unstable molecules with AUC G7 using only scalar likelihoods. Training with random linearization emerges as a simple intervention for permutation-consistent likelihoods, and permutation-based evaluation is recommended as a standard secondary check when autoregressive models generate structured objects.