Refining embeddings with fill-tuning: data-efficient generalised performance improvements for materials foundation models

Matthew P. Wilson, Edward O. Pyzer-Knapp, Nicolas Galichet, Luke DicksarXiv 2025 · DOI

Introduction

Foundation models, such as the SELFIES-TED family for chemistry, have revolutionized materials science by learning high-dimensional representations (embeddings) of molecular space from billions of data points. However, these latent spaces are rarely uniform. They often contain "potholes"—regions where the mapping between molecular structure and embedding coordinates is inconsistent or "rough." These inconsistencies lead to poor generalization and model instability.

Traditionally, researchers address these gaps through task-specific fine-tuning. While effective for a single objective (e.g., predicting toxicity), fine-tuning often triggers "catastrophic forgetting," where the model's performance on other tasks degrades. This paper introduces fill-tuning, a method that repairs the structural integrity of the embedding space itself using a remarkably small amount of strategically selected data.

Methodology: Repairing the Latent Landscape

Fill-tuning treats model improvement as a topological repair job. Rather than training on more random data, the authors identify and target the specific regions where the model's understanding is most "frustrated."

  1. Roughness Analysis: Using a frustration metric derived from physics, the researchers probe the latent space for areas where small coordinate shifts result in jagged, disproportionate changes in molecular similarity.
  2. Mapping the Surface: They construct a "kinetic transition network" to map the peaks and valleys of this roughness landscape.
  3. Targeted Sampling: The authors identify the 100 "highest minima"—the most significant potholes—and decode these abstract coordinates back into real molecular strings (SELFIES).
  4. Continued Pretraining: The model undergoes a brief round of additional training using only these 100 difficult examples. Unlike standard fine-tuning, this process is label-agnostic; it aims to smooth the embedding space rather than optimize for a specific property.
Mapping the roughness of the embedding space using a kinetic transition network to identify "potholes" (minima) for targeted sampling.

Experimental Framework

The researchers evaluated fill-tuning using the SELFIES-TED model family (Small, Medium, and Large), which were originally pretrained on up to 8 billion data points from ZINC22 and PubChem. Performance was benchmarked against the MoleculeNet suite, focusing on classification tasks including BACE, BBBP, ClinTox, and HIV.

Strategic Data Selection and Insights

A core finding of the study is that data quality far outweighs data quantity. By adding just 100 points—representing a mere 0.00001% of the original training set—the researchers achieved measurable performance gains.

Visualizations using UMAP (Uniform Manifold Approximation and Projection) reveal why this works: the fill-tuning data points typically reside at the edges of the known training distribution or within internal gaps where data density was previously low. By training on these "edge-case" molecules, the model learns to bridge gaps in its knowledge, leading to better generalization across the entire chemical space.

UMAP visualizations showing that fill-tuning data (orange/red) targets gaps and edges in existing datasets like PubChem and MoleculeNet, effectively "filling" the model's knowledge gaps.

Furthermore, the repairs appear to be transferable. Points identified as problematic for the "Small" model also improved the "Large" model, suggesting that different architectures often struggle with the same complex regions of chemical space.

Results: A Rising Tide Lifts All Boats

Fill-tuning demonstrated a clear advantage over both random sampling and traditional fine-tuning:

  • General Performance Boost: Fill-tuning resulted in an average performance increase of 0.75% to 1% across all downstream tasks simultaneously.
  • Task-Agnostic Success: In the 358M-parameter "Large" model, fill-tuning improved BACE scores by 2.9% and HIV scores by 0.5% at the same time. In contrast, task-specific tuning for BACE typically causes a decline in HIV performance.
  • Efficiency: Continued pretraining with 100 random points often led to a slight performance decrease, confirming that the strategic selection of "frustrated" points is the critical factor in the method's success.

Conclusion and Future Outlook

Fill-tuning offers a highly efficient path for refining foundation models without the trade-offs of catastrophic forgetting. While the current work relies on the ability to decode latent coordinates into SELFIES strings, future research may extend this roughness analysis to multimodal models, such as those combining text with 3D crystal structures. This approach suggests that the next generation of AI in materials science will be defined not just by the size of the dataset, but by the strategic repair of the model's internal map.

Summary updated

BibTeX
@misc{wilson2025refining,
  author = {Matthew P. Wilson and Edward O. Pyzer-Knapp and Nicolas Galichet and Luke Dicks},
  title = {{Refining embeddings with fill-tuning: data-efficient generalised performance improvements for materials foundation models}},
  year = {2025},
  eprint = {2502.13886},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.13886},
}
Figure