Papers
Topics
Authors
Recent
Search
2000 character limit reached

BatmanNet: Bi-branch Molecular Pretraining

Updated 16 July 2026
  • BatmanNet is a self-supervised molecular representation learning framework that uses a bi-branch masked graph transformer autoencoder to reconstruct heavily masked 2D molecular graphs.
  • It employs complementary node and edge branches to capture both local atomic context and global molecular structure from partially observed data.
  • BatmanNet achieves state-of-the-art performance on diverse downstream tasks with significant efficiency gains from its unified pretraining objective and compact architecture.

Searching arXiv for papers explicitly using the term "BatmanNet" and closely related molecular representation work. BatmanNet is a self-supervised molecular representation learning framework for AI-driven drug discovery that addresses the problem of effective molecular pretraining when labeled molecules are insufficient. It is formulated as a bi-branch masked graph transformer autoencoder in which complementary node and edge branches reconstruct heavily masked molecular graphs, with the stated aim of learning both local and global molecular information through a single unified pretraining objective rather than multiple complex self-supervised tasks or very large pretraining regimes (Wang et al., 2022).

1. Definition and problem setting

BatmanNet was introduced in the context of graph-based molecular pretraining, where substantial efforts had already been made using graph neural networks for AI-driven drug discovery, but effective molecular representation learning remained open, especially under label scarcity. The motivating critique is twofold: prior molecular self-supervised methods often required multiple complex tasks and extra chemical knowledge such as motifs, subgraphs, descriptors, or $3$D geometry, and large transformer architectures were computationally expensive and difficult to pre-train end-to-end (Wang et al., 2022).

The framework is organized around a masked reconstruction problem on molecular graphs. Rather than predicting a limited set of atom or bond labels, BatmanNet reconstructs missing nodes and missing edges from a partially observed molecular graph. The paper presents this as a simpler yet stronger pretraining strategy: the graph is heavily masked, the encoder is exposed only to the visible portion, and reconstruction is delegated to a lightweight decoder. This suggests a design philosophy closer to representation recovery than to auxiliary-task accumulation.

The intended scientific scope is broad within molecular informatics. BatmanNet is evaluated on molecular property prediction, drug-drug interaction, and drug-target interaction. The reported premise is that a single pretraining framework should transfer across these downstream tasks without requiring task-specific chemical heuristics during pretraining (Wang et al., 2022).

2. Bi-branch architecture and graph representation

BatmanNet has two asymmetric but complementary branches. The node branch operates on a node graph GN=(V,E)G_N=(V,E), where atoms are nodes and bonds are edges. The edge branch operates on a dual edge graph GEG_E, with emphasis on relationships among edges and on bond-centric context. The node branch is intended to capture local atomic context and neighborhood structure, while the edge branch captures complementary relational information centered on bonds (Wang et al., 2022).

Both branches use the same general transformer-style GNN-Attention block. In the preliminaries, the graph encoder is written as

mv(k)=AGG(k)({(hv(k1),hu(k1),euv)uNv}),\mathbf{m}_{v}^{(k)}=\operatorname{AGG}^{(k)}\left(\left\{\left(\mathbf{h}_{v}^{(k-1)},\mathbf{h}_{u}^{(k-1)}, \mathbf{e}_{uv}\right)\mid u \in \mathcal{N}_{v}\right\}\right),

hv(k)=σ(W(k)mv(k)+b(k)),\mathbf{h}_{v}^{(k)}=\sigma\left(\mathbf{W}^{(k)}\mathbf{m}_{v}^{(k)}+\mathbf{b}^{(k)}\right),

and graph-level aggregation is written as

hG=READOUT({hv(K)vV}).\mathbf{h}_{G}=\operatorname{READOUT}\left(\left\{\mathbf{h}_{v}^{(K)} \mid v \in \mathcal{V} \right\}\right).

Within each GNN-Attention block, local message passing and global self-attention are fused by first computing

Q=GQ(H),K=GK(H),V=GV(H),\mathbf{Q}= \mathbf{G}_{\mathbf{Q}}(\mathbf{H}), \quad \mathbf{K}= \mathbf{G}_{\mathbf{K}}(\mathbf{H}), \quad \mathbf{V}= \mathbf{G}_{\mathbf{V}}(\mathbf{H}),

where GQ,GK,GV\mathbf{G}_{\mathbf{Q}}, \mathbf{G}_{\mathbf{K}}, \mathbf{G}_{\mathbf{V}} are GNNs applied to hidden states HRn×d\mathbf{H}\in\mathbb{R}^{n\times d} (Wang et al., 2022).

The encoder begins by projecting atom and bond features and adding absolute sinusoidal positional encodings. Nodes and edges are indexed by RDKit before masking. Long-range residual connections from the initial features are added to mitigate vanishing gradients and oversmoothing. The reported configuration uses $6$ encoder blocks and GN=(V,E)G_N=(V,E)0 decoder blocks, with each block containing GN=(V,E)G_N=(V,E)1 GNN layers and GN=(V,E)G_N=(V,E)2 attention heads. The model is described as relatively compact, with about GN=(V,E)G_N=(V,E)3 million parameters, and the reported pretraining regime on ZINC-250K required two days on a single RTX3090 (Wang et al., 2022).

A distinctive implementation detail is the directed masking scheme for edges. BatmanNet treats GN=(V,E)G_N=(V,E)4 and GN=(V,E)G_N=(V,E)5 as different, so removing one direction does not remove the other; to distinguish these directed edges, the feature of the head node is added to the initial edge feature. This is a bond-level asymmetry, not merely a duplication of node-space masking (Wang et al., 2022).

3. Masked autoencoding objective and optimization

The self-supervised task is a masked graph reconstruction problem in both branches. For each molecule, BatmanNet randomly masks a high proportion of nodes and edges, and the best setting reported in the study is GN=(V,E)G_N=(V,E)6 masking in both branches. The encoder processes only the visible, unmasked subgraph. The decoder then receives the latent representations of visible parts together with learned mask tokens for the missing parts and reconstructs the original molecular graph in its original order through positional restoration (Wang et al., 2022).

The asymmetry between encoder and decoder is central. The encoder sees only the visible subset, whereas the full graph is processed only by the smaller decoder. The paper states that this reduces computation and memory significantly. Compared with approaches that use motifs or subgraphs as explicit targets, BatmanNet uses a single unified objective; compared with GraphMAE, it does not simply replace masked nodes with descriptors but directly removes masked parts and reconstructs them in both node and edge spaces. The paper characterizes this as a harder task that yields stronger molecular representations (Wang et al., 2022).

The total pretraining loss is defined as

GN=(V,E)G_N=(V,E)7

The reconstruction targets are high-dimensional atom and bond feature vectors rather than small categorical labels. The atom features include atom type, number of hydrogens, charge, chirality, and aromaticity; bond features include bond type and stereo configuration. This choice is motivated by the ambiguity of earlier objectives that predicted only atom or bond types (Wang et al., 2022).

The reported pretraining dataset is ZINC-250K, split GN=(V,E)G_N=(V,E)8 into train and validation. Optimization uses Adam with Noam scheduling, batch size GN=(V,E)G_N=(V,E)9, hidden size GEG_E0, GEG_E1 encoder blocks, GEG_E2 decoder blocks, GEG_E3 heads, and mask ratio GEG_E4. The pretraining learning rate starts at GEG_E5, warms up to GEG_E6, and decays to GEG_E7. The paper further notes that lower masking ratios are easier and worse, whereas higher masking ratios leave too little information for reconstruction (Wang et al., 2022).

4. Downstream adaptation and benchmark performance

After pretraining, only the encoder is retained for downstream tasks. Both branches output node embeddings, which are pooled using a self-attentive readout:

GEG_E8

For downstream fine-tuning, the framework uses branch-specific predictions and adds a disagreement penalty between node-branch and edge-branch outputs:

GEG_E9

This penalty is intended to encourage consistency between the two views during supervised learning (Wang et al., 2022).

The downstream evaluation spans molecular property prediction, drug-drug interaction, and drug-target interaction. Molecular property prediction is tested on MoleculeNet datasets including BACE, BBBP, ClinTox, SIDER, Tox21, ToxCast, FreeSolv, ESOL, and Lipo, with supplementary experiments also on HIV and MUV. The reported split for these tasks is scaffold splitting mv(k)=AGG(k)({(hv(k1),hu(k1),euv)uNv}),\mathbf{m}_{v}^{(k)}=\operatorname{AGG}^{(k)}\left(\left\{\left(\mathbf{h}_{v}^{(k-1)},\mathbf{h}_{u}^{(k-1)}, \mathbf{e}_{uv}\right)\mid u \in \mathcal{N}_{v}\right\}\right),0, explicitly targeting out-of-distribution generalization. Drug-drug interaction is evaluated on BIOSNAP and TWOSIDES. Drug-target interaction is evaluated on Human and C. elegans datasets using the Tsubaki framework with BatmanNet as the molecular encoder (Wang et al., 2022).

The paper reports state-of-the-art performance across multiple tasks. On the mv(k)=AGG(k)({(hv(k1),hu(k1),euv)uNv}),\mathbf{m}_{v}^{(k)}=\operatorname{AGG}^{(k)}\left(\left\{\left(\mathbf{h}_{v}^{(k-1)},\mathbf{h}_{u}^{(k-1)}, \mathbf{e}_{uv}\right)\mid u \in \mathcal{N}_{v}\right\}\right),1 benchmark molecular property datasets in the main table, BatmanNet achieves state-of-the-art on mv(k)=AGG(k)({(hv(k1),hu(k1),euv)uNv}),\mathbf{m}_{v}^{(k)}=\operatorname{AGG}^{(k)}\left(\left\{\left(\mathbf{h}_{v}^{(k-1)},\mathbf{h}_{u}^{(k-1)}, \mathbf{e}_{uv}\right)\mid u \in \mathcal{N}_{v}\right\}\right),2 out of mv(k)=AGG(k)({(hv(k1),hu(k1),euv)uNv}),\mathbf{m}_{v}^{(k)}=\operatorname{AGG}^{(k)}\left(\left\{\left(\mathbf{h}_{v}^{(k-1)},\mathbf{h}_{u}^{(k-1)}, \mathbf{e}_{uv}\right)\mid u \in \mathcal{N}_{v}\right\}\right),3; in the supplementary evaluation following GEM’s setting, it achieves state-of-the-art on mv(k)=AGG(k)({(hv(k1),hu(k1),euv)uNv}),\mathbf{m}_{v}^{(k)}=\operatorname{AGG}^{(k)}\left(\left\{\left(\mathbf{h}_{v}^{(k-1)},\mathbf{h}_{u}^{(k-1)}, \mathbf{e}_{uv}\right)\mid u \in \mathcal{N}_{v}\right\}\right),4 out of mv(k)=AGG(k)({(hv(k1),hu(k1),euv)uNv}),\mathbf{m}_{v}^{(k)}=\operatorname{AGG}^{(k)}\left(\left\{\left(\mathbf{h}_{v}^{(k-1)},\mathbf{h}_{u}^{(k-1)}, \mathbf{e}_{uv}\right)\mid u \in \mathcal{N}_{v}\right\}\right),5 datasets. On BIOSNAP DDI, the reported scores are AUC-ROC mv(k)=AGG(k)({(hv(k1),hu(k1),euv)uNv}),\mathbf{m}_{v}^{(k)}=\operatorname{AGG}^{(k)}\left(\left\{\left(\mathbf{h}_{v}^{(k-1)},\mathbf{h}_{u}^{(k-1)}, \mathbf{e}_{uv}\right)\mid u \in \mathcal{N}_{v}\right\}\right),6, PR-AUC mv(k)=AGG(k)({(hv(k1),hu(k1),euv)uNv}),\mathbf{m}_{v}^{(k)}=\operatorname{AGG}^{(k)}\left(\left\{\left(\mathbf{h}_{v}^{(k-1)},\mathbf{h}_{u}^{(k-1)}, \mathbf{e}_{uv}\right)\mid u \in \mathcal{N}_{v}\right\}\right),7, and F1 mv(k)=AGG(k)({(hv(k1),hu(k1),euv)uNv}),\mathbf{m}_{v}^{(k)}=\operatorname{AGG}^{(k)}\left(\left\{\left(\mathbf{h}_{v}^{(k-1)},\mathbf{h}_{u}^{(k-1)}, \mathbf{e}_{uv}\right)\mid u \in \mathcal{N}_{v}\right\}\right),8. On TWOSIDES, the reported precision/recall/F1 is mv(k)=AGG(k)({(hv(k1),hu(k1),euv)uNv}),\mathbf{m}_{v}^{(k)}=\operatorname{AGG}^{(k)}\left(\left\{\left(\mathbf{h}_{v}^{(k-1)},\mathbf{h}_{u}^{(k-1)}, \mathbf{e}_{uv}\right)\mid u \in \mathcal{N}_{v}\right\}\right),9. On DTI, the reported scores are precision hv(k)=σ(W(k)mv(k)+b(k)),\mathbf{h}_{v}^{(k)}=\sigma\left(\mathbf{W}^{(k)}\mathbf{m}_{v}^{(k)}+\mathbf{b}^{(k)}\right),0, recall/precision-like metric hv(k)=σ(W(k)mv(k)+b(k)),\mathbf{h}_{v}^{(k)}=\sigma\left(\mathbf{W}^{(k)}\mathbf{m}_{v}^{(k)}+\mathbf{b}^{(k)}\right),1, and AUC hv(k)=σ(W(k)mv(k)+b(k)),\mathbf{h}_{v}^{(k)}=\sigma\left(\mathbf{W}^{(k)}\mathbf{m}_{v}^{(k)}+\mathbf{b}^{(k)}\right),2 on Human, and hv(k)=σ(W(k)mv(k)+b(k)),\mathbf{h}_{v}^{(k)}=\sigma\left(\mathbf{W}^{(k)}\mathbf{m}_{v}^{(k)}+\mathbf{b}^{(k)}\right),3, hv(k)=σ(W(k)mv(k)+b(k)),\mathbf{h}_{v}^{(k)}=\sigma\left(\mathbf{W}^{(k)}\mathbf{m}_{v}^{(k)}+\mathbf{b}^{(k)}\right),4, and hv(k)=σ(W(k)mv(k)+b(k)),\mathbf{h}_{v}^{(k)}=\sigma\left(\mathbf{W}^{(k)}\mathbf{m}_{v}^{(k)}+\mathbf{b}^{(k)}\right),5 on C. elegans (Wang et al., 2022).

A further empirical point concerns scale-efficiency. BatmanNet is reported to perform strongly despite using about hv(k)=σ(W(k)mv(k)+b(k)),\mathbf{h}_{v}^{(k)}=\sigma\left(\mathbf{W}^{(k)}\mathbf{m}_{v}^{(k)}+\mathbf{b}^{(k)}\right),6 million pretraining molecules and hv(k)=σ(W(k)mv(k)+b(k)),\mathbf{h}_{v}^{(k)}=\sigma\left(\mathbf{W}^{(k)}\mathbf{m}_{v}^{(k)}+\mathbf{b}^{(k)}\right),7 million parameters, versus baselines such as GROVERbase with hv(k)=σ(W(k)mv(k)+b(k)),\mathbf{h}_{v}^{(k)}=\sigma\left(\mathbf{W}^{(k)}\mathbf{m}_{v}^{(k)}+\mathbf{b}^{(k)}\right),8 million molecules and hv(k)=σ(W(k)mv(k)+b(k)),\mathbf{h}_{v}^{(k)}=\sigma\left(\mathbf{W}^{(k)}\mathbf{m}_{v}^{(k)}+\mathbf{b}^{(k)}\right),9 million parameters, GROVERlarge with hG=READOUT({hv(K)vV}).\mathbf{h}_{G}=\operatorname{READOUT}\left(\left\{\mathbf{h}_{v}^{(K)} \mid v \in \mathcal{V} \right\}\right).0 million parameters, MPG with hG=READOUT({hv(K)vV}).\mathbf{h}_{G}=\operatorname{READOUT}\left(\left\{\mathbf{h}_{v}^{(K)} \mid v \in \mathcal{V} \right\}\right).1 million parameters, and GEM with hG=READOUT({hv(K)vV}).\mathbf{h}_{G}=\operatorname{READOUT}\left(\left\{\mathbf{h}_{v}^{(K)} \mid v \in \mathcal{V} \right\}\right).2 million molecules. This suggests that the performance gains are not solely a consequence of larger-scale pretraining (Wang et al., 2022).

5. Ablations, efficiency claims, and interpretive significance

The ablation results are used to support the architectural claims. Removing either branch hurts performance, and the full bi-branch model improves average AUC by about hG=READOUT({hv(K)vV}).\mathbf{h}_{G}=\operatorname{READOUT}\left(\left\{\mathbf{h}_{v}^{(K)} \mid v \in \mathcal{V} \right\}\right).3–hG=READOUT({hv(K)vV}).\mathbf{h}_{G}=\operatorname{READOUT}\left(\left\{\mathbf{h}_{v}^{(K)} \mid v \in \mathcal{V} \right\}\right).4 over the single-branch variants. The paper also reports that the pretrained model outperforms the same architecture without pretraining by about hG=READOUT({hv(K)vV}).\mathbf{h}_{G}=\operatorname{READOUT}\left(\left\{\mathbf{h}_{v}^{(K)} \mid v \in \mathcal{V} \right\}\right).5 average AUC. These results are presented as evidence that both the two-branch decomposition and the masked pretraining stage are functionally important rather than ornamental additions (Wang et al., 2022).

The masking-ratio study identifies hG=READOUT({hv(K)vV}).\mathbf{h}_{G}=\operatorname{READOUT}\left(\left\{\mathbf{h}_{v}^{(K)} \mid v \in \mathcal{V} \right\}\right).6 as the best setting among the tested ratios from hG=READOUT({hv(K)vV}).\mathbf{h}_{G}=\operatorname{READOUT}\left(\left\{\mathbf{h}_{v}^{(K)} \mid v \in \mathcal{V} \right\}\right).7 to hG=READOUT({hv(K)vV}).\mathbf{h}_{G}=\operatorname{READOUT}\left(\left\{\mathbf{h}_{v}^{(K)} \mid v \in \mathcal{V} \right\}\right).8. The interpretation given in the paper is structural: high masking forces each visible atom or bond to learn richer local context because its neighborhood is likely partially missing, while reconstruction of the whole graph from a partially observed subgraph forces learning of global structure. This suggests that BatmanNet’s objective couples local completion pressure with whole-graph semantic recovery (Wang et al., 2022).

The paper also reports UMAP visualization in which pretrained BatmanNet better separates valid from invalid molecules than an untrained model. This is an interpretive rather than purely predictive result: it indicates that the self-supervised objective learns some notion of structural validity in the embedding space. Because the paper frames the target as molecular representation rather than only downstream classification, this qualitative result is consistent with the broader claim that the model captures underlying structure and semantic information of molecules (Wang et al., 2022).

Efficiency is a recurrent theme. The encoder-decoder asymmetry is described as reducing computation and memory because the encoder processes only visible tokens and the full graph is reconstructed only by the smaller decoder. The use of a single masked reconstruction objective also avoids the overhead of multiple pretraining tasks and auxiliary chemical definitions. Within the paper’s argument, these design choices are linked to the claim that BatmanNet is computationally lighter than several large-scale transformer baselines while remaining competitive or superior on benchmarks (Wang et al., 2022).

6. Terminological ambiguity, limitations, and future directions

The term “BatmanNet” is specific to the molecular representation framework in "BatmanNet: Bi-branch Masked Graph Transformer Autoencoder for Molecular Representation" (Wang et al., 2022). It should not be conflated with several unrelated systems whose names contain “BAT,” “BATMAN,” or “BatNet.”

Term Paper Meaning
BatmanNet (Wang et al., 2022) Bi-branch masked graph transformer autoencoder for molecular representation
batman (Kreidberg, 2015) Python package for exoplanet transit and eclipse light curve calculation
B.A.T.M.A.N. V (Sliwa et al., 2019) Mobile ad-hoc mesh routing protocol with a mobility-predictive extension
BatNet (Zarandy et al., 2020) Ultrasound data transmission between smartphones
PBAT / BAT (Yeh, 2022) Parallel binary-addition-tree algorithm for binary-state network reliability
BAT for AMIN (Yeh, 2020) BAT method for acyclic multistate information network reliability
Bitcoin Testnet botnet C&C (Franzoni et al., 2020) Bidirectional encrypted botnet command-and-control over Bitcoin Testnet

This distinction matters because the surrounding literature contains multiple superficially similar names with entirely different semantics: exoplanet modeling software, routing protocols, acoustic communication, exact reliability algorithms, and blockchain-based botnet command-and-control are all separate lines of work (Kreidberg, 2015, Sliwa et al., 2019, Zarandy et al., 2020, Yeh, 2022, Yeh, 2020, Franzoni et al., 2020).

The principal limitation explicitly acknowledged for BatmanNet is that it is based primarily on hG=READOUT({hv(K)vV}).\mathbf{h}_{G}=\operatorname{READOUT}\left(\left\{\mathbf{h}_{v}^{(K)} \mid v \in \mathcal{V} \right\}\right).9D topological structure. The authors identify future work directions as incorporating Q=GQ(H),K=GK(H),V=GV(H),\mathbf{Q}= \mathbf{G}_{\mathbf{Q}}(\mathbf{H}), \quad \mathbf{K}= \mathbf{G}_{\mathbf{K}}(\mathbf{H}), \quad \mathbf{V}= \mathbf{G}_{\mathbf{V}}(\mathbf{H}),0D structure into node and edge features, scaling to larger pretraining datasets, and reducing data bias by better integrating domain knowledge. They also note that, although the model is efficient relative to prior large transformers, its current pretraining dataset is still modest compared with some large-scale efforts (Wang et al., 2022).

In that sense, BatmanNet occupies a specific position in molecular self-supervised learning: it is a masked graph autoencoding framework that seeks to balance architectural economy, chemically meaningful reconstruction, and transfer performance across drug discovery tasks. Its central contribution is not a new chemical prior or a larger corpus, but a bi-branch masking strategy that reconstructs complementary node-space and edge-space structure from heavily masked molecular graphs (Wang et al., 2022).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to BatmanNet.