Skip to content

Commit 308552a

Browse files
author
OpenClaw
committed
doc: add theory section for DPA-2 descriptor
Authored by OpenClaw (model: gpt-5.3-codex)
1 parent 65eea4b commit 308552a

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

doc/model/dpa2.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,42 @@ The DPA-2 model implementation. See [DPA-2 paper](https://doi.org/10.1038/s41524
88

99
Training example: `examples/water/dpa2/input_torch_medium.json`, see [README](../../examples/water/dpa2/README.md) for inputs in different levels.
1010

11+
## Theory
12+
13+
DPA-2 is an attention-based descriptor designed to learn expressive local atomic representations while preserving the physical symmetries required by interatomic potentials.
14+
15+
### Local environment and representation
16+
17+
For each central atom $\alpha$, neighbors $\beta \in \mathcal{N}(\alpha)$ are selected within a cutoff radius. DPA-2 encodes each local environment through geometric features (relative coordinates and derived invariants) and element/type information.
18+
19+
The descriptor is built hierarchically:
20+
21+
1. **Initial embedding**: geometric and type features are projected into latent channels.
22+
1. **Attention-based interaction**: stacked attention layers model neighbor-neighbor and center-neighbor correlations in the local environment.
23+
1. **Output descriptor**: atom-wise latent features after the final layer are used as descriptor outputs for downstream fitting/model components.
24+
25+
### Attention-based message passing
26+
27+
DPA-2 uses attention to aggregate neighbor information with data-dependent weights. Conceptually, each layer computes:
28+
29+
```math
30+
\mathbf{h}_\alpha^{(l+1)} = \mathbf{h}_\alpha^{(l)} + \mathrm{Attn}^{(l)}\left(\mathbf{h}_\alpha^{(l)}, \{\mathbf{h}_\beta^{(l)}\}_{\beta\in\mathcal{N}(\alpha)}, \{\mathbf{g}_{\alpha\beta}\}_{\beta\in\mathcal{N}(\alpha)}\right)
31+
```
32+
33+
where $\mathbf{h}$ denotes latent node features and $\mathbf{g}_{\alpha\beta}$ denotes geometry-conditioned pair features. Residual updates enable stable deep stacking.
34+
35+
### Physical symmetries
36+
37+
DPA-2 is constructed to satisfy key symmetry requirements of atomistic modeling:
38+
39+
1. **Translational invariance**: only relative coordinates are used.
40+
1. **Rotational behavior**: internal geometric constructions are designed so that final scalar descriptor channels used downstream are rotationally invariant.
41+
1. **Permutational invariance**: atoms of the same species are treated identically under permutation (re-labeling) operations.
42+
43+
### Multi-task training context
44+
45+
DPA-2 is commonly used in a multi-task setting. The descriptor is shared, while task-specific heads/objectives are handled downstream. See [Multi-task training](../train/multi-task-training.md) for framework details.
46+
1147
## Requirements of installation {{ pytorch_icon }}
1248

1349
If one wants to run the DPA-2 model on LAMMPS, the customized OP library for the Python interface must be installed when [freezing the model](../freeze/freeze.md).

0 commit comments

Comments
 (0)