{"about":{"site":"https://codewithpapers.app","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.","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"},"url":"/paper/difformer-scalable-graph-transformers-induced","title":"DIFFormer: Scalable (Graph) Transformers Induced by Energy Constrained Diffusion","arxiv_id":"2301.09474","date":"2023-01-23","proceeding":null,"authors":["Qitian Wu","Chenxiao Yang","Wentao Zhao","Yixuan He","David Wipf","Junchi Yan"],"abstract":"Real-world data generation often involves complex inter-dependencies among instances, violating the IID-data hypothesis of standard learning paradigms and posing a challenge for uncovering the geometric structures for learning desired instance representations. To this end, we introduce an energy constrained diffusion model which encodes a batch of instances from a dataset into evolutionary states that progressively incorporate other instances' information by their interactions. The diffusion process is constrained by descent criteria w.r.t.~a principled energy function that characterizes the global consistency of instance representations over latent structures. We provide rigorous theory that implies closed-form optimal estimates for the pairwise diffusion strength among arbitrary instance pairs, which gives rise to a new class of neural encoders, dubbed as DIFFormer (diffusion-based Transformers), with two instantiations: a simple version with linear complexity for prohibitive instance numbers, and an advanced version for learning complex structures. Experiments highlight the wide applicability of our model as a general-purpose encoder backbone with superior performance in various tasks, such as node classification on large graphs, semi-supervised image/text classification, and spatial-temporal dynamics prediction.","url_abs":"https://arxiv.org/abs/2301.09474v4","url_pdf":"https://arxiv.org/pdf/2301.09474v4.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":"difformer-scalable-graph-transformers-induced","repo_url":"https://github.com/qitianwu/difformer","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"image-text-classification","task_name":"Image-text Classification"},{"task_slug":"node-classification","task_name":"Node Classification"},{"task_slug":"text-classification","task_name":"Text Classification"},{"task_slug":"text-classification-1","task_name":"text-classification"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2301.09474","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2301.09474"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/qitianwu/DIFFormer","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/qitianwu/difformer","reach":{"status":"ok"}}],"summary":{"ran_violates":2,"ran_draft_wrong":1},"by_repo_kind":{"community":{"samples":3,"ran":3,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"a7d3d6028a35c805","entry":"default","repo":"archinetai/difformer-pytorch","repo_kind":"community","path":"difformer_pytorch/difformer.py","file_url":"https://github.com/archinetai/difformer-pytorch/blob/HEAD/difformer_pytorch/difformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":2,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a7d3d6028a35c805"}},{"code_sha256_prefix":"a60d050b85355f25","entry":"exists","repo":"archinetai/difformer-pytorch","repo_kind":"community","path":"difformer_pytorch/difformer.py","file_url":"https://github.com/archinetai/difformer-pytorch/blob/HEAD/difformer_pytorch/difformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":2,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a60d050b85355f25"}},{"code_sha256_prefix":"e2eb739b5032d913","entry":"attention_mask","repo":"archinetai/difformer-pytorch","repo_kind":"community","path":"difformer_pytorch/difformer.py","file_url":"https://github.com/archinetai/difformer-pytorch/blob/HEAD/difformer_pytorch/difformer.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e2eb739b5032d913"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}