Our proposed APAN method adopts a general network architecture for learning 2D and 3D molecular representations, as shown in Fig. . Given a molecule M, its struc-ture can be represented either as a 2D graph M 2D or a 3D conformation M 3D . The model can take 2D molecular structure M 2D , ligand 3D conformation and proteinligand complex structure as input depending on if the task is to predict molecular property or protein-ligand binding affinity. The APAN contains two major layers, i.e. Atom Pairing Layer. For each molecule, its atomic feature is denoted as E ∈ R n * d , where n is the number of atoms, and d is the dimension of atom feature. We define several atom types representing the most common elements that can be found in organic compound: C, H, O, N, S, P, F, Cl, Br, I. Additionally, we also define important properties such as hybridization types, aromatic types, formal charge types and other atomic attributes of each atom. The atom feature E is defined as a one-hot vector representing those attributes. For atom i and j, their atom pair embedding is denoted as T ij and its initial value T 0 ij is set by the atom pair features E ij , which is obtained via an pairing function P (E i , E j ) operating on features E i (for atom i) and E j (for atom j). Detailed definition of pairing module will be introduced in the following sections. The pair representation and atom-pair communication were firstly proposed in the Evoformer in AlphaFold2 . Recently, the atom-to-pair communication was also proposed by Zhou et al. . Inspired by these works, we propose a pair-to-pair communication procedure and each pairwise embedding was updated by triangular consistency of pairwise embeddings, as shown in Fig. . Pair-to-Pair Communication. We establish the PPC process to learn molecular representation. Specifically, We use the pair embedding itself as the bias term in the multi-head self-attention mechanism to update atom pair embedding, as shown in Fig. . Given the atom pair T (l) ij as the input to the (l+1)-th block and define