OGB
ogbg-code2
Structure
452,741Graphs
125Nodes
124Edges
1Classes
Coverage
39Results
1Variants
17Papers
- NeurIPS 2025: Generalizable Insights for Graph Transformers in Theory and Practice Generalizable Insights for Graph Transformers in Theory and Practice NeurIPS 2025
- State Space Models over Directed Graphs State Space Models over Directed Graphs
- AAAI 2024: A Scalable and Effective Alternative to Graph Transformers A Scalable and Effective Alternative to Graph Transformers AAAI 2024
- Higher-Order Expander Graph Propagation Higher-Order Expander Graph Propagation
- ICML 2023: On the Connection Between MPNN and Graph Transformer On the Connection Between MPNN and Graph Transformer ICML 2023
- Neural Information Processing Systems: Transformers over Directed Acyclic Graphs Transformers over Directed Acyclic Graphs Neural Information Processing Systems
- International Conference on Machine Learning: Structure-Aware Transformer for Graph Representation Learning Structure-Aware Transformer for Graph Representation Learning International Conference on Machine Learning
- Neural Information Processing Systems: Representing Long-Range Context for Graph Neural Networks with Global Attention Representing Long-Range Context for Graph Neural Networks with Global Attention Neural Information Processing Systems
- First Place Solution of KDD Cup 2021 & OGB Large-Scale Challenge Graph Prediction Track First Place Solution of KDD Cup 2021 & OGB Large-Scale Challenge Graph Prediction Track
- International Conference on Machine Learning: E(n) Equivariant Graph Neural Networks E(n) Equivariant Graph Neural Networks International Conference on Machine Learning
- International Conference on Learning Representations: Directed Acyclic Graph Neural Networks Directed Acyclic Graph Neural Networks International Conference on Learning Representations
- International Conference on Learning Representations: How Powerful are Graph Neural Networks? How Powerful are Graph Neural Networks? International Conference on Learning Representations
- Neural Information Processing Systems: Hierarchical Graph Representation Learning with Differentiable Pooling Hierarchical Graph Representation Learning with Differentiable Pooling Neural Information Processing Systems
- International Conference on Learning Representations: Graph Attention Networks Graph Attention Networks International Conference on Learning Representations
- Neural Information Processing Systems: Inductive Representation Learning on Large Graphs Inductive Representation Learning on Large Graphs Neural Information Processing Systems
- arXiv: Numerical Analysis: Neural Message Passing for Quantum Chemistry Neural Message Passing for Quantum Chemistry arXiv: Numerical Analysis
- International Conference on Learning Representations: Semi-Supervised Classification with Graph Convolutional Networks Semi-Supervised Classification with Graph Convolutional Networks International Conference on Learning Representations
Set-valued graph prediction Predict the subtokens in a Python method’s name from the method body represented as an abstract syntax tree. Evaluated by F1.
Dataset details
Task
Predict the subtokens in a Python method’s name from the method body represented as an abstract syntax tree. The graph-level output is a sequence, but the official F1 score compares sets of predicted and reference subtokens and therefore does not reward the correct subtoken order.
Data
The 452,741 methods originate from CodeSearchNet and were extracted from 13,587 popular GitHub repositories. OGB parses each method into an abstract syntax tree and augments the tree with next-token edges; inverse edges are normally added for bidirectional message passing.
Features
AST nodes encode a node type drawn from 97 types, an attribute such as a variable name, depth, and preorder traversal position. The target method name on the root function-definition node, including recursive occurrences, is replaced with a special mask token to prevent direct target leakage. Edge features distinguish AST, next-token, and inverse-edge direction information.
Splits and evaluation
The official project split assigns whole repositories to only one of training, validation, or test, testing transfer to unseen codebases. Targets are truncated to five subtokens for the published baseline setup, using a 5,000-subtoken vocabulary plus an unknown token. Performance is the F1 score over predicted and reference subtokens.
Quirks and pitfalls
The predecessor ogbg-code dataset is deprecated because method names leaked through the input AST; results from it are not comparable to ogbg-code2. A random method-level split is substantially easier and permits project-specific naming conventions to cross split boundaries. The usual F1 metric is order-insensitive, so it does not fully measure method-name generation quality.
Sources
OGB project split.
SOTA Progression
new SOTA
matches SOTA at that time
other proposed result
other baseline result
Leaderboard
| # | Model | F1 ↑ | Paper |
|---|---|---|---|
| 1 | GMN | 0.2060
±
0.0020 | |
| 2 | DirGraphSSM | 0.2050
±
0.0023 | |
| 3 | Graph-Mamba | 0.2030
±
0.0023 | |
| 4 | DAG+SAT | 0.2020
±
0.0020 | |
| 5 | Exphormer | 0.1990
±
0.0020 | |
| 6 | LPE | 0.1948
±
0.0021 | |
| 7 | RRWP | 0.1942
±
0.0010 | |
| 8 | SAT | 0.1940
±
0.0030 | |
| 9 | RWSE | 0.1939
±
0.0047 | |
| 10 | K-Subtree SAT | 0.1937
±
0.0028 | |
| 11 | k-subtree SAT-PNA | 0.1937
±
0.0028 | |
| 12 | SPE | 0.1935
±
0.0021 | |
| 13 | k-subtree SAT-GCN | 0.1934
±
0.0020 | |
| 14 | NoPE | 0.1927
±
0.0020 | |
| 15 | GECO | 0.1915
±
0.0020 | |
| 16 | k-subtree SAT-GIN | 0.1910
±
0.0023 | |
| 17 | GPS | 0.1894
±
0.0024 | |
| 18 | GraphGPS | 0.1890
±
0.0020 | |
| 19 | DAG+Transformer | 0.1880
±
0.0020 | |
| 20 | GraphTrans (GCN-Virtual) | 0.1830
±
0.0024 | |
| 21 | GraphTrans | 0.1830
±
0.0024 | |
| 22 | PACE | 0.1780
±
0.0020 | |
| 23 | DAGNN (SOTA) | 0.1751
±
0.0049 | |
| 24 | DAGNN | 0.1750
±
0.0050 | |
| 25 | MPNN + VN + NoPE | 0.1727
±
0.0017 | |
| 26 | MagNet | 0.1690
±
0.0020 | |
| 27 | Transformer | 0.1670
±
0.0015 | |
| 28 | DiGCN | 0.1670
±
0.0020 | |
| 29 | DirGNN | 0.1660
±
0.0020 | |
| 30 | GCN-virtual | 0.1595
±
0.0018 | |
| 31 | GIN-virtual | 0.1581
±
0.0020 | |
| 32 | PNA | 0.1570
±
0.0032 | |
| 33 | GAT | 0.1570
±
0.0020 | |
| 34 | higher-order expander graph propagation | 0.1519
±
0.0020 | |
| 35 | GCN | 0.1507
±
0.0018 | |
| 36 | EGP | 0.1497
±
0.0015 | |
| 37 | GIN | 0.1495
±
0.0023 | |
| 38 | Plain GIN | 0.1495
±
0.0023 | |
| 39 | GIN + 3-Regular Bipartite Expander + Summation | 0.1254
±
0.0029 |
SOTA performance
set a new SOTA at the time
matched the SOTA at the time