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).
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.
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.
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