arXiv:2610.31539cs.LGOct 2026

Manuscript Offprint

arXiv:2610.31539

PYTHIA, a transferable machine learning framework for simultaneous defect and adsorption site optimization

Ioannis Kouroudis, Zhaosu Gu, Poonam, Leon Muller, Alessio Gagliardi

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Ioannis Kouroudis 1,2∗^{1,2*}

Zhaosu Gu 1,2^{1,2}

Poonam 2^{2}

Leon Müller 3^{3}

Prof. Dr. rer. nat. Alessio Gagliardi 2†^{2\dagger}

1^{1} These authors contributed equally

2^{2} Chair of Simulation of Nanosystems for Energy Conversion, Department of Electrical Engineering, TUM School of Computation, Information and Technology, Atomistic Modeling Center (AMC), Munich Data Science Institute (MDSI), Technical University of Munich, Hans-Piloty-Straße 1, 85748 Garching, Germany

3^{3} Fritz-Haber-Institut der Max-Planck-Gesellschaft, Faradayweg 4-6, Berlin, Germany

Abstract

Machine learning has permeated material optimization, providing high value. Nevertheless, its reliance on a high number of samples limits its applicability to relatively explored material families. In this paper we extend the applicability of machine learning to novel and understudied materials through the PYTHIA (Probabilistic Yet Transferable Hierarchical Interaction Architecture) framework. Pythia utilizes two of the most powerful machine learning concepts, foundational models and transfer learning. We employ a complex foundational model trained on a large dataset of chemically similar molecules, on a target that is physically close to our prediction target. Then, we freeze the weights and perform subspace alignment with the use of a transformer layer and add uncertainty quantification with gaussian processes. These two layers can be trained on a limited dataset yet allow us to leverage the gained knowledge and the studied materials and complex architectures. The resulting model is used as a surrogate for a Bayesian Optimization scheme. To showcase the robustness of the framework, we applied it to the investigation of adsorption and defect optimization of two distinct systems. Not only were we able to correctly and efficiently identify the optimal adsorption sites of even complex adsorbates, the algorithm showed remarkable accuracy even for systems not present in its training set.

1 Introduction

Adsorption plays an important role in the interaction of nanostructured materials with molecules and ions. These interactions depend on the types of atoms present and their local arrangement. Identifying stable adsorption structures also helps explain electrochemical reactions at metal surfaces [1]. For materials with different compositions or defects, this search becomes more difficult. Changes in the local atomic environment can affect both the preferred adsorption position and the strength of binding. To investigate this, Density functional theory (DFT) is widely used. Mapping the potential energy surface (PES) requires calculations for many molecular positions and orientations [2], a search that can be automated by various tools which help generate, screen, and relax these structures [3, 4]. Other methods examine different parts of the energy landscape. Minima hopping and evolutionary algorithms search for structures with low energies [5, 6]. The nudged elastic band (NEB) method finds minimum energy paths between two energy states [7], while metadynamics explores free energy landscapes [8, 9]. These methods provide useful information, but their computational cost can remain high when each energy evaluation requires a DFT calculation. The cost increases further when several substrate compositions and defect structures are studied.

Machine learning can reduce the number of expensive calculations. It has been applied to many problems in materials research [10, 11, 12]. In atomistic simulations, machine learning models can describe surface

*ioannis.kouroudis@tum.de

†^{\dagger}alessio.gagliardi@tum.de reaction PESs [13] and predict adsorption energies on nanoclusters [14]. Graph neural networks have also been used to predict molecular adsorption energies on metals [15], and learned interatomic potentials can speed up adsorption searches [16]. However, these models need suitable training data. For a new adsorption system, generating enough DFT data can account for much of the total computational cost, often times providing a full system investigation before the model is even trained.

Active learning (AL) and Bayesian optimization (BO) help address this problem by using the available data to choose new calculations. Bayesian models can learn atomic interactions during simulations [17, 18], and uncertainty estimation is also an active area of research for molecular models [19]. Related approaches have been used for crystal structure prediction [20], the optimization of nanoporous materials [21], materials discovery with graph models [22], and catalyst screening through adsorption calculations [23]. Machine learning can also accelerate searches for saddle points and reaction paths [24, 25], as well as stable adsorbate geometries [26].

The choice of structural representation affects how well these methods work. BO has been used to search for molecular conformers by varying torsion angles [27]. The Bayesian Optimization Structure Search (BOSS) framework uses structural coordinates to explore energy landscapes [28]. Its applications include molecular adsorption on surfaces [29] and the search for molecular conformations on metal clusters [30]. These coordinates are useful when the main degrees of freedom can be identified in advance. However, a representation designed for one system may need to be changed when the molecular composition, substrate, or defects change. Learning a representation directly from atomic structures offers a way to handle these differences.

In our previous work, we developed AUGUR to identify adsorption sites by combining a graph neural network, Gaussian process (GP) regression, and BO [31]. AUGUR learns a structural representation through a graph neural network (GNN) and uses it to predict energies and estimate uncertainty via a GP, without requiring manually designed molecular descriptors. A very relevant question however is, how this approach can benefit from knowledge learned on other atomic systems. Such knowledge could reduce the amount of data needed for a new adsorption problem. This is particularly useful when the search includes several compositions or defect types, each with only a limited number of reference calculations.

Pretrained atomic models provide a starting point for this transfer. The MACE architecture [32] has been used to develop foundation models trained on many different structures [33]. The atomic features learned by these models can then be used in new applications. However, pretraining does not guarantee accurate adsorption energies for every system, especially when its chemical environments or reference calculations differ from those used in training. Previous work has shown that adapting a pretrained potential while keeping some parameters fixed can reduce the amount of training data required [34] and even extrapolate to new properties [35]. For adsorption searches, we also need a model that adapts to the available data and estimates uncertainty to guide the choice of new calculations.

To address the above concerns we introduce PYTHIA, which combines a pretrained MACE model, a Transformer, GP regression, and BO. The pretrained MACE provides atomic features that contain relevant descriptors for an adjacent system and property. A Transformer [36] processes these features and produces a representation that has translated the features to the current system. This vector is then used as input for the GP that predicts the adsorption energy and its corresponding uncertainty. During training, the MACE parameters remain fixed, while the Transformer and GP are trained on data from the systems being studied. This allows the model to reuse features learned during pretraining and adapt them to the target energy prediction problem. BO then uses these predictions to select candidate defects and adsorption positions for further electronic structure calculations. This pipeline provides all the benefits of large and complex models, without the usual necessity of large datasets.

We verify PYTHIA on two highly relevant cases, optimizing both the defects of the cluster and the position of the adsorbate simultaneously. The first is the Zn adsorption on a defective Chini cluster. This system is of high interest due to its role in the chemistry of metal carbonyl clusters [37] and their encapsulation properties. The second examines adsorption of formaldehyde on a buckled silicon layer [38, 39]. Formaldehyde is a harmful chemical and silicene is a periodic and complex structure. Therefore the optimization of this system provides both a high environmental impact as well as a heightened complexity. These systems provide different local chemical environments for deep testing of the model. We compare PYTHIA with two baseline models, AUGUR and a fully trained MACE with a GP as a final layer and was found to outperform both by a significant margin showing that it has higher complexity than AUGUR and lower data demand then the full MACE. We also examine the predictions for defect groups not present in the training data and found our model highly accurate. To summarise, we show that PYTHIA combines the high accuracy of complex models at a fraction of the data cost. Additional to the predictions, PYTHIA also provides highly tailored optimization, identifying sites with many times better adsorption energy than present in the training set. With novel materials emerging fast, this data-efficient transferable framework can significantly expedite chemical investigation alleviating the need for time consuming data acquisition.

References (54)