All models

T5Chem

T5Chem is a T5 encoder-decoder that reads reaction SMILES with a task prompt and predicts reaction outcomes.

Molecules, proteins and genomics · 538 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (27 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
14.7M
Operations
538
Framework
PyTorch
Recurrent
No
Published
2022, Journal of Chemical Information and Modeling
Cited by
129 (as of 29 October 2026)
Authors
Jieyu Lu, Yingkai Zhang
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m20714
Graph hash
e43104fbd32df1abeb11e5879ab3eeaf18dc534344c0d1ae255c2024affe67c7
Skeleton hash
3cd5fbc1d40135b970dca15860c137f5ed40e648863e02ff8eb398e2e0019506
Architecture hash
bdcbbd771e7e8a9126c7f0266b90d40ccb732ae1eb305388ee1f8b38f5354d7a
Diagram SHA-256
9c0ff108106864f398d6b0e529eef4de276b460d7320d3902ac40dbca9c22402
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

T5Chem is a single model for a variety of chemical reaction prediction tasks, built by adapting the Text-to-Text Transfer Transformer (T5) from natural language processing. The paper sets it against the usual practice of developing task-specific models for distinct reaction prediction tasks.

Reactions enter as SMILES strings, split by character-level tokenization into single letters, digits or special symbols. A task-specific prompt, an English word added to the vocabulary as a special token, tells the model which task to perform. The original T5 output layer is replaced by three kinds of head, for molecular generation, classification and regression. This model uses the molecular generation head, which serves the sequence to sequence tasks such as reaction product prediction.

For all tasks T5Chem uses an encoder and decoder with 4 layers and 8 attention heads and a hidden dimension of 256. It was pre-trained on 97 million molecules from Pubchem and then fine-tuned on supervised downstream tasks. The paper also introduces USPTO_500_MT, a multi-task dataset for training and testing five types of reaction tasks. The README strongly recommends fine-tuning from a pre-trained model and says its sample run reaches about 70% top-1 accuracy with pretraining but only 0.1% when trained from scratch.

Key idea. T5Chem adapts the T5 text-to-text framework into one model for several chemical reaction prediction tasks, selected by task-specific prompts and three kinds of output head.

  • T5Chem
  • T5 for chemistry
  • reaction prediction
  • retrosynthesis
  • SMILES
  • reaction yield prediction
  • reaction type classification
  • multi-task reaction prediction
  • USPTO_500_MT

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@article{Lu_2022, title={Unified Deep Learning Model for Multitask Reaction Predictions with Explanation}, volume={62}, ISSN={1549-960X}, url={http://dx.doi.org/10.1021/acs.jcim.1c01467}, DOI={10.1021/acs.jcim.1c01467}, number={6}, journal={Journal of Chemical Information and Modeling}, publisher={American Chemical Society (ACS)}, author={Lu, Jieyu and Zhang, Yingkai}, year={2022}, month=Mar, pages={1376–1387} }