Manuscript Offprint

arXiv:2608.29886

Structural Hierarchy and Geometry in Molecular Representation Learning

David Sulu, Lorenzo Di Fruscia, Jana M. Weber

Abstract

Molecular self-supervised learning uses chemical structures to guide which molecular embeddings should be similar. We study whether explicitly encoding a molecule’s Bemis–Murcko scaffold and using it to supervise the molecular embedding changes what the model learns. We further test whether this effect depends on the embedding geometry by comparing Euclidean and Lorentz contrastive objectives. Across two augmentation strengths, scaffold-supervised models consistently organize molecules according to both identical and structurally related scaffolds. The resulting embeddings also improve molecular property prediction on several tasks, while the exact gains depend on the predicted property. The effect of scaffold supervision on molecular organization is stronger under Lorentz objectives, but neither geometry provides a consistent overall advantage. These results show that explicitly teaching the relation between a molecule and its structural core can reliably shape the organization of molecular embedding space, while the extent of usefulness of this organization remains task dependent.

1 Introduction

Functional molecular properties have been measured for only a small fraction of molecules in chemical space. Experimental validation is costly, and this limits the amount of labelled data available for training molecular property prediction models. Self-Supervised Learning (SSL) is a family of strategies that help mitigate this issue: by learning reusable molecular embeddings from large collections of unlabeled structures, it can improve predictive performance on tasks where labelled data are scarce [Kim et al., 2019, Wu et al., 2018].

Contrastive learning is one widely used SSL strategy. By pulling together related views (positives) while separating other instances (negatives), it teaches the model to learn an embedding from a notion of similarity [Chen et al., 2020, van den Oord et al., 2018]. For example, methods such as GraphCL and MolCLR construct two perturbed versions of the same molecular graph by masking atom information, altering bonds or removing whole subgraphs, and train the model to align their embeddings [You et al., 2020], [Wang et al., 2021]. Subsequent work makes molecular contrastive learning more chemically informed in several ways. Fragment-based approaches decompose molecules into smaller subgraphs: iMolCLR augments molecule-level contrastive learning with a fragment-level contrastive objective and reduces the repulsion of chemically similar molecular negatives [Wang et al., 2022]; GraphFP learns across molecular and fragment resolutions by contrasting fragment embeddings with embeddings of their corresponding atoms [Luong and Singh, 2023]; HiMol uses selected chemically meaningful fragments, termed motifs, and incorporates them as an intermediate level in an atom–motif–molecule hierarchy [Zang et al., 2023]. Scaffold-aware approaches instead use information about the molecular core. [Wan et al., 2025] use scaffold information to construct

∗^{*}Equal contribution

†^{\dagger}Corresponding author

Preprint.

scaffold-preserving molecular views and to modulate how strongly molecules with different scaffolds are separated during contrastive learning.

The geometry of the embedding space may also affect how relations between structural levels are represented. Standard contrastive learning typically compares embeddings in Euclidean space. Hierarchical or branching relationships in data are efficiently, with low distortion, represented in hyperbolic spaces [Nickel and Kiela, 2017, 2018, Sarkar, 2011, Desai et al., 2023]. Molecular structure can be described at multiple levels of abstraction, but this does not imply that molecular space itself must be hierarchical or inherently hyperbolic. Previous molecular work has explored hyperbolic geometry using an externally supplied hierarchy, namely a therapeutic taxonomy, rather than inducing the hierarchy through the pretraining objective itself [Yu et al., 2022].

Molecular cores are used to organize related compound series and can capture chemically meaningful common structures [Bemis and Murcko, 1996, Wan et al., 2025]. They thus provide a natural coarser structural abstraction. The effect of using such a shared abstraction as a direct target for whole-molecule embeddings is worth studying because the same core is a common target for many compounds, so the objective introduces an explicit cross-level, many-to-one relation rather than the one-to-one positive pairing used in standard contrastive learning. This has not been tested in the fragment- and scaffold-based approaches above. Scaffold supervision provides a minimal way of introducing scaffold-level structural organization while leaving the molecular encoder and augmentation scheme unchanged, allowing the effect of the additional supervision to be studied in isolation.

This work investigates the effect of using Bemis–Murcko (BM) scaffolds as an explicit many-to-one supervision signal in molecular contrastive learning [Bemis and Murcko, 1996]. Introducing a hierarchical relationship, we thus further test whether the choice of embedding geometry matters. We assess both aspects along two complementary dimensions: molecular neighbourhood organization through molecule–molecule retrieval, and downstream transfer through frozen molecular property prediction.

References (31)