Nahual: A Sequence Model for Language and Atoms

Austin Henry Cheng, Marcel Müller, Andreas Burger, Yeonghun Kang, Tsz Wai Ko, Marta Skreta, Luka Mucko, Ella Miray Rajaonson, Cher Tian Ser, Jérôme Florian Gonthier, Alex Zook, Varinia Bernales, Alan Aspuru-GuzikNeurIPS 2026

TL;DR

Chemists speak in natural language, but molecules exist in continuous 3D space—forcing today's AI pipelines to awkwardly glue text-based LLMs onto rigid, task-specific 3D geometry models. Named after a shapeshifting sorcerer from Mesoamerican folklore, NAHUAL bridges this divide as a unified, decoder-only sequence model that natively reads and writes interleaved text and 3D atomic coordinates. With a single set of weights, it tackles 12 diverse chemistry tasks simultaneously, even outperforming specialized state-of-the-art models on crystal structure prediction and conditional molecule generation.

What Problem Does This Paper Address?

If you ask a standard LLM to generate a 3D molecule, it has to spell out Cartesian coordinates digit by digit (like .xyz files). This balloons the context length (roughly 4$\times$ more tokens) and destroys the smooth, continuous nature of 3D space. Conversely, specialized 3D diffusion models (like AlphaFold3 or crystal generators) understand spatial geometry beautifully—often baking in physical symmetries like rotation and permutation equivariance—but they operate on fixed-size inputs/outputs and can't take flexible text prompts.

Just as NLP moved away from bespoke architectures for translation and sentiment analysis toward monolithic LLMs, the authors ask: can a single, generalist decoder-only sequence model unify natural language and 3D atomic generation?

Methods

NAHUAL (~1.6B parameters) treats everything as a single autoregressive stream of hybrid tokens $(a, \boldsymbol{x})$, where $a$ is discrete (a word ID from Qwen3's vocabulary or an atomic number) and $\boldsymbol{x} \in \mathbb{R}^3$ is continuous (zero-padding for words, 3D coordinates for atoms).

Figure 1: NAHUAL processes any sequence of text and 3D molecules via next-token prediction. A token (a, x) has a discrete part a (a word ID or atomic number) and a continuous part x ∈R3 (zero-padding for words, atomic position for atoms). NAHUAL’s general structure allows it to be trained simultaneously on 12 different 3D chemistry tasks.

To generate precise continuous coordinates autoregressively without losing context, the authors introduce next-token diffusion:

  • What's standard: Using an LLM-initialized Mixture-of-Transformers (Stack 1, initialized from Qwen3-0.6B) to process sequences causally and predict the next discrete token, paired with Elucidated Diffusion Models (EDM) to denoise continuous coordinates.
  • What's new: Previous autoregressive diffusion methods either bottlenecked the entire history through a tiny per-token MLP, or trained transformers on noisy past contexts ("Diffusion Forcing"). In next-token diffusion, a second causal transformer stack acts as the denoiser, modulated by per-token adaptive layer normalization (AdaLN). Crucially, it attends to the clean past coordinates while denoising the noisy next coordinate. At inference, this lets NAHUAL use standard LLM KV-caching for past atoms while running a 50-step diffusion ODE only on the newly emitted atom.
Figure 2: Next-token diffusion with NAHUAL. (left) Next-token diffusion provides both the clean current sequence and the noisy next sequence as input. Each token is noised at an independent timestep. (right) The first stack is an LLM-initialized Mixture-of-Transformers (MoT) [34]. It encodes the parallel discrete and continuous stream into hidden states hi+1 and predicts the next discrete token’s logits yi+1. A conditioning stem combines hi+1, the embedding of the predicted next discrete token ai+1, and a Fourier embedding of ti+1 into per-token conditioning vectors zi+1. The second stack is a causal diffusion denoiser modulated by per-token adaptive layer normalization (AdaLN).

Datasets

NAHUAL is trained end-to-end on 1.4M sequences (250M tokens) spanning 12 task families:

  • Small molecules & reactions: Transition1x & RGD1-xTB (transition states), NCIAtlas (noncovalent dimers), LnQM (lanthanide metal complexes), GEOM-DRUGS (conformer ensembles), and QM9 (property prediction & conditional generation).
  • Materials & surfaces: MP-20 (inorganic crystals), Alloy / FG / OCD (adsorption on metal surfaces), ODAC25 (adsorption in porous MOFs), CoRE MOF DB & QMOF (MOF properties), and OC20NEB (10-frame reaction trajectories).
  • New benchmark (QCG-10): Introduced by the authors to test microsolvation—predicting how 1 to 10 explicit water molecules arrange around 7,702 drug-like solutes.

Key Insights and Ideas

  • Generality beats baked-in symmetry: NAHUAL deliberately drops permutation and SE(3) equivariance—long considered sacred in 3D molecular modeling—trading sample efficiency for the sheer flexibility of sequence modeling. Merely changing the text prompt switches the model from solvating drugs to building crystal unit cells.
  • Self-reward at inference time: Because NAHUAL can both generate molecules from properties and predict properties from molecules, it can grade its own homework. Generating 5 candidates and picking the one whose self-predicted property best matches the prompt slashes error by 3.4–5.2$\times$.
  • Expressive denoising matters: Replacing NAHUAL's second transformer stack with a simpler per-token diffusion MLP noticeably degrades accuracy on high-precision 3D tasks like transition states, crystal structures, and microsolvation.
Examples of NAHUAL solving diverse 3D chemistry tasks from text and structural prompts.

Key Results

Trained as a single generalist model, NAHUAL matches or beats specialized baselines across most tasks:

  • Crystal Structure Prediction (MP-20): Achieves a new state-of-the-art MatchRate@20 of 79.5% (vs. 77.9% for specialist DiffCSP) and jumps from 51.5% to 67.1% on single-try MatchRate@1.
  • Conditional Molecule Generation (QM9): With self-reward@5, NAHUAL sets a new state-of-the-art across all six properties (e.g., polarizability EGNN-MAE drops to 0.578 $\text{Bohr}^3$ vs. 1.31 for PropMolFlow; HOMO error drops to 85.0 meV vs. 231 for JODO).
  • Microsolvation (QCG-10) & Complexes (LnQM): Reaches 50.6% Energy within Threshold (vs. 18.6% for a physics-based water-box cutout baseline) and 73.3% graph connectivity match on lanthanide complexes (vs. 10.2% for Architector).
  • Conformer Search (GEOM-DRUGS): Achieves 95.4% median coverage ([email protected] Å), beating DMT-L (92.3%) and Torsional Diffusion while staying coherent up to 2,000 tokens.

Limitations and Future Work

  • Catastrophic forgetting: Because each task used a rigid prompt template without general text data mixed in, NAHUAL forgot general natural language and learned task schemas instead.
  • Long-range & numerical hiccups: Beyond ~500 atoms, long-range spatial correlations degrade, occasionally causing steric clashes (overlapping atoms). Additionally, predicting numerical properties as text digits lags behind dedicated continuous regression heads.
  • Inference cost: Running a 50-step diffusion ODE through a 24-layer transformer for every single atom makes generation much slower than specialized one-shot baselines.

For future work, the authors point toward mixing in instruction-following text data, adopting few-step diffusion distillation to speed up sampling, adding continuous number heads, and leveraging physics simulators as verifiers for reinforcement learning (RLVR) and multimodal chain-of-thought reasoning.

Summary updated

Abstract

Generative models play a rapidly growing role in the design and simulation of molecules. The most widely used applications of generative models are in large language models (LLMs), owing to the natural flexibility of language for specifying and answering queries. However, generalist LLMs do not effectively handle large sets of 3D coordinates, whereas specialist generative models of 3D molecules cannot reach the controllability afforded by language. To bridge these capabilities, we propose Nahual, a decoder-only autoregressive diffusion model for any sequence of text and 3D molecules. To enable expressive autoregression on continuous coordinates, we propose next-token diffusion, whereby a standard causal transformer backbone is grounded in the clean current sequence while denoising the next sequence. We train Nahual on a curated set of twelve 3D chemistry tasks ranging from microsolvation to molecular conformer search to adsorption on metal surfaces, with associated evaluation metrics and baselines. The result is a single set of end-to-end-trained weights that simultaneously performs all tasks and surpasses state-of-the-art models specialized for crystal structure prediction and property-conditional molecule generation. Our results demonstrate the viability of scaling generalist decoder-only models for native multimodal understanding and generation across language and chemistry. Code is available at https://github.com/the-matter-lab/nahual.
BibTeX
@inproceedings{cheng2026nahual,
  author = {Austin Henry Cheng and Marcel Müller and Andreas Burger and Yeonghun Kang and Tsz Wai Ko and Marta Skreta and Luka Mucko and Ella Miray Rajaonson and Cher Tian Ser and Jérôme Florian Gonthier and Alex Zook and Varinia Bernales and Alan Aspuru-Guzik},
  title = {{Nahual: A Sequence Model for Language and Atoms}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=H8Gx6rCmHV},
}
Figure