{"about":{"non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","site":"https://codewithpapers.app","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page","syntology":{"site":"https://syntology.ai","developers":"https://syntology.ai/developers","mcp":{"server":"https://syntology.ai/mcp","transport":"streamable-http","server_card":"https://syntology.ai/.well-known/mcp/server-card.json","auth":{"type":"trial token, no account","trial_token":"https://syntology.ai/api/oauth/trial/token","method":"POST","docs":"https://syntology.ai/developers"}},"have":"https://syntology.ai/api/graph/have?x=<method, arXiv id or title> (free, answers coverage only)","paper_base":"https://syntology.ai/paper/","atlas_base":"https://app.syntology.ai/?focus="},"machine_readable":[{"url":"https://codewithpapers.app/llms.txt","what":"the machine catalog: every machine-readable file, counted"},{"url":"https://codewithpapers.app/index/manifest.json","what":"paper-to-code index by arXiv id, with Syntology's counts"},{"url":"https://codewithpapers.app/search/manifest.json","what":"site search index (titles, authors) and its files"},{"url":"https://codewithpapers.app/download","what":"bulk files: Syntology's layer, described there"},{"url":"https://codewithpapers.app/build_manifest.json","what":"the build record: inputs, counts, exclusions, probes"}]},"url":"/paper/do-transformers-really-perform-bad-for-graph","title":"Do Transformers Really Perform Bad for Graph Representation?","arxiv_id":"2106.05234","date":"2021-06-09","proceeding":null,"authors":["Chengxuan Ying","Tianle Cai","Shengjie Luo","Shuxin Zheng","Guolin Ke","Di He","Yanming Shen","Tie-Yan Liu"],"abstract":"The Transformer architecture has become a dominant choice in many domains, such as natural language processing and computer vision. Yet, it has not achieved competitive performance on popular leaderboards of graph-level prediction compared to mainstream GNN variants. Therefore, it remains a mystery how Transformers could perform well for graph representation learning. In this paper, we solve this mystery by presenting Graphormer, which is built upon the standard Transformer architecture, and could attain excellent results on a broad range of graph representation learning tasks, especially on the recent OGB Large-Scale Challenge. Our key insight to utilizing Transformer in the graph is the necessity of effectively encoding the structural information of a graph into the model. To this end, we propose several simple yet effective structural encoding methods to help Graphormer better model graph-structured data. Besides, we mathematically characterize the expressive power of Graphormer and exhibit that with our ways of encoding the structural information of graphs, many popular GNN variants could be covered as the special cases of Graphormer.","url_abs":"https://arxiv.org/abs/2106.05234v5","url_pdf":"https://arxiv.org/pdf/2106.05234v5.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"do-transformers-really-perform-bad-for-graph","repo_url":"https://github.com/Microsoft/Graphormer","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"do-transformers-really-perform-bad-for-graph","repo_url":"https://github.com/dpstart/graphormer_new","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"do-transformers-really-perform-bad-for-graph","repo_url":"https://github.com/ytchx1999/Graphormer/tree/main/examples/ogb","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"do-transformers-really-perform-bad-for-graph","repo_url":"https://github.com/microsoft/Graphormer","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"do-transformers-really-perform-bad-for-graph","repo_url":"https://github.com/yangyucheng000/University/tree/main/model-2/graphormer","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"mindspore","reach":null}],"tasks":[{"task_slug":"graph-classification","task_name":"Graph Classification"},{"task_slug":"graph-property-prediction","task_name":"Graph Property Prediction"},{"task_slug":"graph-regression","task_name":"Graph Regression"},{"task_slug":"graph-representation-learning","task_name":"Graph Representation Learning"},{"task_slug":"molecular-property-prediction","task_name":"Molecular Property Prediction"},{"task_slug":"representation-learning","task_name":"Representation Learning"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/graph-classification-on-imdb-b","task":"Graph Classification","dataset":"IMDb-B","model":"Graphormer","rank_in_archive_order":15,"of":51,"metrics":{"Accuracy":"77.500±2.646"},"uses_additional_data":false},{"leaderboard":"/sota/graph-classification-on-nci1","task":"Graph Classification","dataset":"NCI1","model":"Graphormer","rank_in_archive_order":44,"of":69,"metrics":{"Accuracy":"77.032±1.393"},"uses_additional_data":false},{"leaderboard":"/sota/graph-classification-on-nci109","task":"Graph Classification","dataset":"NCI109","model":"Graphormer","rank_in_archive_order":28,"of":38,"metrics":{"Accuracy":"74.879±1.183"},"uses_additional_data":false},{"leaderboard":"/sota/graph-property-prediction-on-ogbg-molhiv","task":"Graph Property Prediction","dataset":"ogbg-molhiv","model":"Graphormer + FPs","rank_in_archive_order":7,"of":43,"metrics":{"Ext. data":"No","Number of params":"47085378","Test ROC-AUC":"0.8225 ± 0.0001","Validation ROC-AUC":"0.8396 ± 0.0001"},"uses_additional_data":false},{"leaderboard":"/sota/graph-property-prediction-on-ogbg-molhiv","task":"Graph Property Prediction","dataset":"ogbg-molhiv","model":"Graphormer","rank_in_archive_order":15,"of":43,"metrics":{"Ext. data":"Yes","Number of params":"47183040","Test ROC-AUC":"0.8051 ± 0.0053","Validation ROC-AUC":"0.8310 ± 0.0089"},"uses_additional_data":false},{"leaderboard":"/sota/graph-property-prediction-on-ogbg-molhiv","task":"Graph Property Prediction","dataset":"ogbg-molhiv","model":"Graphormer (pre-trained on PCQM4M)","rank_in_archive_order":16,"of":43,"metrics":{"Ext. data":"Yes","Number of params":"47183040","Test ROC-AUC":"0.8051 ± 0.0053","Validation ROC-AUC":"0.8310 ± 0.0089"},"uses_additional_data":false},{"leaderboard":"/sota/graph-property-prediction-on-ogbg-molpcba","task":"Graph Property Prediction","dataset":"ogbg-molpcba","model":"Graphormer","rank_in_archive_order":5,"of":36,"metrics":{"Number of params":"119529664","Test AP":"0.3140 ± 0.0032","Validation AP":"0.3227 ± 0.0024"},"uses_additional_data":false},{"leaderboard":"/sota/graph-property-prediction-on-ogbg-molpcba","task":"Graph Property Prediction","dataset":"ogbg-molpcba","model":"Graphormer (pre-trained on PCQM4M)","rank_in_archive_order":6,"of":36,"metrics":{"Ext. data":"Yes","Number of params":"119529664","Test AP":"0.3140 ± 0.0032","Validation AP":"0.3227 ± 0.0024"},"uses_additional_data":false},{"leaderboard":"/sota/graph-regression-on-esr2","task":"Graph Regression","dataset":"ESR2","model":"Graphormer","rank_in_archive_order":9,"of":9,"metrics":{"R2":"OOM","RMSE":"OOM"},"uses_additional_data":false},{"leaderboard":"/sota/graph-regression-on-f2","task":"Graph Regression","dataset":"F2","model":"Graphormer","rank_in_archive_order":9,"of":9,"metrics":{"R2":"OOM","RMSE":"OOM"},"uses_additional_data":false},{"leaderboard":"/sota/graph-regression-on-kit","task":"Graph Regression","dataset":"KIT","model":"Graphormer","rank_in_archive_order":9,"of":9,"metrics":{"R2":"OOM","RMSE":"OOM"},"uses_additional_data":false},{"leaderboard":"/sota/graph-regression-on-lipophilicity","task":"Graph Regression","dataset":"Lipophilicity","model":"Graphormer","rank_in_archive_order":14,"of":23,"metrics":{"R2":"0.607±0.048","RMSE":"0.791±0.048"},"uses_additional_data":false},{"leaderboard":"/sota/graph-regression-on-parp1","task":"Graph Regression","dataset":"PARP1","model":"Graphormer","rank_in_archive_order":9,"of":9,"metrics":{"R2":"OOM","RMSE":"OOM"},"uses_additional_data":false},{"leaderboard":"/sota/graph-regression-on-pcqm4m-lsc","task":"Graph Regression","dataset":"PCQM4M-LSC","model":"Graphormer","rank_in_archive_order":1,"of":11,"metrics":{"Test MAE":"13.28","Validation MAE":"0.1234"},"uses_additional_data":false},{"leaderboard":"/sota/graph-regression-on-pcqm4mv2-lsc","task":"Graph Regression","dataset":"PCQM4Mv2-LSC","model":"Graphormer","rank_in_archive_order":13,"of":20,"metrics":{"Test MAE":"-","Validation MAE":"0.0864"},"uses_additional_data":false},{"leaderboard":"/sota/graph-regression-on-pgr","task":"Graph Regression","dataset":"PGR","model":"Graphormer","rank_in_archive_order":9,"of":9,"metrics":{"R2":"OOM","RMSE":"OOM"},"uses_additional_data":false},{"leaderboard":"/sota/graph-regression-on-zinc-500k","task":"Graph Regression","dataset":"ZINC-500k","model":"Graphormer-SLIM","rank_in_archive_order":25,"of":36,"metrics":{"MAE":"0.122"},"uses_additional_data":false},{"leaderboard":"/sota/graph-regression-on-zinc-full","task":"Graph Regression","dataset":"ZINC-full","model":"Graphormer","rank_in_archive_order":10,"of":19,"metrics":{"Test MAE":"0.036±0.002"},"uses_additional_data":false},{"leaderboard":"/sota/molecular-property-prediction-on-esol","task":"Molecular Property Prediction","dataset":"ESOL","model":"Graphormer","rank_in_archive_order":10,"of":20,"metrics":{"R2":"0.908±0.021","RMSE":"0.618±0.068"},"uses_additional_data":false},{"leaderboard":"/sota/molecular-property-prediction-on-freesolv","task":"Molecular Property Prediction","dataset":"FreeSolv","model":"Graphormer","rank_in_archive_order":9,"of":22,"metrics":{"R2":"0.927±0.005","RMSE":"1.065±0.039"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2106.05234","atlas_url":"https://app.syntology.ai/?focus=2106.05234","mcp":null,"developers":"https://syntology.ai/developers","held":true,"reason":"arxiv_id_in_atlas","checked_against":{"atlas_ids":549449,"atlas_ids_sha256":"afd72399dafd9906e9062927f70655952385a3d75488558e1f0484e950ab09b7","read_at":"2026-10-05T01:46:21Z"},"agent_calls":[{"tool":"get_citation_path","arguments":{"paper_1":"2106.05234"},"arguments_in":{"paper_2":"another paper's arXiv id or title"},"call":"get_citation_path(paper_1=\"2106.05234\", paper_2=\"…\")"},{"tool":"get_concepts_for_paper","arguments":{"arxiv_id":"2106.05234"},"call":"get_concepts_for_paper(arxiv_id=\"2106.05234\")"}],"by_repo":[{"repo":"Microsoft/Graphormer","kind":"official","samples":0,"ran":0,"instrument":0,"unverified":0,"harvested_for_other_papers":1,"harvested_for":["2203.04810"],"harvested_for_calls":[{"arxiv_id":"2203.04810","tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"2203.04810"},"call":"get_harvested_code_for_paper(arxiv_id=\"2203.04810\")"}]},{"repo":"dpstart/graphormer_new","kind":"listed","samples":0,"ran":0,"instrument":0,"unverified":0,"harvested_for_other_papers":1,"harvested_for":["2106.08279"],"harvested_for_calls":[{"arxiv_id":"2106.08279","tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"2106.08279"},"call":"get_harvested_code_for_paper(arxiv_id=\"2106.08279\")"}]},{"repo":"ytchx1999/Graphormer","kind":"listed","samples":0,"ran":0,"instrument":0,"unverified":0,"harvested_for_other_papers":1,"harvested_for":["2106.08279"],"harvested_for_calls":[{"arxiv_id":"2106.08279","tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"2106.08279"},"call":"get_harvested_code_for_paper(arxiv_id=\"2106.08279\")"}]},{"repo":"yangyucheng000/University","kind":"listed","samples":0,"ran":0,"instrument":0,"unverified":0,"harvested_for_other_papers":1,"harvested_for":["2409.12191"],"harvested_for_calls":[{"arxiv_id":"2409.12191","tool":"get_harvested_code_for_paper","arguments":{"arxiv_id":"2409.12191"},"call":"get_harvested_code_for_paper(arxiv_id=\"2409.12191\")"}]}],"by_repo_harvested_for_is":"harvested_for: the arXiv ids (as Syntology's graph holds them) of every paper whose samples Syntology's graph links to this repository, in arXiv-id order, complete; the page names the first 3 and says how many more. A link only: it does not say the papers are the same work, that one copied the other, or that the code implements this paper's method; harvested_for_calls gives the get_harvested_code_for_paper call for each arXiv-shaped id among them","by_repo_is":"one row per repository in the archive's code links, Syntology's graph links or the samples; samples 0 means no sample is linked to this paper, a statement about Syntology's coverage, not about the repository: with harvested_for_other_papers present, Syntology harvested the repository for that many other papers, and without it, Syntology harvested nothing from it; placed_by_identical_code counts samples whose link records no repository, placed here because identical code was harvested from this repository for another paper; ran counts executions on a synthesized input and instrument counts failures of Syntology's instrument, not of the code"},"code_links_note":null,"arxiv_metadata":null,"syntology_extracted_results":null,"record_sha256":"b53b91d345b345897e0365f8ae5566e0a1a291e6b4b0bedf621792463fbb2f3e","record_changed_at":"2026-09-28","record_changed_at_basis":"first_hashed"}