All models

ARLinkPredictor

A link predictor that scores node pairs by an attract dot product minus a repel dot product.

Graphs and geometry · 17 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (21 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
200.1K
Operations
17
Framework
PyTorch
Recurrent
No
Published
2021
Cited by
2 (as of 12 November 2026)
Authors
Alexander Peysakhovich, Anna Klimovskaia Susmel, Leon Bottou
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m53
Graph hash
21da00b5daf38adc747e55da6ae2c44d328e15d83987e212a474e404d84c4f4b
Skeleton hash
589d391a692c211d86495cc497283d38a5ec26cd524302679f922fabafea2774
Architecture hash
f05790b9a033915570740496eba57f15656ed2c8fb832ad73ced9242a69cc941
Diagram SHA-256
23aea2be86241030d11202de91541371d09f58c756a3f961d6869b4fd629fc97
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

Attract-repel (AR) embeddings score the links of a graph by splitting each node's vector into two parts, one on which similar nodes attract and one on which they repel. The strength of an edge between two nodes is the dot product of their attract vectors minus the dot product of their repel vectors. The paper describes this as embedding the nodes into a pseudo-Euclidean space.

The motivation is that ordinary dot product embeddings make a strong transitivity assumption, while many real graphs contain non-transitive relationships, where A is strongly connected to B and B to C but A is not connected to C. The paper names heterophily and role similarity as forces that produce such patterns in real networks.

For link prediction, the paper says the AR decomposition can be slotted into the loss function of any model that outputs node embedding vectors. It tests this with graph convolutional networks on Cora, Citeseer, Wisconsin, Texas and Cornell, and reports that the pseudo-Euclidean versions perform better in link prediction when the underlying graphs are intransitive.

Key idea. The paper embeds graph nodes in a pseudo-Euclidean space, giving each node an attract vector and a repel vector, which removes the transitivity assumption of dot product embeddings.

  • arlinkpredictor
  • attract-repel
  • attract-repel embeddings
  • ar embedding
  • pseudo-euclidean embeddings
  • link prediction
  • heterophily
  • non-transitive graphs
  • graph embedding

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{peysakhovich2023pseudoeuclideanattractrepelembeddingsundirected,
      title={Pseudo-Euclidean Attract-Repel Embeddings for Undirected Graphs}, 
      author={Alexander Peysakhovich and Anna Klimovskaia Susmel and Leon Bottou},
      year={2023},
      eprint={2106.09671},
      archivePrefix={arXiv},
      primaryClass={cs.SI},
      url={https://arxiv.org/abs/2106.09671}, 
}