To compute the embeddings, we optimize the distance-based loss function proposed in [1]}. Given graph distances \(\lbrace d_{G}(X_i, X_j)\rbrace _{ij}\)  between all pairs of connected nodes, the loss is defined as:
\(\mathcal {L}(x) = \sum _{1 \le i \le j \le n} \left| \left( \frac{d_{\mathcal {P}}(x_i, x_j)}{d_{G}(X_i, X_j)} \right)^2 - 1\right|\) 
