SlowGuess/NeurIPS_2023_OCR huggingface dataset:
$$
\boldsymbol {h} _ {i} ^ {\prime} = \sum_ {j \in \mathcal {N} (i)} \frac {\exp \left(\left(\boldsymbol {W} _ {q} \boldsymbol {e} _ {j} ^ {\prime}\right) ^ {\intercal} \left(\boldsymbol {W} _ {k} \boldsymbol {e} _ {i} ^ {\prime}\right) + \boldsymbol {z} _ {i , j}\right) \left(\boldsymbol {W} _ {v} \boldsymbol {e} _ {j} ^ {\prime}\right)}{\sum_ {j \in \mathcal {N} (i)} \exp \left(\left(\boldsymbol {W} _ {q} \boldsymbol {e} _ {j} ^ {\prime}\right) ^ {\intercal} \left(\boldsymbol {W} _ {k} \boldsymbol {e} _ {i} ^ {\prime}\right) + \boldsymbol {z} _ {i , j}\right)} \tag {11}
$$
where  $e_i' = h_i + e_i$ ,  $h_i'$  is the updated node embedding,  $W_q$ ,  $W_k$ ,  $W_v$  are learnable parameters, and  $\mathcal{N}(i)$  is a neighborhood of node  $i$  obtained by the edges. Because  $h_i$ ,  $e_i$ , and  $z_{i,j}$  are all SE(3)-invariant,  $h_i'$  is also invariant. Three heads parameterized with MLP are stacked after several layers of Transformers update the node embedding, denoted by  $\mathrm{MLP}_F(\cdot)$ ,  $\mathrm{MLP}_G(\cdot)$ , and  $\mathrm{MLP}_H(\cdot)$  is used for updating  $s^{t-1}$ ,  $x^{t-1}$  and  $O^{t-1}$ . The LoCS updates the parameters in Eq. (3), (6) and (9) by
$$
F \left(\mathcal {M} ^ {t}, \mathcal {P}\right) [ j ] = \mathrm {M L P} _ {F} \left(\boldsymbol {h} _ {j} ^ {\prime}\right)
$$
$$
G \left(\mathcal {M} ^ {t}, \mathcal {P}\right) [ j ] = \mathrm {M L P} _ {G} \left(\boldsymbol {h} _ {j} ^ {\prime}\right) \boldsymbol {O} _ {j} ^ {t} \tag {12}
$$
$$
H \left(\mathcal {M} ^ {t}, \mathcal {P}\right) [ j ] = \exp \left(\mathrm {M L P} _ {H} \left(h _ {j} ^ {\prime}\right)\right) O _ {j} ^ {t}
$$
The output of  $G$  means predicting the coordinate deviations in the local coordinate systems and then projecting it into the global one; In  $H$ ,  $\mathrm{MLP}_H$  first predicts a vector in Lie group  $\mathfrak{so}(3)$  and the exponential map on  $\mathrm{SO}(3)$  converts it into a rotation matrix. The updating process ensures the equivariance and the invariance of the transition distributions in Proposition 1, which is proved in [71] and [69]. However, since  $O_i^t = I$  for any  $i \in \mathcal{I}_{\mathrm{at}}$ , the equivariance of  $G$  on linkers will not be preserved, so we instead use EGNN [44] to get the output of  $G$  (Appendix. C).
4.3 Sampling Process
In sampling, we first use two prior distributions as the empirical distributions  $\phi_{\mathrm{at}}$  and  $\phi_{\mathrm{fg}}$  drawn from the training set to sample the linker  $N_{\mathrm{at}}$  and functional group number  $N_{\mathrm{fg}}$ . As  $p(\boldsymbol{x}^T)$ ,  $p(\boldsymbol{O}^T)$  and  $p(s^T)$  should be SE(3)-invariant,  $p(s^T) = \mathbb{1}_{\{K\}}(s^T)$ ,  $p(\boldsymbol{x}^T) = \mathcal{N}(\boldsymbol{x}^T|\boldsymbol{0},\boldsymbol{I})$  and  $p(\boldsymbol{O}^T) = \mathrm{Uniform}_{\mathrm{SO}(3)}(\boldsymbol{O}^T)$  satisfy the conditions, where  $\mathbb{1}(\cdot)$  is the indicator function and  $\mathrm{Uniform}_{\mathrm{SO}(3)}(\cdot)$  is the uniform distribution on SO(3). And the iteratively generative process of  $p(s^{t - 1}|\mathcal{M}^t,\mathcal{P})$ ,  $p(\boldsymbol{x}^{t - 1}|\mathcal{M}^t,\mathcal{P})$  and  $p(\boldsymbol{O}^{t - 1}|\mathcal{M}^t,\mathcal{P})$  are given in Eq. (3), (6) and (9). The detailed sampling algorithm is given in Algorithm 1.
4.4 Heterogeneous graph: Joint or Two-stage?
Amino acids and functional groups are both fragments composed of atoms in proteins and molecules, regarded as rigid bodies, while the linkers are single atoms, regarded as mass points. Therefore, in the binding graph, nodes are of different levels and connections are of different kinds, thus leading the graph to be heterogeneous. For this reason, we propose two generative schemes: joint generation scheme and two-stage generation scheme as shown in Figure. 1.
In joint scheme, we regard amino acids, functional groups, and linkers at the same level, and use one single neural network to predict the three variables and update them. In detail, this scheme directly
models  $p(\mathcal{M}|\mathcal{P}) = p(\{s_i,\pmb {x}_i,\pmb {O}_i\}_{i\in \mathcal{I}_{\mathrm{fg}}\cup \mathcal{I}_{\mathrm{at}}}|\mathcal{P})$ , where the parameterized transition distribution is  $p(\{s_i^{t - 1},\pmb {x}_i^{t - 1},\pmb {O}_i^{t - 1}\}_{i\in \mathcal{I}_{\mathrm{fg}}\cup \mathcal{I}_{\mathrm{at}}}|\mathcal{M}^t,\mathcal{P})$ . Note that  $O_{i}^{t} = I$  for any  $t$  if  $i\in \mathcal{I}_{\mathrm{at}}$ .
In two-stage scheme, we regard amino acids and functional groups at the fragment level, and linkers at the atom level, and use two different neural networks to parameterize the transition distribution. In the first stage, the functional groups are generated, and then single atoms as linkers will be generated to connect the generated functional groups as a full molecule. The two-stage generative scheme is similar to CADD, which first determines the pharmacophores towards the target protein, fits functional groups with high activity into them, and then searches for the possible molecules with these functional groups. In specific, the generative process reads  $p(\mathcal{M}|\mathcal{P}) = p(\{s_j,\pmb {x}_j\}_{j\in \mathcal{I}_{\mathrm{at}}}| \{s_i,\pmb {x}_i,\pmb {O}_i\}_{i\in \mathcal{I}_{\mathrm{fg}}},\mathcal{P})p(\{s_i,\pmb {x}_i,\pmb {O}_i\}_{i\in \mathcal{I}_{\mathrm{fg}}}|\mathcal{P})$ . The transition distribution of the first stage  $p(\{s_i^{t - 1},\pmb{x}_i^{t - 1},\pmb {O}_i^{t - 1}\}_{i\in \mathcal{I}_{\mathrm{fg}}}| \{s_i^t,\pmb {x}_i^t,\pmb {O}_i^t\}_{i\in \mathcal{I}_{\mathrm{fg}}},\mathcal{P})$  is parameterized by one neural network; In the second stage, the generated  $\{s_i,\pmb {x}_i,\pmb {O}_i\}_{i\in \mathcal{I}_{\mathrm{fg}}}$  is used as context, so that the other neural network models  $p(\{s_i^{t - 1},\pmb {x}_i^{t - 1}\}_{i\in \mathcal{I}_{\mathrm{at}}}| \{s_i^t,\pmb {x}_i^t\}_{i\in \mathcal{I}_{\mathrm{at}}},\{s_i,\pmb {x}_i,\pmb {O}_i\}_{i\in \mathcal{I}_{\mathrm{fg}}},\mathcal{P})$ .
5.1 Data Processing.
In the experiments, we use CrossDocked2020[32] for evaluation. In the prevailing works, they focus on generating molecules at the atom level, differing from our functional-group-based generation, so our first target is to divide the molecules into functional groups and linkers. We use EFGs[72] to segment molecules. We select the 25 functional groups that appear most frequently with stable structures, which are partly shown in Figure. 2 For some functional groups, chirality exists in their structures, and we treat them as two functional groups. As a result, we finally build up a dataset as a corpus including 27 functional groups (two of the 25 have chirality) for Cross docked2020, with their intra-structures fixed as rigid bodies, and assure that most molecules can be decomposed into the substructures in our corpus datasets. Details are given in Appendix. D. For linkers, we choose  $\{\mathrm{B},\mathrm{C},\mathrm{N},\mathrm{O},\mathrm{F},\mathrm{P},\mathrm{S},\mathrm{Cl},\mathrm{Br},\mathrm{I}\}$  as representative heavy atoms. After the processing, we obtain  $M_{\mathrm{fg}} = 27$  and  $M_{\mathrm{at}} = 10$  in our experiments. Besides, by the fragment-linker designation of a binding graph, the node number is reduced to 53.62 on average in GNN's message-passing.
5.2 Pocket-Specific Molecule Generation
Dataset. The datasets for training and evaluation are split according to POCKET2MOL [9] and TARGETDIFF [13]. 22.5 million docked protein binding complexes with low RMSD ( $< 1\AA$ ) and sequence identity less than  $30\%$  are selected, leading to 100,000 pairs of pocket-ligand complexes, with 100 novel complexes as references for evaluation.
Setup. For performance comparison, our methods are compared with baselines including LIGAN [60], 3DSBDD [12], GRAPHBP [10], POCKET2MOL [54], DIFFSBDD [14] and TARGETDIFF [13]. LIGAN as a 3D CNN-based method generates atoms on regular grids, with VAE [73] as its generative model. 3DSBDD, GRAPHBP and POCKET2MOL are all GNN-based, generating atoms in an auto-regressive way. DIFFSBDD and TARGETDIFF are two diffusion-based methods that generate molecules at the full atom level, with equivariant GNNs as the denoisers. The two schemes of generation lead to two variants of our method, written as D3FG(Joint) and D3FG(Stage). In some parts, we choose POCKET2MOL as the representative autoregressive methods, and DIFFSBDD and TARGETDIFF as the benchmarks employing diffusion models, because these three baselines are the
Figure 2: Five of twenty-five functional groups with stable structures that occur most frequently in Cross docked2020 and are used in D3FG.
Table 1: 'Ratio' of the top ten functional groups with the highest frequency in Cross docked2020. 'Ref.' is calculated in the training set. MAE is obtained between rows of 'Ref.' and different methods' Ratio' and JSD is calculated by Freq', which is in detail given in Appendix. E Ratio' in bold means it is the closest to Ref., and MAE/JSD in bold means it is the lowest.
Functional Group	Ref.	POCKET2MOL	TARGETDIFF	DIFFSBDD	D3FG (Joint)	D3FG (Stage)
c1cccccc	0.712	0.583	0.293	0.131	0.548	0.608
NC=O	0.266	0.089	0.149	0.010	0.120	0.159
O=CO	0.216	0.200	0.320	0.025	0.226	0.127
c1ccncc1	0.082	0.086	0.052	0.001	0.040	0.078
c1ncc2nc[nH]c2n1	0.061	0.001	0.000	0.000	0.002	0.030
NS(=O)=O	0.055	0.000	0.000	0.001	0.001	0.001
O=P(O)(O)O	0.040	0.004	0.020	0.000	0.011	0.015
OCO	0.034	0.024	0.097	0.001	0.067	0.075
c1cncnc1	0.032	0.010	0.015	0.000	0.003	0.013
c1cn[nH]c1	0.029	0.013	0.002	0.000	0.004	0.006
MAE(↓)	-	0.030	0.045	0.071	0.024	0.020
JSD(↓)	-	0.248	0.301	0.553	0.223	0.201
Table 2: Jensen-Shannon divergence between the distributions of bond distance for reference vs. generated molecules. The smaller, the better. Value in bold is the lowest.
Bond	LIGAN	3DSBDD	POCKET2MOL	TARGETDIFF	DIFFSBDD	D3FG (Joint)	D3FG (Stage)
C-C	0.599	0.424	0.416	0.346	0.385	0.339	0.281
C=C	0.665	0.545	0.516	0.503	0.565	0.485	0.469
C-N	0.631	0.424	0.401	0.299	0.421	0.307	0.313
C=N	0.742	0.671	0.628	0.547	0.569	0.530	0.523
C-O	0.656	0.547	0.445	0.408	0.413	0.412	0.406
C=O	0.662	0.638	0.532	0.467	0.541	0.490	0.488
c:c	0.494	0.410	0.398	0.264	0.339	0.327	0.302
c:n	0.634	0.443	0.457	0.228	0.260	0.246	0.237
latest works that show good empirical performance. We sample 100 valid molecules for each pocket for the baselines and D3FG, leading to 10,000 pairs of complexes. After the molecules are generated by the model, 0penbabel [74] is used to construct chemical bonds between atoms, and Universal Force Field (UFF) minimization [75] is used for refinement. The following evaluations are based on the samples. Figure. 4 gives an example of generated molecules by different methods.
Structure analysis. We first analyze the functional groups of generated molecules by different methods. We show the 'Ratio' and 'Freq' of the included functional groups partly, where 'Ratio' means how many specified functional groups are in each molecule on average, and 'Freq' means the statistical frequency of occurrence of the specified functional group in the generated molecules. Mean absolute error (MAE) as overall metrics is calculated according to reference 'Ratio' and generated 'Ratio'; Jensen-Shannon divergence (JSD) is calculated according to reference 'Freq' and generated 'Freq'. The smaller MAE and JSD are, the better performance the method achieves. Table. 1 shows the metrics of different methods' generated molecules, demonstrating D3FG's superiority in generating molecules with realistic drug structures since distributions of the functional groups in generated molecules are more similar to the real drug molecules'. Secondly, we analyze the atom type, bond distance, bond angle, dihedral and atom type distribution. JSDs are calculated between the distributions of bond distance for reference vs. generated molecules.  $\cdot -$ ,  $\cdot =$ ,  $\cdot$  represents single, double, and aromatic bonds, respectively. Besides, we report MAE on reference 'Ratio' vs. generated 'Ratio' and JSD on reference 'Freq' vs. generated 'Freq' based on atom type distribution. Table. 2, 3 and Figure. 3 gives details atom type analysis. For other geometries, please refer to Appendix. E. We found that D3FG(Stage) outperforms D3FG(Joint) in generating more realistic molecules, and has competitive performance with TARGETDIFF.
Binding affinity. We secondly make a comparison of Binding Affinity. Following 3DSBDD and LIGAN, we employed two evaluation metrics including Vina docking score [76] and Gnina docking score [77]. Vina docking [78] as a classical docking tool, gives a lower score as Vina energy if the binding affinity of the molecule is better, while Gnina docking as a deep-learning-based docking tool, gives it a higher score.  $\Delta$  Affinity measures the percentage of generated molecules that have better predicted binding affinity than the corresponding reference molecules. Table. 4 shows that our D3FG
Figure 3: Atom type distribution and metrics.
Method	MAE(↓)	JSD(↓)
POCKET2MOL	0.573	0.098
TARGETDIFF	0.471	0.059
DIFFSBDD	0.627	0.054
D3FG(Joint)	0.528	0.075
D3FG(Stage)	0.294	0.056
Table 3: MAE and JSD of different methods' atom type number and distribution vs. the reference. Values in bold are the lowest.
Table 4: Evaluation of Binding affinity and other chemical drug properties for baselines and variants of D3FG.  $\downarrow$  means the smaller the value,the better the performance,and  $\uparrow$  means the opposite. Values in bold are the top-2 best metrics.
Vina Score (↓)	Vina ΔAffinity (↑)	Gnina Score (↑)	Gnina ΔAffinity(↑)	QED (↑)	SA (↑)	LogP	Lipinski (↑)
Ref. (Test)	-7.06	-	5.37	-	0.471	0.725	0.818	4.247
LIGAN	-6.17	21.24%	4.29	21.68%	0.382	0.584	-0.138	4.046
GRAPHBP	-6.36	27.41%	4.52	26.54%	0.437	0.502	3.024	4.448
3DSBDD	-6.12	20.73%	4.48	19.22%	0.426	0.625	0.266	4.735
POCKET2MOL	-6.92	45.86%	5.34	40.68%	0.543	0.746	1.584	4.904
TARGETDIFF	-7.11	49.52%	5.41	42.40%	0.474	0.581	1.402	4.487
DIFFSBDD	-6.37	31.32%	4.63	27.96%	0.494	0.343	-0.157	4.895
D3FG (Joint)	-6.89	37.32%	5.30	33.45%	0.507	0.832	2.796	4.943
D3FG (Stage)	-6.96	45.88%	5.43	43.36%	0.501	0.840	2.821	4.965
D3FG (EHot)	-7.19	51.78%	5.51	56.53%	0.482	0.731	0.814	4.330
D3FG (ECold)	-7.02	44.03%	5.16	32.69%	0.476	0.707	0.820	4.228
of the two-stage scheme achieves competitive affinity scores, comparable to TARGETDIFF and much better than D3FG of the joint scheme.
Drug property. Moreover, chemical properties are evaluated with RdKit [79], including QED [80] (quantitative estimation of drug-likeness), SA [81] (synthetic accessibility score), LogP [82] (the octanol-water partition coefficient, which should be between  $-0.4$  and 5.6 for good drug candidates), and Lipinski [83, 84] (number of rules the drug follow the Lipinski's rule of five). QED, SA, and Lipinski are three metrics with preferences for atom numbers, demonstrated in DIFFBP[15]. Table. 4 demonstrates that two variants of D3FG achieve overall best performance in these metrics.
(a) Ref.
(b) D3FG (Stage)
(c) D3FG (Joint)
(d) DIFFSBDD
(e) TARGETDIFF
Figure 4: Generated molecules by different methods on pocket 3o96_A_rec. The diffusion-based methods generated molecules more similar to the reference, appearing to be 'vertical'.
(f) POKECT2MOL
5.3 Pocket-Specific Molecule Elaboration
Introduction. Molecule elaboration as a sub-task of molecule optimization, aims to elaborate a fragment of existing molecules amenable to chemical modification for improving binding affinity. To fulfill it, we here first select a functional group in a ligand that contributes to binding affinity and remove it to obtain the editable fragments. Then, we attempt to use D3FG to generate the new type of functional groups with its structures, for modifying the fragments and thus building up a new molecule with higher binding affinity to the target protein.
Dataset. The selection of a functional group for replacement is the first problem. Pharmacophoric information is extracted by calculating the fragment hotspot map (FHM) [33, 34] of the target protein. In specific, FHM describes regions of the binding pocket that are likely to make a positive contribution to binding affinity. Then, by placing the molecules into the pockets, we can thus obtain each functional group's hotspot scores, according to the binding complexes. The higher hotspot score a functional group reaches, the more contributions it makes to the binding affinity. Functional groups' hotspot scores of each ligand are calculated based on 100,000 pairs of pocket-ligand complexes in Cross docked2020, and the selection of functional groups can be based on their scores. Finally, we established our new datasets for molecule elaboration based on FHM.
Binding affinity and drug property. We here consider two schemes for molecule elaboration, the first is to remove the functional groups with the highest scores, and elaborate the remaining fragments by replacing them with the functional group generated by D3FG. We write this as D3FG(EHot). The second D3FG(ECold), on the other hand, replaces the functional groups of the lowest scores). We report the D3FG's elaborated molecules by the two schemes in Table. 4. It shows that D3FG(EHot) tends to generate more molecules with higher affinity, while molecules elaborated by D3FG(ECold) show tiny differences in binding affinity from the raw references. Besides, on other chemical properties, the elaborated molecules are very close to the raw references, since the differences lie only in one single functional group, and the major molecular skeletons are almost identical.
In this paper, a functional-group-based diffusion model called D3FG is proposed to generate molecules in 3D with protein structures as its context. Joint and two-stage generation schemes lead to two variants of D3FG. The molecules generated by the two-stage generation scheme show more realistic structures, competitive binding performance, and better drug properties. Besides, in molecule elaboration, D3FG can also generate molecules with good binding affinity. However, limitation still exists. First, the functional group datasets are still small, which will be enlarged in the future. Second, the binding affinities of generated molecules still remain to be improved, since other diffusion models even show better binding performance.
This work was supported by National Key R&D Program of China (No. 2022ZD0115100), National Natural Science Foundation of China Project (No. U21A20427), and Project (No. WU2022A009) from the Center of Synthetic Biology and Integrated Bioengineering of Westlake University.
[75] Anthony K Rappe, Carla J Casewit, KS Colwell, William A Goddard III, and W Mason Skiff. UFF, a full periodic table force field for molecular mechanics and molecular dynamics simulations. Journal of the American chemical society, 114(25):10024-10035, 1992.
[76] Oleg Trott and Arthur J. Olson. Autodock vina: Improving the speed and accuracy of docking with a new scoring function, efficient optimization, and multithreading. Journal of Computational Chemistry, 31, 2009.
[77] Andrew T McNutt, Paul G. Francoeur, Rishal Aggarwal, Tomohide Masuda, Rocco Meli, Matthew Ragoza, Jocelyn Sunseri, and David Ryan Koes. Gnina 1.0: molecular docking with deep learning. Journal of Cheminformatics, 13, 2021.
[78] Amr Alhossary, Stephanus Daniel Handoko, Yuguang Mu, and Chee-Keong Kwoh. Fast, accurate, and reliable molecular docking with QuickVina 2. Bioinformatics, 31(13):2214-2216, 02 2015.
[79] Greg Landrum. Rdkit: Open-source cheminformatics software. 2016.
[80] Richard Bickerton, Gaia Paolini, Jérémy Besnard, Sorel Muresan, and Andrew Hopkins. Quantifying the chemical beauty of drugs. Nature chemistry, 4:90-8, 02 2012.
[81] P Ertl and Ansgar Schuffenhauer. Estimation of synthetic accessibility score of drug-like molecules based on molecular complexity and fragment contributions. Journal of cheminformatics, 1:8, 06 2009.
[82] Arup K. Ghose, Vellarkad N. Viswanadhan, and John J. Wendoloski. A knowledge-based approach in designing combinatorial or medicinal chemistry libraries for drug discovery. 1. a qualitative and quantitative characterization of known drug databases. Journal of Combinatorial Chemistry, 1(1):55-68, December 1998.
[83] Christopher A Lipinski, Franco Lombardo, Beryl W Dominy, and Paul J Feeney. Experimental and computational approaches to estimate solubility and permeability in drug discovery and development settings. Advanced drug delivery reviews, 23(1-3):3-25, 1997.
[84] Daniel F. Veber, Stephen R. Johnson, Hung-Yuan Cheng, Brian R. Smith, Keith W. Ward, and Kenneth D. Kopple. Molecular properties that influence the oral bioavailability of drug candidates. Journal of Medicinal Chemistry, 45(12):2615-2623, May 2002.
A Proof of Proposition 1.
First, we here denote all atom's positions in the molecules as  $\mathbf{X}_{\mathrm{M}} \in \mathbb{R}^{N_{\mathrm{a}} \times 3}$ , and in the protein as  $\mathbf{X}_{\mathrm{M}} \in \mathbb{R}^{N_{\mathrm{aa}} \times 3}$ , and linker and functional group type as  $S_{\mathrm{M}} \in \mathbb{R}^{(N_{\mathrm{aa}} + N_{\mathrm{fg}}) \times (22 + M_{\mathrm{fg}} + M_{\mathrm{at}})}$ . Note that one functional group may contain several atoms so that  $N_{\mathrm{aa}} + N_{\mathrm{fg}} < N_{\mathrm{a}}$ .
SE(3) group as a roto-translation group in  $\mathbb{R}^3$ , can be divided into two groups: SO(3) as the rotation group and T(3) as the translation group. For  $\pmb{x} \in \mathbb{R}^3$ , and  $g = r + v$  with  $g \in \mathrm{SE}(3)$ ,  $r \in \mathrm{SO}(3)$ ,  $v \in \mathrm{T}(3)$ ,  $T_g(\pmb{x}) = T_{r + v}(\pmb{x}) = T_v \circ T_r(\pmb{x})$
Lemma A1. If the The equivariance and invariance of the distribution in the reverse diffusion process are listed as
$$
p \left(\mathrm {T} _ {g} \left(\boldsymbol {X} _ {\mathrm {M}} ^ {T}\right), \boldsymbol {S} _ {\mathrm {M}} ^ {T} \mid \mathrm {T} _ {g} \left(\boldsymbol {X} _ {\mathrm {P}}\right), \boldsymbol {S} _ {\mathrm {P}}\right) = p \left(\boldsymbol {X} _ {\mathrm {M}} ^ {T}, \boldsymbol {S} _ {\mathrm {M}} ^ {T}\right) = p \left(\boldsymbol {X} _ {\mathrm {M}} ^ {T}, \boldsymbol {S} _ {\mathrm {M}} ^ {T} \mid \boldsymbol {X} _ {\mathrm {P}}, \boldsymbol {S} _ {\mathrm {P}}\right)
$$
$$
p \left(\mathrm {T} _ {\mathrm {g}} \left(\boldsymbol {X} _ {\mathrm {M}} ^ {t - 1}\right) \mid \mathrm {T} _ {\mathrm {g}} \left(\boldsymbol {X} _ {\mathrm {M}} ^ {t}\right), \boldsymbol {S} _ {\mathrm {M}} ^ {t}, \mathrm {T} _ {\mathrm {g}} \left(\boldsymbol {X} _ {\mathrm {P}}\right), \boldsymbol {S} _ {\mathrm {P}}\right) = p \left(\boldsymbol {X} _ {\mathrm {M}} ^ {t - 1} \mid \boldsymbol {X} _ {\mathrm {M}} ^ {t}, \boldsymbol {S} _ {\mathrm {M}} ^ {t}, \boldsymbol {X} _ {\mathrm {P}}, \boldsymbol {S} _ {\mathrm {P}}\right) \tag {13}
$$
$$
p \left(\boldsymbol {S} _ {\mathrm {M}} ^ {t - 1} | \mathrm {T} _ {g} (\boldsymbol {X} _ {\mathrm {M}} ^ {t}), \boldsymbol {S} _ {\mathrm {M}} ^ {t}, \mathrm {T} _ {g} (\boldsymbol {X} _ {\mathrm {P}}), \boldsymbol {S} _ {\mathrm {P}}\right) = p \left(\boldsymbol {S} _ {\mathrm {M}} ^ {t - 1} | \boldsymbol {X} _ {\mathrm {M}} ^ {t}, \boldsymbol {S} _ {\mathrm {M}} ^ {t}, \boldsymbol {X} _ {\mathrm {P}}, \boldsymbol {S} _ {\mathrm {P}}\right),
$$
Then  $p\left(\mathbf{X}_{\mathrm{M}}^{T}, \mathbf{S}_{\mathrm{M}}^{T} \mid \mathbf{X}_{\mathrm{P}}, \mathbf{S}_{\mathrm{P}}\right)$  is SE(3) invariant.
Proof. Since  $\mathbf{T}_g(\mathcal{M}) = \{S, \mathrm{T}_g(\mathbf{X}_{\mathrm{M}})\}$ , we can write the joint generative process as