# 联结树变分自编码器

联结树变分自编码器（Junction Tree Variational Autoencoder，简称JT-VAE或JTVAE）是一种生成模型，它首先生成化学子结构上的树状骨架，然后通过图消息传递网络将这些子结构组装成完整的分子，从而生成化学上有效的分子图。该模型由麻省理工学院计算机科学与人工智能实验室（MIT CSAIL）的翁文广（Wengong Jin）、雷吉娜·巴尔齐莱（Regina Barzilay）和托米·亚科拉（Tommi Jaakkola）提出，论文于2018年2月12日提交至arXiv，并在ICML 2018上发表。<sup>[1](https://arxiv.org/abs/1802.04364)</sup><sup> • </sup><sup>[2](https://proceedings.mlr.press/v80/jin18a/jin18a.pdf)</sup>

| 关键事实 | 详情 |
|---|---|
| 起源 | 翁文广、雷吉娜·巴尔齐莱、托米·亚科拉，MIT CSAIL；arXiv 2018年2月12日，ICML 2018<sup>[1](https://arxiv.org/abs/1802.04364)</sup><sup> • </sup><sup>[2](https://proceedings.mlr.press/v80/jin18a/jin18a.pdf)</sup> |
| 核心思想 | 分子被分解为一棵联结树，其节点是有效的化学子结构（环、官能团、原子）；生成过程先构建骨架，再进行图组装<sup>[2](https://proceedings.mlr.press/v80/jin18a/jin18a.pdf)</sup><sup> • </sup><sup>[3](https://github.com/wengong-jin/icml18-jtnn)</sup> |
| 有效性 | 从先验分布采样时，该模型生成的分子100%化学有效，显著优于基于SMILES的顶级基线<sup>[2](https://proceedings.mlr.press/v80/jin18a/jin18a.pdf)</sup> |
| 潜在空间 | 原始配置中维度为56，分为28维的树表示和28维的图表示<sup>[2](https://proceedings.mlr.press/v80/jin18a/jin18a.pdf)</sup> |
| 性质优化 | 在发现具有目标性质的分子方面，相对基线取得30%的相对提升<sup>[2](https://proceedings.mlr.press/v80/jin18a/jin18a.pdf)</sup> |
| MOSES基准 | 有效性1.000，唯一性1.000，新颖性0.914，Fréchet ChemNet距离1.068<sup>[4](https://academic.oup.com/view-large/562408627)</sup> |
| 主要局限 | 为小分子设计；无法处理大型化合物结构，且两个具有相同联结树的分子可能具有显著不同的性质<sup>[5](https://www.nature.com/articles/s42004-023-01054-6)</sup><sup> • </sup><sup>[6](https://academic.oup.com/bib/article/22/6/bbab344/6355420)</sup> |

## 动机与起源

该模型解决的是直接生成分子图的问题，而非生成线性SMILES（用于描述分子结构的文本字符串表示法）字符串再转换为图。早期用于分子的变分自编码器，如字符变分自编码器（Character VAE，CVAE）、语法变分自编码器（Grammar VAE，GVAE）和语法导向变分自编码器（Syntax-directed VAE，SD-VAE），逐字符或在语法约束下生成SMILES字符串，而GraphVAE则直接生成原子标签和邻接矩阵。基于字符串的生成可能经过化学上无效的中间状态，逐节点生成图也有同样的弱点。<sup>[2](https://proceedings.mlr.press/v80/jin18a/jin18a.pdf)</sup>

JT-VAE则不同，它将每个分子解释为由从有效组件词汇表中选择的子图构建而成，这些组件通过分解训练集中的分子提取。联结树算法将包含环的分子图转换为树表示，这种表示不一定唯一；树的每个节点是一个具有固定空间形状的化学子结构。<sup>[2](https://proceedings.mlr.press/v80/jin18a/jin18a.pdf)</sup><sup> • </sup><sup>[7](https://link.springer.com/article/10.1186/s13321-023-00681-4)</sup><sup> • </sup><sup>[18](https://proceedings.mlr.press/v80/jin18a/jin18a-supp.pdf)</sup>

## 架构

该模型将变分自编码器扩展到分子图，配备匹配的编码器和解码器，同时作用于两种表示。<sup>[2](https://proceedings.mlr.press/v80/jin18a/jin18a.pdf)</sup>

**编码。** 图消息传递网络对分子图进行编码，另一个编码器处理联结树，产生两个潜在向量，一个用于树骨架，一个用于图。在原始配置中，潜在空间为56维，其中28维用于树，28维用于图。<sup>[2](https://proceedings.mlr.press/v80/jin18a/jin18a.pdf)</sup>

**解码。** 生成分两个阶段进行。首先，解码器生成化学子结构上的树状骨架，在每个节点放置一个有效片段。其次，图解码器预测联结树各簇之间的细粒度连接关系，在相交组件之间添加键以实现完整的分子图。由于每一步组装的都是已知有效的子结构而非逐个原子，化学有效性在整个解码过程中得以保持。<sup>[2](https://proceedings.mlr.press/v80/jin18a/jin18a.pdf)</sup><sup> • </sup><sup>[8](https://pmc.ncbi.nlm.nih.gov/articles/PMC10879372/)</sup>

训练使用复合损失，包含预测簇标签（词损失）、预测联结树拓扑（拓扑损失）、组装分子子图（组装损失）以及近似后验与先验之间的KL散度（KL损失）等分量。<sup>[9](https://pubs.acs.org/acsodf/article/9/47/47180/409495/Discovery-of-Vascular-Endothelial-Growth-Factor)</sup>

## 性能

在原始评估中，该模型与基于SMILES的基线CVAE、GVAE和SD-VAE以及用于分子生成的GraphVAE进行了比较。重建准确率通过将每个分子编码10次并对每个编码解码10次来估计；有效性通过从先验中抽取1,000个潜在向量各解码100次并用RDKit检查输出来衡量。JT-VAE从先验中生成了100%有效的分子，并在发现具有目标性质的分子方面相对基线取得30%的相对提升。<sup>[2](https://proceedings.mlr.press/v80/jin18a/jin18a.pdf)</sup>

在MOSES基准上（其分子取自ZINC20数据库），联结树VAE在有效性和唯一性上得分1.000，在新颖性上得分0.914，Fréchet ChemNet距离为1.068；后来的模型如[GraphAF](https://www.edgepedia.org/zh/graphaf)和基于扩散的生成器在FCD等分布指标上超越了它，但有效性得分仍低于它。<sup>[4](https://academic.oup.com/view-large/562408627)</sup> 对七种生成架构的系统评估发现，基于图的模型——特别是联结树VAE和约束图VAE（Constrained Graph VAE）——在保持化学有效性和类药性方面优于基于字符串的对应模型，尤其在ZINC等复杂数据集上。<sup>[10](https://lacuna.tiptreesystems.com/work/a-systematic-assessment-of-deep-learning-models)</sup>

## 应用

连续的潜在空间使该模型成为分子设计中搜索和优化方法的常用基础。

**药物发现流程。** 在一个FLT3抑制剂工作流中，从预训练JTVAE的潜在空间采样的化合物用AutoDock Vina针对靶标和从PoSSuM数据库识别的同源脱靶口袋进行评分，然后使用贝叶斯优化探索潜在空间，其目标函数奖励靶标结合并惩罚脱靶结合；该框架预测出的分子具有与临床批准的FLT3药物相当的亲和力和选择性。<sup>[11](https://pubs.acs.org/doi/10.1021/acs.jctc.3c01224)</sup> 一项VEGFR-2抑制剂发现研究在MOSES训练集的1,584,663个分子上训练VAE，并将其与[贝叶斯优化](https://www.edgepedia.org/zh/bayesian-optimization)和梯度上升相结合。<sup>[9](https://pubs.acs.org/acsodf/article/9/47/47180/409495/Discovery-of-Vascular-Endothelial-Growth-Factor)</sup> JAEGER项目在JT-VAE上构建了生成建模方法，用于设计抑制疟疾的化合物，并通过诺华Profile-QSAR项目（基于12,000项检测的多任务生物活性模型）优先筛选候选物进行合成。<sup>[12](https://client.prod.orp.cambridge.org/engage/chemrxiv/article-details/60f5d0b888044385cfe22cdc)</sup> 在多目标从头设计中，JTVAE已被集成到数据驱动框架中，为多目标进化算法提供潜在表示空间，同时优化结合亲和力评分、合成可及性和logP。<sup>[13](https://www.frontiersin.org/journals/chemistry/articles/10.3389/fchem.2023.1288626/full)</sup>

**材料发现。** 一个用于发现蓝色OLED器件三线态-三线态融合材料的工作流比较了多种深度生成模型，并选择JT-VAE的修改版本作为最佳模型，原因是其在编码和解码环状片段方面的卓越能力，这对具有分布式π电子轨道的分子至关重要。<sup>[14](https://www.frontiersin.org/journals/chemistry/articles/10.3389/fchem.2021.800133/pdf)</sup> 一个在ZINC上预训练的基于JT-VAE的模型与在QM9 HOMO值上训练的回归模型相结合，支持在单一潜在空间中进行性质预测、生成具有预定义性质的分子以及向目标性质进行结构修饰。<sup>[7](https://link.springer.com/article/10.1186/s13321-023-00681-4)</sup>

## 局限与后继工作

保证有效性的树分解也约束了模型所能表示的内容。JT-VAE为小分子设计，无法处理具有高空间序的大型化合物结构；分层变分自编码器（Hierarchical VAE，HierVAE）的开发是为了通过在相对较大的片段单元上工作，将VAE方法应用于更大的结构。<sup>[5](https://www.nature.com/articles/s42004-023-01054-6)</sup> 联结树表示也会丢失信息：两个具有相同联结树的分子可能对应显著不同的性质，这使得性质优化更加困难。<sup>[6](https://academic.oup.com/bib/article/22/6/bbab344/6355420)</sup> 该领域的评论者指出，该模型需要额外工作来学习树结构的编码以及将潜在变量解码回新树，与后来的方法相比，在分子生成方面效率不高。<sup>[8](https://pmc.ncbi.nlm.nih.gov/articles/PMC10879372/)</sup>

原作者在GitHub上发布了官方实现（Python 2.7、PyTorch、RDKit），随后在`fast_jtnn`目录中发布了加速版本，之后又推出了后继仓库`hgraph2graph`，其中包含一个在180万个ChEMBL化合物上预训练的分子语言模型，用于性质引导生成。<sup>[3](https://github.com/wengong-jin/icml18-jtnn)</sup> 后来的工作扩展了框架本身，包括添加提取器模块来描述分子性质的可控联结树VAE（Controllable Junction Tree VAE），以及用于分子性质预测的半监督变体。<sup>[15](https://arxiv.org/abs/2202.06794)</sup><sup> • </sup><sup>[16](https://arxiv.org/abs/2208.05119)</sup> 尽管有这些后继工作，近期的综述将JT-VAE描述为一个基础性模型，它塑造了化学空间探索和优化的方式，特别是在骨架控制生成和先导化合物精细调优方面。<sup>[17](https://www.tandfonline.com/doi/pdf/10.1080/17460441.2026.2636192)</sup>

## References

1. [Jin, Barzilay, Jaakkola (2018). Junction Tree Variational Autoencoder for Molecular Graph Generation. arXiv:1802.04364.](https://arxiv.org/abs/1802.04364)
2. [Jin, Barzilay, Jaakkola (2018). Junction Tree Variational Autoencoder for Molecular Graph Generation. ICML 2018, PMLR 80.](https://proceedings.mlr.press/v80/jin18a/jin18a.pdf)
3. [wengong-jin/icml18-jtnn, official implementation, GitHub.](https://github.com/wengong-jin/icml18-jtnn)
4. [MOSES benchmark results table, Briefings in Bioinformatics.](https://academic.oup.com/view-large/562408627)
5. [Ochiai et al. (2023). Variational autoencoder-based chemical latent space for large molecular structures with 3D complexity. Communications Chemistry 6:249.](https://www.nature.com/articles/s42004-023-01054-6)
6. [Cheng et al. (2021). Molecular design in drug discovery: a comprehensive review of deep generative models. Briefings in Bioinformatics 22(6):bbab344.](https://academic.oup.com/bib/article/22/6/bbab344/6355420)
7. [Kondratyev et al. (2023). Generative model based on junction tree variational autoencoder for HOMO value prediction and molecular optimization. Journal of Cheminformatics 15:11.](https://link.springer.com/article/10.1186/s13321-023-00681-4)
8. [Generative artificial intelligence in drug discovery: basic framework, recent advances, challenges, and opportunities. PMC10879372.](https://pmc.ncbi.nlm.nih.gov/articles/PMC10879372/)
9. [Discovery of Vascular Endothelial Growth Factor Receptor 2 Inhibitors Employing Junction Tree Variational Autoencoder with Bayesian Optimization and Gradient Ascent. ACS Omega 9(47):47180.](https://pubs.acs.org/acsodf/article/9/47/47180/409495/Discovery-of-Vascular-Endothelial-Growth-Factor)
10. [Rigoni, Navarin, Sperduti (2020). A Systematic Assessment of Deep Learning Models for Molecule Generation. ESANN 2020.](https://lacuna.tiptreesystems.com/work/a-systematic-assessment-of-deep-learning-models)
11. [Bayesian Optimization in the Latent Space of a Variational Autoencoder for the Generation of Selective FLT3 Inhibitors. Journal of Chemical Theory and Computation.](https://pubs.acs.org/doi/10.1021/acs.jctc.3c01224)
12. [Godinez et al. (2021). JAEGER – Hunting for Antimalarials with Generative Chemistry. Cambridge Open Engage.](https://client.prod.orp.cambridge.org/engage/chemrxiv/article-details/60f5d0b888044385cfe22cdc)
13. [Multi- and many-objective optimization: present and future in de novo drug design. Frontiers in Chemistry 11 (2023).](https://www.frontiersin.org/journals/chemistry/articles/10.3389/fchem.2023.1288626/full)
14. [Yakubovich et al. (2021). Computational Discovery of TTF Molecules with Deep Generative Models. Frontiers in Chemistry 9:800133.](https://www.frontiersin.org/journals/chemistry/articles/10.3389/fchem.2021.800133/pdf)
15. [Disentangle VAE for Molecular Generation. arXiv:2202.06794.](https://arxiv.org/abs/2202.06794)
16. [Semi-Supervised Junction Tree Variational Autoencoder for Molecular Property Prediction. arXiv:2208.05119.](https://arxiv.org/abs/2208.05119)
17. [Deep generative molecular design and its value in modern drug discovery. Expert Opinion on Drug Discovery.](https://www.tandfonline.com/doi/pdf/10.1080/17460441.2026.2636192)
18. [proceedings.mlr.press](https://proceedings.mlr.press/v80/jin18a/jin18a-supp.pdf)

---
*Initially written Oct 22, 2026*

Topic: 技术与人造世界 › 计算技术与数字系统 › 人工智能与数据 › Machine learning and neural computation › Neural networks and deep learning › Neural network architectures › Generative adversarial and variational architectures

Copyright 2026 Edgepedia

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license

Source: https://www.edgepedia.org/zh/junction-tree-vae

English original: https://www.edgepedia.org/junction-tree-vae
