NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Deterministic Graph-Walking Program Mining

Peter Belcak, Roger Wattenhofer · DOI

Abstract

This paper introduces the concept of "graph-walking programs"—sequences of feature-based instructions that guide an agent from a source set of nodes to a target set within a network. We present two algorithms, VIBE and BPF, designed to automatically mine these programs by leveraging a "pseudo-basis" to prune the search space. This framework provides a human-readable alternative to black-box graph models for characterizing long-distance relationships through deterministic, rule-based navigation.

Introduction

In modern graph data analysis, research typically bifurcates into two categories: finding the shortest path between specific points or classifying individual nodes based on local features. However, a significant gap exists in understanding the underlying logic that connects groups of nodes over long distances. For instance, in a qualification graph where nodes represent certifications and edges represent prerequisites, a researcher might want to identify the general rules that allow a high school graduate to eventually become a prosecutor.

This paper addresses this gap by formalizing program induction on graphs. The goal is to automatically discover a sequence of deterministic filters—based on node and edge features—that move an agent from a starting set $S$ to a target set $T$. Unlike traditional pathfinding, this approach seeks a generalizable set of rules rather than a single trajectory.

The Graph-Walking Paradigm

The authors define a Simple Graph-Walking Program as a sequence of criteria that an agent follows to navigate a graph. A key distinction in this model is that the "agent" is not a single point but a set of vertices. At each step, the agent occupies all vertices that satisfy the current instruction's criteria. As the program progresses, this set of vertices expands and contracts based on the graph's topology and the features of the nodes encountered.

Algorithmic Framework

To discover these programs, the paper introduces two primary algorithms:

  1. VIBE (Viable Injection Basis Enumeration): This algorithm is optimized for "Simple Colour Programs," where node features are discrete categories (colors). It utilizes a breadth-first search strategy to enumerate possible instruction sequences.
  2. BPF (Basis-Path-Finding): A more robust algorithm designed for "Simple Toset Programs," where features possess a total order (such as numerical values). BPF integrates decision-tree logic (e.g., CART or C4.5) to dynamically generate the criteria for each step of the walk.

The Pseudo-Basis Innovation

The primary technical challenge in program mining is the search space; searching every possible path in a large graph is computationally prohibitive. The authors prove that finding a feasible graph-walking program is NP-complete.

To mitigate this, they introduce the pseudo-basis. By identifying a minimal set of vertices (the basis) that must be covered to ensure the agent eventually reaches the target set $T$, the algorithms can sharply limit the search space. This pruning strategy allows the algorithms to remain efficient in graphs that possess underlying structural patterns, avoiding the exponential explosion of a brute-force search.

Theoretical Results and Evaluation

The paper provides mathematical proofs for the correctness and completeness of the proposed algorithms. VIBE and BPF are guaranteed to return only valid programs and will find all valid programs up to a specified length $\ell$.

While the paper is primarily theoretical, the algorithms were demonstrated using synthetic examples, such as qualification pathways and colored grid graphs. These examples highlight the ability of the programs to provide "linear long-distance relationship" characterizations that are human-readable, offering a level of interpretability that standard Graph Neural Networks (GNNs) often lack.

Limitations and Future Directions

Despite the efficiency of the pseudo-basis, the algorithms still face challenges in "fully connected" graphs where every node connects to every other node, as the search space reverts to total enumeration. Additionally, the current framework is limited to:

  • Deterministic Logic: The agent must satisfy the rule to move, leaving no room for the noise often found in real-world data.
  • Memoryless Navigation: The agent’s decision at any given step depends only on the current node's features, not its previous path.

Future work aims to explore probabilistic graph-walking programs to handle noisy data and the inclusion of "memory" to allow for more complex, non-Markovian navigation logic.

Summary updated

BibTeX
@inproceedings{belcak2022deterministic,
  author = {Peter Belcak and Roger Wattenhofer},
  title = {{Deterministic Graph-Walking Program Mining}},
  booktitle = {ADMA},
  year = {2022},
  doi = {10.1007/978-3-031-22064-7\_33},
}
Figure