Journal of Evidence and Innovation · Vol. 2 No. 11 (2026)
Published November 26, 2026

Equivalent Molecular Strings, Different Predictions: A Polarizability Benchmark on a Public QM9 Subset

Kimberly Richards, Bradley Kelley, Luke W Johnston

Abstract

A character-based molecular model receives a different input when the same graph is written with an alternative encoding. We tested this on 2,229 held-out graphs from the public QM9 benchmark, presenting each graph in its archived string and five verified alternative encodings. Training a character-based polarizability regression on a mixture of spellings reduced the mean within-graph prediction span from 2.63 to 1.04 cubic bohr. Its error on the alternative spellings fell from 1.51 to 0.98 cubic bohr, while its error on archived strings rose from 0.80 to 0.90. A graph fingerprint gave identical predictions across spellings but a larger overall error. For this benchmark, testing alternate encodings exposed a robustness difference that the archived strings alone would have missed.

Keywords — QM9, polarizability, representation invariance, randomized SMILES, molecular graphs

1. Introduction

A molecular graph admits several valid strings. The traversal can start at a different atom, place branches in another order, or assign different ring symbols while denoting the same underlying connections. This flexibility is part of the design of SMILES (Weininger, 1988). Canonicalization resolves the question of how one implementation chooses a single string for a given graph (Weininger et al., 1989). It leaves open an empirical question about predictors: if two strings have been confirmed to describe the same graph, how far can a model’s outputs move? Answering that question on held-out graphs helps distinguish the usefulness of a string representation from reliance on one convention for producing it.

For a benchmark of computed properties, the underlying label can be fixed while only the serialization changes. This creates a useful comparison for graph-and-text methods. CatalyticMLLM brings graph encodings together with text inputs for prediction in catalytic materials applications (Li et al., 2026). The text side of such an architecture can convey contextual information absent from a graph. A narrower test on text that solely serializes a graph asks whether a given component has learned stability to bookkeeping choices. This study works with public QM9 values for computed isotropic polarizability, a scalar characterization of the response of the electron distribution to an electric field, using archived labels (Ramakrishnan et al., 2014). It changes only which string represents the graph and keeps the response value fixed for each intervention at evaluation.

Molecular graph neural networks can pool messages so that permuting the input atom indices leaves a graph-level representation invariant (Gilmer et al., 2017). Continuous-filter and directional models can also employ geometric information, depending on their inputs (Schütt et al., 2018; Klicpera et al., 2020). Earlier property models showed that carefully defined representations can preserve intended relations between structures in benchmark prediction (Rupp et al., 2012). These directions suggest that the relevant invariance is a property of the representation and operation, rather than a general feature of learning a molecular property. Equivalent strings are especially useful here because input and label can be checked independently on every evaluation record.

Research question. By how much do polarizability estimates from a string regression change when the same held-out graph is presented through a different valid traversal, and does fitting on several equivalent spellings reduce this sensitivity under the same per-graph fitting weight?

Exposure to alternative spellings gives the second text fit several observed representations for each target, which could make character patterns tied to a single traversal less influential. The corresponding predictions are a smaller within-graph span and lower absolute error on re-encoded holdout inputs. A fixed graph fingerprint has an exact zero-span expectation whenever its verified input graph stays the same. Neither expectation requires the corresponding rule to have a lower error on the archived spelling.

2. Public Data and Evaluation Boundary

The source is the MoleculeNet QM9 CSV, a tabular distribution of the published QM9 benchmark (Wu et al., 2018). It contains an original record ID, a molecular string, and calculated target values, including the alpha field in cubic bohr. A deterministic subset was defined from nine separated byte ranges of that CSV. The first range spans 524,288 bytes and includes the header. Eight 262,144-byte blocks start at byte 1,000,000 then at increments of 3,650,000 bytes. Network responses established the length, content ranges, and shared entity tag of the source object. The analysis retains complete data lines and discards the boundary fragments of each range. This approach creates a reproducible sample that visits separated parts of the file order. Block lengths are in bytes, so they do not imply equal numbers of records or a uniform random sample of individual QM9 graphs.

The original benchmark links its coverage to molecular database enumeration (Ruddigkeit et al., 2012). Its authors also provide a list of uncharacterized records with discrepancies between structural representations. Their record IDs were used to exclude flagged rows after parsing. The analysis excludes strings with explicit stereochemical markers and requires a valid connected graph and finite target. PySmiles parses the remaining strings to labeled graphs, using element, implicit hydrogen count, charge, aromaticity and isotope information for node labels and bond order for edge labels (Kroon, 2026). The analysis hashes the resulting labeled graphs using Weisfeiler–Lehman refinement, then distinguishes nonisomorphic cases in each hash group through exact labeled graph isomorphism (Shervashidze et al., 2011). The smallest archive ID supplies the label where two sampled rows have the same inferred graph. A fixed hash of graph identity then assigns approximately one fifth of graphs to holdout. An entire hash group remains in the same partition even if its graphs are distinct, and all alternative strings stay with their corresponding graphs.

The evaluation directly controls graph identity and therefore addresses the risk of record-level duplicates between fit and holdout. Near neighbors, molecules with shared substructures, and different graphs with similar properties can still occur in both partitions. Benchmark studies of structure-based splitting demonstrate the importance of accounting for near equivalence when the goal is to assess transfer across chemically separated input sets (Simm et al., 2021; Omee et al., 2024). A convenient archive excerpt can be sufficient to measure whether outputs move under re-encoding, but the prediction scores assess the held-out cases in this design. That distinction is especially important for evaluations that examine groups with sharp property differences despite high structural similarity (van Tilborg et al., 2022).

Research flow showing selection of QM9 records, division by labeled graph identity, and comparison of held-out prediction error and within-graph spread.

Figure 1. Separate graphs before constructing the training and evaluation views. Predictions for alternative strings are compared both with the fixed target and with the other predictions for the same graph.

3. Regression and Within-Graph Measures

Each retained graph has its archived form and five seeded re-encodings. Each draw changes the start node and the iteration order of the nodes and edges seen by the string writer. The returned string was parsed back into a graph and required to be exactly isomorphic to the graph derived from the archive, including node and bond labels. The generator drew again on a failed comparison, to a maximum of 30 total draws before dropping a graph. Some seeded draws return the same string because of symmetry or traversal probability. Repeated draws remain in random-spelling error averages. The largest and smallest output among the five draws and the archived form define the span, so repeated strings can affect the chance of exploring a different traversal but cannot increase the range. Research on randomized SMILES uses alternate strings to supplement examples in sequence models (Arús-Pous et al., 2019). Here the goal is to distinguish the effect of equivalent representations from any change in the number of genuinely independent graphs.

Two count-based string regressions use the same character one-, two- and three-grams, with anchors marking both ends of the string. The local patterns are mapped to signed counts in 4,096 fixed slots by a deterministic feature hash (Weinberger et al., 2009). The archived-text fit observes one string per graph. The mixed-spelling fit sees the archived form and five other draws, each assigned one sixth of the graph’s total weight. The penalty is the same in both cases. A weighted fit therefore changes the distribution of observed string representations while holding constant the total observed label weight for each source identity. This is a deliberately limited text representation. Adjacent symbols and character frequencies can be informative without learning the full equivalence relation that connects all possible traversals.

A heavy-atom-count regression quantifies how much signal an exceptionally small invariant input can retain. A second invariant regression receives custom graph environment counts generated from each node at radii zero, one and two and hashed to 1,024 slots. At each radius its encoder combines the current node descriptor and sorted neighbor descriptors paired with edge labels. This follows the general logic of iteratively encoding connectivity in molecular fingerprints (Morgan, 1965; Rogers & Hahn, 2010). Common fingerprint work also highlights the distinction between a fingerprint representation and a chosen similarity or prediction rule (Bajusz et al., 2015). The graph feature vector was recomputed for each unique alternative and confirmed to match the vector from the archived string. An equality of feature vectors ensures exactly the same linear prediction under any supplied spelling for that fitted graph model. A zero span for this control is thus an implementation check as well as a transparent property of the specified representation.

All four rules use a ridge penalty of 12 with an unpenalized intercept. Ridge regression offers a simple and explicit constraint on coefficient magnitude for correlated inputs (Hoerl & Kennard, 1970). A sparse LSQR solve fits the penalized objective by augmenting the design with the coefficient penalty (Paige & Saunders, 1982). The two text arms have identical model capacity and solver settings. The graph comparison instead changes the descriptor and its dimensionality, so its score indicates the behavior of one invariant benchmark and does not isolate which of its implementation differences causes its error ranking. Rich atom-centered descriptors would add other structural features with different invariances (Behler & Parrinello, 2007; Himanen et al., 2020).

The primary instability quantity is the mean within-graph span of predictions across the six presentations. Archived-spelling MAE measures error for the archived input alone. Random-spelling MAE first averages absolute errors over the five alternative draws for each held-out graph, and then averages over graphs. This distinguishes sensitivity to equivalent inputs from estimation error against the archived polarizability value. The bootstrap used 2,000 paired resamples of held-out graph IDs for the mixed-minus-archived-fit differences in mean span and random-spelling MAE. Following standard empirical resampling principles (Efron, 1979; Davison & Hinkley, 1997), the estimates resample each graph jointly with its repeated spelling predictions. A representation-level bootstrap would assign misleading independent weight to the observed spellings. The relevance of the grouping follows from the statistical requirements for bootstrapping repeated measurements within higher-level units (Field & Welsh, 2007). These intervals describe variation over the sampled graphs given frozen fits and seeded alternative draws.

4. Results

The nine file windows provided 11,814 complete rows. The published uncharacterized-record list excluded 410. Thirteen further rows represented labeled graphs already retained under smaller archive IDs. No sampled row was removed for a nonfinite value, explicit stereochemical marking, or a parse failure. The final partitions contained 9,162 fitting and 2,229 held-out graph identities. Every alternative draw returned an isomorphic graph on its first attempt. In the holdout, 99.82% of graphs had more than one distinct spelling and the median graph was presented in six distinct forms. The archived labels ranged from 13.21 to 108.26 cubic bohr in the fit partition and from 6.31 to 101.17 in holdout.

Table 1. Held-out prediction accuracy and variation across equivalent strings.

Fitted input Archived-spelling MAE Alternate-spelling MAE Mean within-graph prediction span Share with span above 1
Heavy-atom count 5.110 5.110 0.000 0.0%
Archived text 0.804 1.515 2.629 93.1%
Mixed-spelling text 0.902 0.982 1.043 44.4%
Graph environment counts 1.587 1.587 0.000 0.0%

Errors and spans in cubic bohr. Each row summarizes the same 2,229 held-out graphs. The span is the maximum minus the minimum predicted outcome across the archived spelling and five alternatives.

The archived-text rule had the smallest MAE on the source spelling. Changing the spelling almost doubled that rule's error, from 0.804 to 1.515 cubic bohr. With mixed-spelling training, the mean error on the same re-encodings fell to 0.982 cubic bohr. The paired mixed-minus-archived difference was −0.532 cubic bohr with a 95% bootstrap interval of [−0.573, −0.492]. The joint presentation yielded a related difference in stability. Mean prediction span was smaller by 1.586 cubic bohr [−1.634, −1.538], with over one half of held-out graphs having six-presentation ranges at or below one cubic bohr after mixed training. The upper tail contracted as well. The ninetieth percentile of span was 4.487 cubic bohr under archived-text training and 1.761 under mixed training.

Table 2. Paired differences for the two ridge text regressions, mixed-spelling minus archived-spelling training.

Held-out outcome Difference (bohr³) Paired 95% interval (bohr³) Graphs
Alternate-spelling MAE −0.532 [−0.573, −0.492] 2,229
Mean within-graph span −1.586 [−1.634, −1.538] 2,229

The heavy-atom and graph-environment regressions made exactly the same prediction for every spelling of each tested graph. Graph environment counts reduced that control's MAE from 5.110 to 1.587 cubic bohr relative to relying on the atom count alone. The mixed-spelling text remained more accurate on both presentation types in this partition. Its remaining within-graph spread and its lower average loss are separate facts. If the costs of instability were high relative to squared or absolute prediction error, an application could reasonably rank these fitted rules differently. The table reports both endpoints so the choice is visible.

5. Discussion

An unchanged string benchmark can show small average prediction errors while leaving open what happens when the input encoder accepts a form generated by a different program or traversal. Canonicalization can be sufficient for systems where all inputs are normalized deterministically before inference, if the software version and encoding conventions are controlled. Training on alternate spellings goes further by adjusting the fitted rule under the kinds of alternate inputs represented in training. Even then a fitted text model need not make identical predictions for every valid serialization. An invariance test distinguishes the two strategies and can be applied without constructing new target values or fitting a larger model.

Comparing a string predictor to an invariant fingerprint also clarifies when disagreement itself might be an informative performance measure. A graph-and-text model could initially combine compatible inputs with almost redundant information about connectivity, while its text component also represents nonredundant context. A targeted diagnostic can vary strings that are checked to preserve graph identity while preserving meaningful textual context. A second diagnostic can change contextual inputs without rewriting the graph representation. Distinguishing the two interventions gives an evaluation a defensible unit of change. This study plays only the first role, with a text encoding that describes the graph itself. Its error values cannot assess arbitrary contextual statements, graph-and-text fusion, or catalysis outcomes.

Fixed train/holdout protocols and a clear unit of analysis matter when re-encoding is one of many candidate interventions. Shared benchmark definitions give competing approaches a consistent test (Dunn et al., 2020). When tuning choices are made using the same graphs that determine reported performance, the resulting scores can overstate likely performance on a separate batch (Cawley & Talbot, 2010; Varma & Simon, 2006). Extending a representation study could define a validation partition and select the number of spellings or the ridge penalty on that partition. The final test would need to maintain separation by graph and record the procedure that produces evaluation strings. Reporting archived-spelling error, re-encoding error, and within-graph movement together would help interpret what such a choice buys.

6. Conclusion

Training on equivalent traversals made character-based polarizability predictions more stable and improved accuracy for re-encoded inputs. It came with a modest increase in error for archived strings. The two invariant controls demonstrate that representation-level equality can eliminate output movement, while the measured errors show why invariance alone is insufficient to characterize performance. The resulting audit is useful whenever a graph-and-text system may encounter several serializations of the same underlying graph. Its outcomes depend on the sampling frame, the defined equivalence checks, and the alternative strings used at evaluation.

Data and Code Availability

The MoleculeNet QM9 CSV and the published QM9 exclusion list were accessed 23 November 2026. The original QM9 data deposit specifies CC0. The article’s analysis script specifies the nine source byte ranges and writes their hashes, model results, and uncertainty intervals. The reproducibility package reports aggregate statistics.

References

  1. Arús-Pous, J.; Johansson, S. V.; Prykhodko, O.; Bjerrum, E. J.; Tyrchan, C.; Reymond, J. L.; Chen, H.; Engkvist, O. (2019). Randomized SMILES strings improve the quality of molecular generative models. Journal of Cheminformatics, 11(1). https://doi.org/10.1186/s13321-019-0393-0
  2. Bajusz, D.; Rácz, A.; Héberger, K. (2015). Why is Tanimoto index an appropriate choice for fingerprint-based similarity calculations?. Journal of Cheminformatics, 7(1). https://doi.org/10.1186/s13321-015-0069-3
  3. Behler, J.; Parrinello, M. (2007). Generalized Neural-Network Representation of High-Dimensional Potential-Energy Surfaces. Physical Review Letters, 98(14). https://doi.org/10.1103/physrevlett.98.146401
  4. Cawley, G. C.; Talbot, N. L. C. (2010). On Over-fitting in Model Selection and Subsequent Selection Bias in Performance Evaluation. Journal of Machine Learning Research, 11, 2079–2107. https://jmlr.org/papers/v11/cawley10a.html
  5. Davison, A. C.; Hinkley, D. V. (1997). Bootstrap Methods and their Application. Cambridge University Press. https://doi.org/10.1017/cbo9780511802843
  6. Dunn, A.; Wang, Q.; Ganose, A.; Dopp, D.; Jain, A. (2020). Benchmarking materials property prediction methods: the Matbench test set and Automatminer reference algorithm. npj Computational Materials, 6, 138. https://doi.org/10.1038/s41524-020-00406-3
  7. Efron, B. (1979). Bootstrap Methods: Another Look at the Jackknife. The Annals of Statistics, 7(1), 1–26. https://doi.org/10.1214/aos/1176344552
  8. Field, C. A.; Welsh, A. H. (2007). Bootstrapping Clustered Data. Journal of the Royal Statistical Society Series B: Statistical Methodology, 69(3), 369–390. https://doi.org/10.1111/j.1467-9868.2007.00593.x
  9. Gilmer, J.; Schoenholz, S. S.; Riley, P. F.; Vinyals, O.; Dahl, G. E. (2017). Neural Message Passing for Quantum Chemistry. Proceedings of the 34th International Conference on Machine Learning, 70, 1263–1272. https://proceedings.mlr.press/v70/gilmer17a.html
  10. Himanen, L.; Jäger, M. O. J.; Morooka, E. V.; Federici Canova, F.; Ranawat, Y. S.; Gao, D. Z.; Rinke, P.; Foster, A. S. (2020). DScribe: Library of descriptors for machine learning in materials science. Computer Physics Communications, 247, 106949. https://doi.org/10.1016/j.cpc.2019.106949
  11. Hoerl, A. E.; Kennard, R. W. (1970). Ridge Regression: Biased Estimation for Nonorthogonal Problems. Technometrics, 12(1), 55–67. https://doi.org/10.1080/00401706.1970.10488634
  12. Klicpera, J.; Groß, J.; Günnemann, S. (2020). Directional Message Passing for Molecular Graphs. International Conference on Learning Representations. https://openreview.net/forum?id=B1eWbxStPH
  13. Kroon, P. C. (2026). PySmiles: The lightweight and pure-Python SMILES reader and writer, version 2.1.1. Python Package Index. https://pypi.org/project/pysmiles/2.1.1/
  14. Morgan, H. L. (1965). The Generation of a Unique Machine Description for Chemical Structures-A Technique Developed at Chemical Abstracts Service. Journal of Chemical Documentation, 5(2), 107–113. https://doi.org/10.1021/c160017a018
  15. Omee, S. S.; Fu, N.; Dong, R.; Hu, M.; Hu, J. (2024). Structure-based out-of-distribution (OOD) materials property prediction: a benchmark study. npj Computational Materials, 10(1). https://doi.org/10.1038/s41524-024-01316-4
  16. Paige, C. C.; Saunders, M. A. (1982). LSQR: An Algorithm for Sparse Linear Equations and Sparse Least Squares. ACM Transactions on Mathematical Software, 8(1), 43–71. https://doi.org/10.1145/355984.355989
  17. Ramakrishnan, R.; Dral, P. O.; Rupp, M.; von Lilienfeld, O. A. (2014). Quantum chemistry structures and properties of 134 kilo molecules. Scientific Data, 1(1). https://doi.org/10.1038/sdata.2014.22
  18. Rogers, D.; Hahn, M. (2010). Extended-Connectivity Fingerprints. Journal of Chemical Information and Modeling, 50(5), 742–754. https://doi.org/10.1021/ci100050t
  19. Li, Y.; Xu, J.; Zhang, X. Y.; Xiang, S.; Ran, N.; Li, W.; Liu, C. L. (2026). CatalyticMLLM: A Graph-Text Multimodal Large Language Model for Catalytic Materials. arXiv. https://arxiv.org/abs/2605.17254v5
  20. Ruddigkeit, L.; van Deursen, R.; Blum, L. C.; Reymond, J. L. (2012). Enumeration of 166 Billion Organic Small Molecules in the Chemical Universe Database GDB-17. *Journal of Chemical Information
  21. and Modeling*, 52(11), 2864–2875. https://doi.org/10.1021/ci300415d
  22. Rupp, M.; Tkatchenko, A.; Müller, K. R.; von Lilienfeld, O. A. (2012). Fast and Accurate Modeling of Molecular Atomization Energies with Machine Learning. Physical Review Letters, 108(5). https://doi.org/10.1103/physrevlett.108.058301
  23. Schütt, K. T.; Sauceda, H. E.; Kindermans, P. J.; Tkatchenko, A.; Müller, K. R. (2018). SchNet – A deep learning architecture for molecules and materials. The Journal of Chemical Physics, 148(24). https://doi.org/10.1063/1.5019779
  24. Shervashidze, N.; Schweitzer, P.; van Leeuwen, E. J.; Mehlhorn, K.; Borgwardt, K. M. (2011). Weisfeiler-Lehman Graph Kernels. Journal of Machine Learning Research, 12, 2539–2561. https://www.jmlr.org/papers/v12/shervashidze11a.html
  25. Simm, J.; Humbeck, L.; Zalewski, A.; Sturm, N.; Heyndrickx, W.; Moreau, Y.; Beck, B.; Schuffenhauer, A. (2021). Splitting chemical structure data sets for federated privacy-preserving machine learning. Journal of Cheminformatics, 13(1). https://doi.org/10.1186/s13321-021-00576-2
  26. van Tilborg, D.; Alenicheva, A.; Grisoni, F. (2022). Exposing the Limitations of Molecular Machine Learning with Activity Cliffs. Journal of Chemical Information and Modeling, 62(23), 5938–5951. https://doi.org/10.1021/acs.jcim.2c01073
  27. Varma, S.; Simon, R. (2006). Bias in error estimation when using cross-validation for model selection. BMC Bioinformatics, 7(1). https://doi.org/10.1186/1471-2105-7-91
  28. Weinberger, K.; Dasgupta, A.; Langford, J.; Smola, A.; Attenberg, J. (2009). Feature hashing for large scale multitask learning. Proceedings of the 26th Annual International Conference on Machine Learning, 1113–1120. https://doi.org/10.1145/1553374.1553516
  29. Weininger, D. (1988). SMILES, a chemical language and information system. 1. Introduction to methodology and encoding rules. Journal of Chemical Information and Computer Sciences, 28(1), 31–36. https://doi.org/10.1021/ci00057a005
  30. Weininger, D.; Weininger, A.; Weininger, J. L. (1989). SMILES. 2. Algorithm for generation of unique SMILES notation. Journal of Chemical Information and Computer Sciences, 29(2), 97–101. https://doi.org/10.1021/ci00062a008
  31. Wu, Z.; Ramsundar, B.; Feinberg, E. N.; Gomes, J.; Geniesse, C.; Pappu, A. S.; Leswing, K.; Pande, V. (2018). MoleculeNet: a benchmark for molecular machine learning. Chemical Science, 9(2), 513–530. https://doi.org/10.1039/c7sc02664a