A mathematics-first reading guide

EC-Dock for a computational chemist

Deep learning is easiest to understand here as an amortized (learn once, reuse many times), geometric docking procedure: expensive learning happens once on many complexes, then a trained model rapidly transforms noisy ligand coordinates into plausible bound poses.

The one equation to keep in mind:
\[ \widehat X_0 = f_\theta\!\left( X_\sigma,\sigma\mid G_L^{2D},G_P^{3D},\operatorname{Adj}^{LP} \right) \]
How to read it: start at the right. Give the network noisy coordinates \(X_\sigma\), the noise amount \(\sigma\), and the conditioning information after the vertical bar. The network \(f_\theta\) returns its best estimate \(\widehat X_0\) of the clean ligand pose. The hat means “this is a prediction.”
\(X_\sigma\) is a noisy ligand conformation, \(\sigma\) is its noise level, \(G_L^{2D}\) is the ligand graph, \(G_P^{3D}\) is the pocket graph, and \(\operatorname{Adj}^{LP}\) is a learned or geometric ligand–protein contact graph.
How to use this guide:
  1. Read the ordinary-language sentence first.
  2. Then read the equation from the inside out: identify the objects, perform the operation, and interpret the result.
  3. Ignore implementation details until the sentence “why does EC-Dock need this?” makes sense.

The equations are compact instructions, not mysterious physical laws. An equation such as \(y=Wx+b\) simply says: “take the input \(x\), mix its numbers using \(W\), then add \(b\).”

The architecture in one page

Ligand graph
and conformer
Distance predictor
optional contact prior
Equiformer denoiser
clean pose
Pocket graph
and coordinates
Noise level
\(\sigma\)
MMFF refinement
and RTMScore ranking

The model has three conceptually separate jobs:

  1. represent chemistry and geometry as tensors on graphs;
  2. denoise coordinates while respecting 3D symmetry;
  3. learn consistency so that one or a few denoising calls replace a long diffusion trajectory.

Jargon decoder: the words you will keep seeing

Deep-learning papers use short words for ordinary ideas. Keep the technical word because it is the language used by the field, but attach a simple meaning to it. The chemistry analogy is only a memory aid; it is not an exact equivalence.

Model
A parameterized function that turns inputs into predictions. In EC-Dock, it turns a pocket, ligand, and noisy coordinates into a pose.
Architecture
The arrangement of layers and data paths inside a model: embeddings, attention blocks, equivariant operations, and output heads.
Parameter, weight
A number learned from data. A weight is like an adjustable coefficient in a large, flexible empirical model.
Activation function
A nonlinear function such as GELU or SiLU. It prevents a deep stack of layers from behaving like one simple linear equation.
Tensor
An array of numbers. A vector, matrix, and atom-by-atom feature table are all tensors with different numbers of indices.
Channel, hidden feature
One learned numerical coordinate in an internal representation. A 200-wide hidden state has 200 channels per atom.
Forward pass
One evaluation of the network: data enters, passes through the layers, and a prediction comes out.
Training
Repeatedly changing parameters so predictions become closer to training targets.
Inference
Using a trained model to make predictions. No parameter updating happens during inference.
Loss
A number measuring how undesirable a prediction is for training. It is a teaching signal, not automatically a physical energy.
Optimizer
An algorithm that uses gradients of the loss to update parameters. Adam is one common optimizer.
Graph, node, edge
A graph is a network of objects; nodes are atoms; edges are bonds or selected spatial relationships between atoms.
Adjacency matrix
A table saying which node pairs are connected. It is the model's explicit list of allowed communication paths.
Embedding
A learned vector representation of a discrete label such as carbon, oxygen, residue type, or bond type.
Latent representation
An internal feature description that is useful to the model but is not required to correspond to a directly measurable chemical quantity.
Message passing
Updating an atom's features by collecting learned messages from neighboring atoms.
Attention
A learned weighted average: each atom decides which other atoms deserve more influence for the current prediction.
Transformer
A neural architecture built around attention, usually with residual connections, normalization, and feed-forward sublayers.
Encoder
A stack of layers that converts raw inputs into useful internal representations.
Decoder
A stack of layers that combines representations and turns them into a requested output, such as distances or coordinates.
Output head
A small final network attached to a shared representation to predict one particular quantity, such as a distance or coordinate correction.
Feed-forward network
A layer sequence in which information moves from input to output without a recurrent loop. An MLP is a feed-forward network.
Convolution
A local operation that combines information around a point. In EC-Dock, “spherical convolution” means the combination also tracks direction on a sphere.
Recycling
Feeding an intermediate prediction or representation back into later passes so the model can improve it repeatedly.
Karras schedule
A particular smooth spacing of noise levels, designed to spend useful steps across a wide logarithmic range of noise amplitudes.
Invariant
Unchanged by a transformation. A distance is invariant when the whole complex is rotated or translated.
Equivariant
Transforms in the same corresponding way as the input. A predicted vector rotates when the molecule rotates.
Irreducible representation, irrep
A mathematically well-defined type of feature under rotation: scalar-like, vector-like, or higher-order angular.
Diffusion model
A generative model trained around a path from clean data to noise and a learned reverse path from noise back to data.
Denoiser
The network that receives a noisy structure and predicts a cleaner or final structure.
Consistency model
A diffusion-style model trained so different noise levels lead to the same final answer, enabling very few sampling steps.
Prior
Information supplied before the final prediction. EC-Dock's predicted contact graph is a learned geometric prior.
Sampling
Generating a candidate from a model that contains randomness. Different random seeds can produce different poses.
Postprocessing
Operations after neural-network prediction, such as MMFF minimization or pose ranking.
Gaussian, normal distribution
A bell-shaped probability distribution. In EC-Dock it supplies random coordinate perturbations, centered at zero with a spread controlled by \(\sigma\).
Softmax
A function that turns a list of arbitrary scores into positive weights that add up to 1. It is useful for attention because the weights behave like a distribution of focus.
GELU, SiLU
Names of smooth activation functions. They bend feature values so stacked neural layers can express nonlinear relationships.
Residual connection
A shortcut that adds a layer's correction to the incoming features: “new = old + correction.”
Normalization
Rescaling internal features to keep their numerical magnitudes stable during training.
eSCN
Equivariant spherical channel network, the efficient directional convolution used inside the Equiformer-v2-style denoiser.
Angular order \(\ell\)
A label for how a feature behaves under rotation. \(\ell=0\) is scalar-like, \(\ell=1\) is vector-like, and higher values carry richer angular patterns.
Noise schedule
The ordered list of noise amplitudes used to move from a very noisy structure toward a clean one.
Teacher, stop-gradient
A prediction used as a target without allowing the current update to change it through the loss. This makes consistency training numerically well behaved.
SE(3), SO(3)
Names for rigid 3D transformations and pure 3D rotations. The notation is group theory's compact way of describing symmetry operations.
Determinant, orthogonal matrix
Linear-algebra tests for a transformation. Orthogonality preserves lengths; determinant \(+1\) selects rotations rather than mirror reflections.
Multi-head attention
Several attention mechanisms run in parallel, each allowed to learn a different kind of relationship.
Radial basis
A collection of smooth functions of distance. They let a network represent “near this distance” patterns without using a hard discontinuous rule.
Amortized inference
Pay the expensive optimization cost during training once, then reuse the learned procedure cheaply for new molecules.
ETKDG
RDKit's distance-geometry/conformer-generation procedure used to create a chemically plausible starting ligand conformation.
MMFF refinement
A classical molecular-mechanics minimization applied after neural generation to improve local bond and angle geometry.
Force field
A parameterized energy model with terms for bonds, angles, torsions, nonbonded interactions, and related effects. MMFF is one example.
RTMScore
A separate learned scoring model used by the paper to rank generated poses. It is not the same thing as the EC-Dock denoiser.
RMSD, Top-1, Best-1
RMSD measures coordinate disagreement with a reference. Top-1 means the model's highest-ranked pose; Best-1 is the closest pose in the generated set, an oracle-style coverage measure.
PoseBusters
A benchmark and physical-validity test suite. It asks both whether a pose is near the crystal pose and whether its geometry is chemically plausible.

Mathematics required for the deep learning

You do not need all of modern machine learning. For EC-Dock, the essential mathematics is linear algebra, multivariable calculus, probability, graph theory, and the geometry of rotations.

How to read mathematical notation:

\(=\) means “is equal to”; \(\in\) means “belongs to”; \(\mathbb R^d\) means “a list of \(d\) ordinary real numbers”; \(\sum\) means “add many terms”; \(\lVert\cdot\rVert\) means “length”; a hat such as \(\widehat D\) means “predicted”; and a subscript \(i,j\) identifies atoms \(i\) and \(j\). The vertical bar in \(p(X\mid C)\) means “the distribution of \(X\) when \(C\) is known.”

When an equation contains several operations, read it from the inside out. First identify the objects, then calculate the inner expression, then apply the outer function.

Symbol Plain-language meaning EC-Dock example
\(X\)A collection of coordinates.All ligand atom positions.
\(x_i\)The coordinate of atom \(i\).A 3-number vector \((x,y,z)\).
\(H\) or \(h_i\)Learned chemical/geometric features.The model's internal description of atom \(i\).
\(E\) or \(e_{ij}\)Features describing a pair of atoms.Distance and edge-type information.
\(G\)A graph: nodes plus edges and their features.Ligand or pocket graph.
\(\theta\)All trainable numbers in a network.Weights of the denoiser.
\(f_\theta\)The network with parameters \(\theta\).The pose-prediction function.
\(\sigma\)Noise amplitude.How strongly ligand coordinates were perturbed.
\(\ell\)Angular representation order.\(\ell=0\) scalar; \(\ell=1\) vector.
\(C\)Conditioning information known to the model.Pocket, ligand graph, and contact graph.
\(\nabla\)Gradient: a list of “which way is uphill?” derivatives.Which weight changes would increase the loss.
\(\partial\)A derivative with respect to one chosen variable.How loss changes when one parameter changes.
\(\phi\)A nonlinear activation function.GELU or SiLU inside an MLP.
\(I\)Identity matrix: leaves a vector unchanged.The covariance shape in a standard Gaussian.
\(\mathsf T\)Transpose: turn rows into columns.\(R^\mathsf T R\) tests a rotation.
\(\exp,\sqrt{\ },\det\)Exponential, square root, and determinant.Elementary operations used in radial bases and rotations.

Linear algebra

Vectors store coordinates or features. Matrices transform them. Tensors are arrays with several indices, such as one feature vector per atom or one feature vector per atom pair.

\[ x\in\mathbb R^d,\qquad y=Wx+b,\qquad d_{ij}=\lVert x_i-x_j\rVert_2 \]
How to read it: \(x\) is a list of \(d\) numbers. \(W x+b\) mixes those numbers to make a new list \(y\). To obtain \(d_{ij}\), subtract the two atom-coordinate vectors, measure the length of the difference, and call that the distance.

Calculus

Training changes parameters in the direction that lowers a scalar loss. Backpropagation is repeated application of the chain rule.

\[ \theta\leftarrow\theta-\eta\nabla_\theta L(\theta) \]
How to read it: \(\theta\) is the current collection of weights. \(\nabla_\theta L\) points uphill in loss. Subtracting it moves the weights downhill; \(\eta\) controls how large the move is.

Probability

Docking is treated as a conditional distribution over poses. Random noise provides different samples from the model's learned pose distribution.

“Conditional” simply means “after we specify the ligand and pocket.” The model is not guessing poses for an unspecified molecule.

\[ p_\theta(X_0\mid G_L,G_P) \]
How to read it: this means “the probability of a pose \(X_0\), when the ligand graph \(G_L\) and protein graph \(G_P\) are given.” The vertical bar means “conditioned on,” not division.

Rotations

A proper rotation is an orthogonal matrix with determinant \(+1\). It preserves distances and angles but changes coordinate components.

\[ R^\mathsf TR=I,\qquad \det R=1,\qquad \lVert Rr\rVert=\lVert r\rVert \]
How to read it: \(R\) is a rotation. The first two statements say it does not stretch, shear, or reflect space. The last statement says a vector keeps the same length after rotation.

Vectors, matrices, tensors, and shapes

A ligand coordinate matrix is usually \(X_L\in\mathbb R^{N_L\times 3}\). A hidden feature matrix is \(H\in\mathbb R^{N\times d}\), where \(d\) is the number of learned channels. Pair features may look like \(E\in\mathbb R^{N\times N\times d_E}\). The extra indices are bookkeeping: they say which atom or atom pair a feature belongs to.

A matrix multiplication is a bank of learned linear combinations. If \(W\in\mathbb R^{m\times d}\), then \(Wx\) turns \(d\) input channels into \(m\) output channels. A neural layer becomes useful because nonlinear functions such as GELU or SiLU are placed between these linear maps.

Tiny shape example:

If a molecule has \(N=40\) atoms and the model uses \(d=200\) hidden channels, then \(H\) has shape \(40\times200\): one row per atom and 200 learned numbers per row. Coordinates still have shape \(40\times3\). The 200 numbers are not extra coordinates; they are internal evidence about chemistry and geometry.

Derivatives and backpropagation

Let \(y=f_\theta(x)\) be a prediction and \(L(y,y^\star)\) its error. The derivative tells us how much the loss changes when a parameter changes:

\[ \frac{\partial L}{\partial\theta} = \frac{\partial L}{\partial y} \frac{\partial y}{\partial\theta} \]
How to read it: the loss changes because the prediction changes, and the prediction changes because the weights change. The chain rule multiplies those two sensitivities. Backpropagation is an efficient way to perform this bookkeeping through every layer.
One-dimensional example:

Suppose \(L(\theta)=(\theta-3)^2\). Its derivative is \(2(\theta-3)\). If \(\theta=1\), the derivative is \(-4\), so a downhill update increases \(\theta\), moving it toward 3.

In a large network, the chain rule is applied through every layer. This is the practical meaning of “backpropagation.” Adam is an improved version of gradient descent that keeps running estimates of gradient magnitudes and directions.

Losses are teaching signals, not necessarily physical energies

A loss can compare coordinates, distances, or two model outputs. It is chosen to make the learned function useful; it need not be the same quantity used to rank final docking poses.

\[ \operatorname{MSE}(\widehat D,D) = \frac{1}{M}\sum_{k=1}^{M} \left(\widehat D_k-D_k\right)^2 \]
How to read it: take each predicted distance, subtract the correct distance, square the error so positive and negative errors do not cancel, then average over \(M\) examples.
Numerical example:

If the prediction is \(4.0\) Å and the target is \(3.5\) Å, the error is \(0.5\) Å and the squared error is \(0.25\) Ų. MSE averages many such squared errors.

EC-Dock also uses a pseudo-Huber-style coordinate discrepancy. It behaves approximately quadratically for small errors and approximately linearly for large errors, so a few badly corrupted coordinates do not dominate training.

\[ \rho_\delta(r) = \delta^2\!\left( \sqrt{1+\left(\frac{r}{\delta}\right)^2}-1 \right) \]
How to read it: \(r\) is an error and \(\delta\) sets the transition scale. For small \(r\), the square-root expression behaves like a square; for very large \(r\), it grows more like an absolute value. That makes the loss less sensitive to a rare huge coordinate error.

Graphs and adjacency matrices

An adjacency matrix \(A\) says which nodes can communicate. A sparse edge list is the memory-efficient implementation. For EC-Dock, different edge types can represent ligand bonds, receptor spatial neighbors, and ligand–protein contacts.

\[ A_{ij}= \begin{cases} 1,&\text{if atoms }i\text{ and }j\text{ are connected},\\ 0,&\text{otherwise.} \end{cases} \]
How to read it: look at row \(i\), column \(j\). A 1 means atom \(i\) is allowed to receive information from atom \(j\); a 0 means that edge is absent. In practice EC-Dock stores the list of 1s instead of a huge table full of 0s.

SE(3): the symmetry mathematics

A rigid-body transformation consists of a rotation \(R\in SO(3)\) and a translation \(t\in\mathbb R^3\):

\[ g\cdot x=Rx+t,\qquad SO(3)=\{R:R^\mathsf TR=I,\det R=1\} \]
How to read it: take a point \(x\), rotate it with \(R\), then shift it by \(t\). \(SO(3)\) is simply the name for all ordinary 3D rotations. The group name \(SE(3)\) means rotations plus translations.

A scalar is invariant: \(\,s\mapsto s\). A vector is equivariant: \(\,v\mapsto Rv\). More generally, an order-\(\ell\) irreducible feature transforms as

\[ h^{(\ell)}\mapsto D^{(\ell)}(R)h^{(\ell)} \]
How to read it: \(D^{(\ell)}(R)\) is a rule telling us how this particular kind of feature should change when the molecule is rotated. You do not need to calculate \(D^{(\ell)}\) by hand to understand the architecture. For \(\ell=0\), the rule does nothing; for \(\ell=1\), it is ordinary vector rotation.

For \(\ell=0\), \(D^{(0)}(R)=1\), so the feature is a scalar. For \(\ell=1\), \(D^{(1)}(R)\) is the ordinary 3D rotation matrix, so the feature behaves like a vector. Higher \(\ell\) values encode increasingly detailed angular patterns and have \(2\ell+1\) components.

Why this matters chemically:

Distances and energies should not depend on how the complex is oriented on the screen. Directional coordinate updates should rotate with the complex. Equivariance builds that physical requirement into the network instead of asking the training data to teach it from examples.

Deep-learning building blocks

Embeddings

An atom type begins as a discrete label. An embedding lookup maps it to a trainable vector:

\[ \operatorname{embed}:\{\text{C,N,O,S,\ldots}\} \longrightarrow\mathbb R^d \]
How to read it: the left side is a discrete choice such as “C” or “O.” The arrow means “convert it into.” The result is a vector of \(d\) learned numbers. This is a lookup table, not a 3D coordinate.

The vector is not a manually meaningful “oxygen coordinate.” It is a learned location in feature space that helps subsequent layers distinguish chemical contexts.

MLPs

A multilayer perceptron applies learned channel mixing and nonlinearities:

\[ \operatorname{MLP}(x) = W_2\,\phi(W_1x+b_1)+b_2 \]
How to read it: start with \(x\), apply the first linear transformation \(W_1x+b_1\), bend the result with the nonlinear function \(\phi\), and apply a second linear transformation. The MLP is a flexible learned calculator for feature vectors.

In the distance module, MLPs turn encoded ligand–protein features into predicted distances. In the denoiser, they help transform hidden representations into attention weights and coordinate updates.

Attention

Attention is a learned weighted average. Queries ask what an atom is looking for, keys describe what other atoms offer, and values carry the information that is aggregated.

\[ \alpha_{ij} = \operatorname{softmax}_j \left( \frac{q_i k_j^\mathsf T}{\sqrt d}+b_{ij} \right), \qquad h_i'=\sum_j\alpha_{ij}v_j \]
How to read it: \(q_i\) is atom \(i\)'s question, \(k_j\) is atom \(j\)'s description, and \(v_j\) is the information atom \(j\) can send. Their similarity gives a raw importance score. Softmax turns all raw scores into positive weights that add to 1. The final equation is a weighted average of the messages \(v_j\).
Chemistry analogy:

An oxygen atom may “ask” whether a nearby donor, aromatic system, or hydrophobic group is relevant. Attention is the learned procedure that assigns those possible partners different weights in the current context. It is not a hand-coded hydrogen-bond rule.

EC-Dock's distance predictor uses pair geometry as an attention bias \(b_{ij}\). Its Equiformer denoiser instead constructs equivariant edge messages and obtains scalar attention weights from them.

Residual connections and normalization

A residual block has the form \(h'\!=h+\operatorname{Block}(h)\). It lets information and gradients flow through a deep network without every layer having to relearn the identity function. Layer normalization rescales feature channels to stabilize optimization. Neither operation is a chemical energy term.

Plain reading: a residual connection says “keep what I already know, then add a correction.” Normalization says “keep feature magnitudes in a numerically comfortable range.” These are training stabilizers, like using sensible scales during numerical optimization.

Panel C: the distance-prediction module

The optional distance branch first predicts geometric constraints before the coordinate denoiser runs:

\[ (G_L,G_P) \xrightarrow{\ d_\phi\ } \left(\widehat D^{LP},\widehat D^{LL}\right) \xrightarrow{\ \widehat D^{LP}_{ij}\lt 4.5\ \mathring{\mathrm A}\ } \operatorname{Adj}^{LP} \]
How to read it: feed the ligand and pocket graphs into a distance network \(d_\phi\). It predicts ligand–protein distances \(\widehat D^{LP}\) and ligand internal distances \(\widehat D^{LL}\). Then keep the cross-molecular pairs predicted to be closer than 4.5 Å. The final object is not a pose; it is a list of likely contacts.

Each ligand and protein atom receives a learned embedding. Pairwise distances are expanded into type-dependent Gaussian basis functions:

\[ p_{ij,s} = \exp\!\left[ -\frac{ \left(u_{t_{ij}}d_{ij}+v_{t_{ij}}-\mu_s\right)^2 }{2\sigma_s^2} \right] \]
How to read it: \(d_{ij}\) is an input distance and \(t_{ij}\) is the atom-pair type. The Gaussian is largest when the type-adjusted distance is near its learned center \(\mu_s\). The width \(\sigma_s\) says how broad that preference is. Each basis function is a smooth “distance detector.”

Separate 15-layer 3D attention encoders process ligand and pocket representations. A four-layer decoder then mixes the two systems and predicts both cross-molecular and intraligand distances. The distance targets are trained with MSE:

\[ L_{\mathrm{dist}} = \lambda_{\mathrm{cross}} \frac{1}{|P_{\mathrm{cross}}|} \sum_{(i,j)\in P_{\mathrm{cross}}} \left(\widehat D_{ij}-D_{ij}\right)^2 + \lambda_{\mathrm{intra}} \frac{1}{|P_{\mathrm{intra}}|} \sum_{(i,j)\in P_{\mathrm{intra}}} \left(\widehat D_{ij}-D_{ij}\right)^2 \]
How to read it: there are two averages. The first averages errors over ligand–protein pairs; the second averages errors over intraligand pairs. The \(\lambda\) values say how strongly the two kinds of errors matter relative to each other.
The distance map is a learned interaction prior. The 4.5 Å cutoff converts a continuous prediction into a sparse graph that tells the denoiser where to spend geometric attention. It is not itself a complete docking score.

Panel B: the Equiformer denoiser

The denoiser receives the current noisy coordinates \(X_\sigma\), atom features, graph edges, the pocket coordinates, and an embedding of \(\sigma\). It outputs a coordinate prediction through a skip connection:

\[ f_\theta(X_\sigma,\sigma\mid C) = c_{\mathrm{skip}}(\sigma)X_\sigma + c_{\mathrm{out}}(\sigma) F_\theta(X_\sigma,\sigma\mid C) \]
How to read it: take the noisy coordinates as a baseline (\(c_{\mathrm{skip}}X_\sigma\)), then add a learned correction from the large network \(F_\theta\). The two \(c\) coefficients control how much baseline and correction are used at this noise level.

Here \(C=(G_L^{2D},G_P^{3D},\operatorname{Adj}^{LP})\), and \(F_\theta\) is the modified Equiformer-v2 network.

What one equivariant graph-attention block does

  1. Construct relative edge vectors \(r_{ij}=x_j-x_i\).
  2. Combine node features, edge type, distance, and direction.
  3. Use an equivariant convolution to make scalar and higher-order edge messages.
  4. Use scalar components to calculate attention weights.
  5. Multiply equivariant messages by those scalar weights.
  6. Aggregate messages at each atom.
  7. Use first-order features to predict coordinate changes.
\[ f_{ij} = \operatorname{eSCN}(h_i,h_j,r_{ij}), \qquad a_{ij} = \operatorname{softmax}_j \left(\operatorname{MLP}(f_{ij}^{(0)})\right) \]
How to read it: eSCN combines the features of atoms \(i,j\) with the direction from one atom to the other. \(f_{ij}^{(0)}\) means “take only the scalar part.” The MLP converts that scalar evidence into attention scores, and softmax makes them comparable across neighbors.
\[ h_i^{(\ell)} = \sum_{j\in\mathcal N(i)} a_{ij}\,m_{ij}^{(\ell)}, \qquad \Delta x_i = W_x h_i^{(1)} \]
How to read it: for atom \(i\), add up the messages from its neighbors. The superscript \((\ell)\) identifies the angular type of the feature; \(h_i^{(1)}\) behaves like a vector. Therefore the output \(\Delta x_i\) can be used as a coordinate displacement.

The notation \(h_i^{(\ell)}\) here means the feature transforming under angular order \(\ell\), not neural-network layer number. The paper's denoiser uses higher-order angular features to represent directional pocket–ligand geometry and obtains Cartesian updates from \(\ell=1\).

Equivariance test

If the input complex is transformed by \(g=(R,t)\), the desired behavior is

\[ f_\theta(RX+t,\;RC+t) = Rf_\theta(X,C)+t \]
How to read it: rotate and translate the input first, or predict the pose first and rotate and translate the output afterward. The equation says both routes give the same result. That is the mathematical definition of equivariance.

Distances, dot products, and attention weights can remain invariant while vector and coordinate features transform. This separation is the mathematical core of an SE(3)-equivariant network.

Diffusion and consistency training

Forward noising

Given a training pose \(X_0\), EC-Dock creates a noisy pose at scale \(\sigma\):

\[ X_\sigma=X_0+\sigma z, \qquad z\sim\mathcal N(0,I) \]
How to read it: begin with the clean pose \(X_0\). Draw random standard-Gaussian numbers \(z\). Multiply them by \(\sigma\), then add them to the coordinates. Large \(\sigma\) means larger random displacements.
One coordinate example:

If one coordinate is \(2.0\) Å, the sampled noise is \(z=0.4\), and \(\sigma=3\), the noisy coordinate is \(2.0+3(0.4)=3.2\) Å. Real molecules use a random number for every Cartesian coordinate.

Large noise erases fine geometry. Small noise preserves most of it. The network is told the noise level, so it knows whether it should make a broad placement correction or a fine coordinate correction.

Consistency objective

Choose neighboring noise levels \(\sigma_i\) and \(\sigma_{i+1}\), using the same \(z\). The two states are on the same noising trajectory:

\[ X_{\sigma_i}=X_0+\sigma_i z, \qquad X_{\sigma_{i+1}}=X_0+\sigma_{i+1}z \]
How to read it: use the same clean pose and the same random pattern \(z\), but scale that pattern by two different noise amplitudes. The two structures are therefore related versions of the same example, not unrelated training examples.

The core consistency loss asks both inputs to produce the same clean answer:

\[ L_{\mathrm{cons}} = \rho\!\left( f_\theta(X_{\sigma_{i+1}},\sigma_{i+1}\mid C), f_{\theta^-}(X_{\sigma_i},\sigma_i\mid C) \right) \]
How to read it: run the network on the more-noisy input and on the less-noisy input. Compare the two predicted poses with \(\rho\). Training tries to make their difference small. The superscript minus on \(\theta^-\) means that this branch is treated as a target while updating the other branch.

\(\theta^-\) denotes a stop-gradient or teacher copy in the usual consistency-training formulation. The important idea is not the exact implementation detail: predictions from different noise levels should agree on one endpoint.

Sampling

At inference, start at high noise and repeatedly apply the learned map. Each new random noise seed can produce another candidate pose.

\[ X_T\sim\mathcal N(0,T^2I), \qquad X_{\mathrm{pose}} = f_\theta(X_T,T\mid C) \quad\text{(one-step version)} \]
How to read it: draw a random coordinate cloud \(X_T\) whose spread is \(T\), then give it to the trained denoiser with the instruction “this is noise level \(T\).” The network produces one candidate pose. Repeat with another random cloud to obtain another candidate.

EC-Dock can also re-inject noise between denoising calls. The published experiments commonly use five sampling steps, while the consistency formulation makes one-step generation possible.

Rendered plots and diagrams

The first three visuals are explanatory plots. The benchmark chart uses the Top-1 PoseBusters v1 values reported in Table 4 of the main paper; it is included to connect architecture to reported behavior, not as a new benchmark analysis.

Illustrative five-level Karras noise schedule Noise decreases from 80 to 0.002 across five reverse denoising levels on a logarithmic vertical axis. 80 2.5 0.002 reverse denoising step log noise scale σ T1 23 ε high noise → clean pose
With \(\sigma_{\min}=0.002\), \(\sigma_{\max}=80\), and \(\rho=7\), a Karras-style schedule allocates steps logarithmically. The model is trained to make predictions agree along this path.
Illustrative Gaussian radial basis functions Three smooth Gaussian basis responses over interatomic distance. 02 46 8 Å 10 interatomic distance basis response basis 1 basis 2 basis 3
Distance prediction begins by expanding \(d_{ij}\) into smooth, type-dependent radial channels. Their centers and widths are learned, much like a flexible radial interaction basis.
Consistency training schematic Two noisy inputs at different noise levels are mapped to the same clean endpoint. noise level σ decreases → predicted pose coordinate high-noise input lower-noise input same endpoint consistency objective
The two inputs are different points on one noising trajectory, but the network is trained to map both to the same clean pose. This is why consistency models can use far fewer denoising evaluations.
Reported PoseBusters v1 Top-1 success rates Bar chart of selected Top-1 success rates from EC-Dock Table 4. 00.25 0.500.75 1.00 DiffDock Glide CarsiDock Uni-Mol EC-Dock EC-refine 0.2390.453 0.7350.776 0.8180.815 Top-1 RMSD < 2 Å success rate
Selected values from the paper's PoseBusters v1 Table 4: DiffDock 0.2392, Glide 0.4534, CarsiDock 0.7354, Uni-Mol Docking v2 0.7757, EC-Dock 0.8175, and EC-Dock-refine 0.8146. This chart is a reported result, not a claim that architecture alone determines ranking.

Training versus inference

Stage What is available What the network does
Training Native crystal pose \(X_0\), pocket, ligand graph, random noise Predicts clean coordinates and is penalized for inconsistency and geometric error
Distance training Native ligand–protein and intraligand distances Fits \(\widehat D^{LP}\) and \(\widehat D^{LL}\) with distance losses
Inference Pocket, ligand, initial/noisy coordinates, random seed Generates one or more candidate poses without gradient descent
Postprocessing Generated pose MMFF or another refinement method repairs local geometry; RTMScore ranks poses

The Supporting Information describes PDBbind v2020 and BindingNet v2 for training, pocket cropping, atom-type preprocessing, and ETKDG-generated ligand conformers. The crystal coordinates are labels; the independent input conformer is important because the model must learn to transform an imperfect starting geometry.

How to read RMSD and the benchmark labels

RMSD is the root-mean-square distance between corresponding atoms after whatever alignment convention the benchmark uses:

\[ \operatorname{RMSD}(X,Y) = \sqrt{ \frac{1}{N} \sum_{i=1}^{N} \lVert x_i-y_i\rVert_2^2 } \]
How to read it: calculate each atom's distance from its reference position, square those distances, average them, and take the square root to return to Å. RMSD \(\lt 2\) Å means the average coordinate disagreement is below that benchmark threshold; it does not by itself prove that every bond or contact is physically valid.

Top-1 is the pose the method ranks first. Best-1 is the closest pose among all generated candidates, so it measures whether the generator found a good pose even if the ranker failed to select it. PoseBusters validity is a separate physical-chemistry check.

How to read the paper and local code

  1. Start with Figure 1 in the main paper. Identify \(X\), \(\sigma\), the graphs, and \(\operatorname{Adj}^{LP}\).
  2. Read main paper §3.1–§3.3 for the consistency function, loss, and sampler.
  3. Read main paper §3.4 and Supporting Information §S3 for Equiformer and irreducible representations.
  4. Read main paper §3.5 and Supporting Information §S2 for the distance predictor.
  5. Inspect the local implementation in this order: config.py, denoiser.py, update_general.py, distance.py, and consistency.py.
Implementation caution: the paper's Figure 1 visually labels the denoiser with 12 repeated blocks, while the text says 10. The local port documents 10 layers and has some configuration differences. For a particular checkpoint, treat its saved configuration as the source of truth. The local README also describes the port as a trainable baseline rather than an identical reproduction of every published benchmark.

A compact mastery checklist

You understand the architecture when you can explain these five points:

  1. \(H\), \(E\), and \(X\) are feature, edge, and coordinate tensors with different transformation behavior.
  2. Attention is a learned weighted sum; pair geometry changes those weights.
  3. Equivariance means a rotated input produces a rotated output, not an unrelated prediction.
  4. Diffusion supplies a path from noise to data; consistency training makes distant points on that path agree on the endpoint.
  5. The distance module supplies a learned contact prior, while denoising, force-field refinement, and pose ranking are separate operations.

The next mathematical deep dive, if needed, is spherical harmonics and Wigner-\(D\) matrices: those are the tools behind the \(D^{(\ell)}(R)\) notation and Equiformer's higher-order angular channels. They are not required to understand the overall EC-Dock data flow, but they are the right next step for reading the Equiformer implementation line by line.