
{"id":1840,"date":"2026-09-15T09:38:39","date_gmt":"2026-09-15T09:38:39","guid":{"rendered":"https:\/\/prg.inf.unibe.ch\/?page_id=1840"},"modified":"2026-09-15T09:39:17","modified_gmt":"2026-09-15T09:39:17","slug":"thesis-learning-classical-graph-algorithms-with-graph-neural-networks","status":"publish","type":"page","link":"https:\/\/prg.inf.unibe.ch\/index.php\/education\/thesis-learning-classical-graph-algorithms-with-graph-neural-networks\/","title":{"rendered":"thesis-Learning Classical Graph Algorithms with Graph Neural Networks"},"content":{"rendered":"\n<div style=\"height:150px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<section class=\"wp-block-uagb-columns uagb-columns__wrap uagb-columns__background-none uagb-columns__stack-mobile uagb-columns__valign- uagb-columns__gap-10 align uagb-block-b3397370 uagb-columns__columns-1 uagb-columns__max_width-theme\"><div class=\"uagb-columns__overlay\"><\/div><div class=\"uagb-columns__inner-wrap uagb-columns__columns-1\">\n<div class=\"wp-block-uagb-column uagb-column__wrap uagb-column__background-undefined uagb-block-3e0cbd99\"><div class=\"uagb-column__overlay\"><\/div>\n<h2 class=\"wp-block-heading\">Learning Classical Graph Algorithms with Graph Neural Networks<\/h2>\n\n\n\n<p><strong>Co-Supervised by:<\/strong> Kalvin Dobler<\/p>\n\n\n\n<p>If you are interested in this topic or have further questions, do not hesitate to contact: <a href=\"mailto:kalvin.dobler@unibe.ch\">kalvin.dobler@unibe.ch<\/a><\/p>\n\n\n\n<ol class=\"wp-block-list\"><\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Background \/ Context<\/h3>\n\n\n\n<p>Graph neural networks (GNNs) are widely used to learn representations of graph-structured data, but their ability to learn and execute algorithmic procedures remains an active research question. Recent work demonstrates that GNNs can, under specific conditions, learn to execute classical graph algorithms such as breadth-first search (BFS), depth-first search (DFS), and Bellman\u2013Ford.<\/p>\n\n\n\n<p>This project investigates whether GNNs can learn to execute classical graph algorithms and, more importantly, whether the learned procedures generalize beyond the graph sizes, structures, and execution conditions encountered during training. Rather than evaluating only performance on in-distribution graphs, the project focuses on the generalization and robustness of learned algorithmic behavior.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Question(s) \/ Goals<\/h3>\n\n\n\n<p>The project will investigate:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Can standard and recurrent GNN architectures learn to execute classical graph algorithms such as DFS?<\/li>\n\n\n\n<li>To what extent do learned algorithms generalize to larger graphs and previously unseen graph structures?<\/li>\n\n\n\n<li>How robust are learned algorithms to graph perturbations, such as edge additions, deletions, and changes in graph density?<\/li>\n\n\n\n<li>Does recurrent message passing improve generalization to algorithmic executions that require more steps than seen during training?<\/li>\n\n\n\n<li>Which architectural and training choices are most important for reliable algorithmic reasoning and generalization?<\/li>\n\n\n\n<li>What are the main failure modes, and can they reveal limitations of GNNs as models of algorithmic computation?<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Approach \/ Methods<\/strong><\/h3>\n\n\n\n<p>The student will implement several classical graph algorithms, such as:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Breadth-first search (BFS)<\/li>\n\n\n\n<li>Shortest-path algorithms<\/li>\n\n\n\n<li>Connected components<\/li>\n\n\n\n<li>PageRank or label propagation<\/li>\n\n\n\n<li>Optionally DFS or Bellman\u2013Ford<\/li>\n<\/ul>\n\n\n\n<p>For each algorithm, synthetic graphs will be generated automatically, with the exact algorithm providing the ground-truth execution trace and final result.<\/p>\n\n\n\n<p>Different GNN architectures, such as GCN, GIN, and GraphSAGE, will then be trained to reproduce the algorithmic computation.<\/p>\n\n\n\n<p>A particular focus will be extrapolation: models will be trained on smaller graphs and evaluated on substantially larger graphs and graphs with different structural properties. The study can additionally investigate whether providing intermediate algorithmic states as supervision improves generalization compared with standard end-to-end training.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Expected Contributions \/ Outcomes<\/h3>\n\n\n\n<p>The project is expected to provide:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A systematic benchmark of GNNs for learning classical graph algorithms.<\/li>\n\n\n\n<li>An evaluation of generalization across graph size and topology.<\/li>\n\n\n\n<li>An analysis of the strengths and limitations of standard message-passing architectures for algorithmic reasoning.<\/li>\n\n\n\n<li>Identification of factors that influence successful algorithm execution, such as message-passing depth, node representations, and intermediate supervision.<\/li>\n\n\n\n<li>An open-source implementation and reproducible experimental framework.<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Required Skills<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Familiarity with graph-theoretic concepts, machine learning experimentation and evaluation, or willingness to learn them.<\/li>\n\n\n\n<li>Basic programming skills in Python.<\/li>\n\n\n\n<li>Interest in graph neural networks and deep learning.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Further Readings<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Veli\u010dkovi\u0107 et al., \u201cNeural Execution of Graph Algorithms,\u201d ICLR 2020.<\/li>\n\n\n\n<li>Qharabagh et al., \u201cLearning to Execute Graph Algorithms Exactly with Graph Neural Networks,\u201d ICML 2026.<\/li>\n<\/ul>\n<\/div>\n<\/div><\/section>\n","protected":false},"excerpt":{"rendered":"<p>Learning Classical Graph Algorithms with Graph Neural Networks Co-Supervised by: Kalvin Dobler If you are interested in this topic or have further questions, do not hesitate to contact: kalvin.dobler@unibe.ch Background \/ Context Graph neural networks (GNNs) are widely used to learn representations of graph-structured data, but their ability to learn and execute algorithmic procedures remains [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":731,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"no-sidebar","site-content-layout":"plain-container","ast-site-content-layout":"normal-width-container","site-content-style":"unboxed","site-sidebar-style":"unboxed","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"disabled","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"enabled","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-1840","page","type-page","status-publish","hentry"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"prg-admin","author_link":"https:\/\/prg.inf.unibe.ch\/index.php\/author\/prg-admin\/"},"uagb_comment_info":0,"uagb_excerpt":"Learning Classical Graph Algorithms with Graph Neural Networks Co-Supervised by: Kalvin Dobler If you are interested in this topic or have further questions, do not hesitate to contact: kalvin.dobler@unibe.ch Background \/ Context Graph neural networks (GNNs) are widely used to learn representations of graph-structured data, but their ability to learn and execute algorithmic procedures remains&hellip;","_links":{"self":[{"href":"https:\/\/prg.inf.unibe.ch\/index.php\/wp-json\/wp\/v2\/pages\/1840","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prg.inf.unibe.ch\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/prg.inf.unibe.ch\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/prg.inf.unibe.ch\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prg.inf.unibe.ch\/index.php\/wp-json\/wp\/v2\/comments?post=1840"}],"version-history":[{"count":1,"href":"https:\/\/prg.inf.unibe.ch\/index.php\/wp-json\/wp\/v2\/pages\/1840\/revisions"}],"predecessor-version":[{"id":1842,"href":"https:\/\/prg.inf.unibe.ch\/index.php\/wp-json\/wp\/v2\/pages\/1840\/revisions\/1842"}],"up":[{"embeddable":true,"href":"https:\/\/prg.inf.unibe.ch\/index.php\/wp-json\/wp\/v2\/pages\/731"}],"wp:attachment":[{"href":"https:\/\/prg.inf.unibe.ch\/index.php\/wp-json\/wp\/v2\/media?parent=1840"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}