Graphormer describes these phenomena by utilizing a multiheaded self-attention mechanism which allows for contextual descriptions that represent contextual relationships between nodes (atoms) and edges (bonds). Graphormer also uses a robust consideration of the input graph structure to ensure a rich consideration of the complex relationships described in graphs. Edge and spatial encodings (that are indexed to the shortest distance between connected node pairs) are passed to the attention mechanism, allowing Graphormer to learn contextual relationships that depend on graph structure and include scaling based on graph distance. Graphormer also utilizes a global receptive field, meaning that all nodes in a graph consider relationships with all other nodes in the graph in the attention mechanism. As such, the embeddings generated by Graphormer might consider important long range chemical interactions in a molecule (e.g., hydrogen bonding).