# BPP Reconstruction from Embeddings
Let:
- $W_Q^{D, D}$ := Linear projection matrix for queries
- $W_K^{D, D}$ := Linear projection matrix for keys
- $V^{N,D}$ := Sequence/Structure embeddings (last GCN output)
Then the base-pairing probability matrix (BPP) can be computed from the node-embedding as
BPP = $softmax(Q^{N,D} \times (K^{N,D})^T, axis=1)$,
with $Q^{N,D} = V^{N,D} \times W_Q^{D, D}$ and $K^{N,D} = V^{N,D} \times W_K^{D, D}$.
Analogously, the BPP for M < N masked positions can be obtained as
$BPP_{mask}$ = $softmax(Q^{M,D} \times (K^{M,D})^T, axis=1)$