Scientists are increasingly turning to machine learning to tackle complex problems in graph theory, and new research investigates the potential of these techniques for predicting cop counts in graphs. Megan Mann, Christian Muse, and Erin Meagher from Queen’s University demonstrated that classical machine learning models and graph neural networks can accurately estimate the number of cops in a graph, the minimum number of cops needed to catch a robber, based on its structural properties. Although determining the number of cops is computationally difficult and often limited to smaller graphs, this study reveals that tree-based machine learning models perform well even on unbalanced datasets, and graph neural networks can achieve similar results without the need for manually defined features. By identifying key features such as node connectivity and clique structure as strong predictors, the team provides insights that are consistent with existing theoretical understanding and suggest that machine learning can provide scalable approximations when exact calculations are impractical.
Inside the cooling chamber, an algorithm now estimates how effectively a tracker can corner a target on a complex network. Forecasting this “cop count” has long relied on painstaking calculations, limiting progress toward simpler scenarios. Machine learning provides a shortcut to quickly assess the structure of a network and assess its capture potential. Scientists have studied chase-and-avoid games on graphs for many years, but the “cops and robbers” problem has received particular attention over the past 40 years.
The game explores the minimum number of “cops” needed to reliably catch a single “robber” as he moves across the network. Determining this “cup number” for a given graph is a major computational challenge, as existing algorithms are primarily limited to smaller and simpler graph structures. Researchers are now turning to machine learning to estimate the number of cops in more complex graphs, where exact calculations have proven impractical.
Recent research has investigated whether both traditional machine learning techniques and more modern graph neural networks can accurately predict the number of cops in a graph based solely on its intrinsic structural features. Initial findings reveal that tree-based machine learning models show remarkable ability to predict the number of police officers, even when graph types are unevenly distributed.
At the same time, graph neural networks achieve comparable predictive power without requiring researchers to manually select and design relevant features. Beyond simply predicting the number of police officers, this study seeks to understand which structural characteristics are most influential in determining graph vulnerability to capture. Interpretability analysis points to factors such as node connectivity, presence of tightly coupled clusters, clique size, fully connected subgraphs, and measures of graph “width” as key determinants.
These findings resonate with established theoretical results and suggest that machine learning can not only approximate solutions but also further our understanding of the underlying principles governing this game. The possibilities extend beyond theoretical testing. By providing scalable approximations, machine learning approaches can complement existing algorithms and potentially enable analysis of larger and more complex networks that are difficult with traditional computation.
Determining the number of police officers is computationally difficult, so the ability to estimate it efficiently opens up potential applications in network security, search algorithms, and even modeling the spread of information and disease across interconnected systems. Currently, the research focuses on datasets of graphs with up to nine vertices and around 40 computed structural features.
These features include measurements of graph size, connectivity, clique structure, and other properties computed using custom functions and the NetworkX library. The exhaustive nature of datasets sourced from McKay’s Small Graphs Database ensures a diverse representation of graph structures for training and evaluation.
Prediction accuracy of graph cop count using machine learning and topological features
The tree-based machine learning model accurately predicts the number of cups for graphs up to size 13 and achieves high performance despite the inherent class imbalance within the dataset. These models demonstrated predictive capabilities when trained on handcrafted graph properties. Specifically, the model consistently estimated the number of police officers with a level of accuracy previously unattainable without computationally expensive and precise algorithms.
Graph neural networks achieved comparable prediction accuracy without the need for explicit feature engineering. This suggests that relevant information resides within the graph topology itself. Interpretability analysis revealed that node connectivity, clustering, clique structure, and width parameters were the most predictive features for determining cop count.
At a granular level, these properties are strongly correlated with established theoretical results regarding the number of cops in a graph. For example, graphs that exhibit higher clustering coefficients tend to have fewer police officers, consistent with the expectation that denser, more interconnected graphs are easier for cops to navigate and catch robbers.
This study identified that the most informative features were consistently related to measures of graph density and connectivity. Once the model was evaluated, it was used to evaluate the importance of various graph properties. By identifying which features most strongly influenced predictions of police officer counts, the researchers gained insight into the underlying structural features governing this game-theoretic property.
This understanding complements existing theoretical limitations on officer numbers and has the potential to refine and extend current knowledge in this area. This work highlights the potential of machine learning to provide scalable approximations when exact computation becomes impossible for large classes of graphs. Our findings also support the idea that the graph structure itself contains important information for predicting graph-level properties.
Unlike approaches that rely on node characteristics, a graph neural network successfully learned how to predict the number of police officers directly from the graph topology. By demonstrating this capability, this study paves the way to developing more generalizable and efficient algorithms for analyzing graph properties. The team plans to consider applying these techniques to even larger graphs, where computational limitations currently prevent accurate determination of the number of officers.
Predict graph structure using network properties and gradient boosting
A dataset of 6,250 graphs containing cop numbers from 1 to 10 was constructed. Each graph underwent calculation of 28 different structural characteristics, which served as potential predictors of cop number. These properties include measures of node connectivity and clustering coefficients to quantify the degree to which nodes tend to cluster.
The clique number, which represents the size of the largest complete subgraph, was also determined, along with various width parameters such as tree width and path width, which represent the structural complexity of the graph. A classical machine learning model was then trained and evaluated. Tree-based models, specifically gradient boosting, were chosen because of their performance and ability to handle class imbalances established with tabular data.
The data was split into training, validation, and test sets, and the validation set was used to tune hyperparameters. To address the inherent class imbalance, techniques such as weighted loss functions were employed during training. Parallel to these classical approaches, graph neural networks (GNNs) have been implemented. These networks directly process graph structures, avoiding the need for manual feature engineering.
The GNN learns node embeddings that capture local and global structural information for each node and uses these embeddings to predict the number of officers. With a focus on interpretability and computational efficiency, a relatively simple GNN architecture was preferred. Assessing the importance of features was also a priority. Shapley values, a cooperative game theory concept, were computed for both tree-based models and GNNs.
This allowed us to quantify the contribution of each feature to the model’s predictions, revealing which structural properties were most influential in determining cop number. By comparing the machine learning model’s feature importance rankings with known theoretical results, the researchers aimed to validate the model and gain insight into the underlying relationship between graph structure and officer numbers.
Predicting tracking dynamics in networks using machine learning
The “cops and robbers” problem, a mathematical chase game played over a network, has resisted easy solutions for decades, and determining the minimum number of “cops” needed to catch a single “robber” has proven computationally intensive. This effort changes the approach from direct computation to prediction using machine learning.
Instead of seeking a final answer for complex graphs, researchers are now investigating whether algorithms can accurately estimate the “cup count” of a graph based on its underlying structure. The success of tree-based machine learning models and graph neural networks in this task is not just a technical achievement. It suggests viable paths for dealing with networks where exact calculations are not possible, and provides approximations that may be useful in areas such as network security and resource allocation.
Relying on structural features such as node connectivity or clustering that are already known to affect the game does not necessarily provide completely new insights into the problem itself. An important limitation is that these predictive models are inherently difficult to interpret. Although the identified characteristics are consistent with existing theory, understanding why certain structures lead to increased officer numbers remains an open question.
A deeper theoretical understanding of games is still desired. As these predictive tools become more sophisticated, they could potentially become part of a broader set of tools and used in conjunction with existing algorithms to address increasingly complex network problems. Beyond this particular game, the very methodology of applying machine learning to graph theory problems could pave the way for addressing other computationally difficult challenges in network science.
