FloydNet: A Learning Paradigm for Global Relational Reasoning
About
Developing models capable of complex, multi-step reasoning is a central goal in artificial intelligence. While representing problems as graphs is a powerful approach, Graph Neural Networks (GNNs) are fundamentally constrained by their message-passing mechanism, which imposes a local bottleneck that limits global, holistic reasoning. We argue that dynamic programming (DP), which solves problems by iteratively refining a global state, offers a more powerful and suitable learning paradigm. We introduce FloydNet, a new architecture that embodies this principle. In contrast to local message passing, FloydNet maintains a global, all-pairs relationship tensor and learns a generalized DP operator to progressively refine it. This enables the model to develop a task-specific relational calculus, providing a principled framework for capturing long-range dependencies. Theoretically, we prove that FloydNet achieves 3-WL (2-FWL) expressive power, and its generalized form aligns with the k-FWL hierarchy. FloydNet demonstrates state-of-the-art performance across challenging domains: it achieves near-perfect scores (often >99\%) on the CLRS-30 algorithmic benchmark, finds exact optimal solutions for the general Traveling Salesman Problem (TSP) at rates significantly exceeding strong heuristics, and empirically matches the 3-WL test on the BREC benchmark. Our results establish this learned, DP-style refinement as a powerful and practical alternative to message passing for high-level graph reasoning.
Related benchmarks
| Task | Dataset | Result | Rank | |
|---|---|---|---|---|
| Graph Regression | ZINC 12K (test) | MAE0.058 | 164 | |
| Graph Regression | Peptides-struct | MAE0.2612 | 51 | |
| Graph Classification | Peptides func | AP62.24 | 22 | |
| Graph Regression | ZINC 250K (test) | MAE0.016 | 13 | |
| Graph-level Cycle Counting | Chordal Cycle Counting (test) | MAE (3-cycle)0.00e+0 | 9 | |
| Graph-level Homomorphism Counting | Homomorphism Counting Dataset | MAE (Triangle)0.00e+0 | 9 | |
| Graph Isomorphism Testing | BREC (test) | Accuracy99.8 | 7 | |
| Algorithmic Reasoning | CLRS-30 n=64 (test) | Sort Accuracy100 | 6 | |
| Link Prediction | PCQM-Contact | MRR61.43 | 5 | |
| Node Classification | COCO-SP | F1 Score49.01 | 5 |