Abstract
Cycles in graphs often signify interesting processes. For example, cyclic trading patterns can indicate inefficiencies or economic dependencies in trade networks, cycles in food webs can identify fragile dependencies in ecosystems, and cycles in financial transaction networks can be an indication of money laundering. Identifying such interesting cycles, which can also be constrained to contain a given set of query nodes, although not extensively studied, is thus a problem of considerable importance. In this paper, we introduce the problem of discovering interesting cycles in graphs. We first address the problem of quantifying the extent to which a given cycle is interesting for a particular analyst. We then show that finding cycles according to this interestingness measure is related to the longest cycle and maximum mean-weight cycle problems (in the unconstrained setting) and to the maximum Steiner cycle and maximum mean Steiner cycle problems (in the constrained setting). We show that the problems of finding the most interesting cycle and Steiner cycle are both NP-hard, and are NP-hard to approximate within a constant factor in the unconstrained setting, and within a factor polynomial in the input size for the constrained setting. We also show that the latter inapproximability result implies a similar result for the maximum Steiner cycle and maximum mean Steiner cycle problems. Motivated by these hardness results, we propose a number of efficient heuristic algorithms. Through extensive experiments, we verify the effectiveness of proposed methods and demonstrate their practical utility on real-world use cases.
Introduction
Graphs are ubiquitous in modeling complex systems, from financial transactions to ecological food webs. Within these networks, cycles often represent critical feedback loops or significant patterns, such as money laundering schemes or economic dependencies. However, large-scale graphs contain an astronomical number of cycles, most of which are "boring" because they align with expected network properties like high node degrees.
This paper introduces a formal framework for discovering "subjectively interesting" cycles—patterns that are surprising to an analyst given their prior knowledge. By accounting for what is already known, we can filter out the noise and highlight truly anomalous cyclic structures.
Subjective Interestingness Framework
The core of our approach is a measure of subjective interestingness defined as the ratio of Information Content (IC) to Description Length (DL).
- Information Content (IC): Quantifies the surprise of a cycle. It is calculated as the negative log-probability of the cycle's existence under a background distribution. This distribution is a Maximum Entropy (MaxEnt) model constrained by the analyst's prior beliefs.
- Description Length (DL): Represents the complexity of communicating the cycle to the analyst, typically related to its size.
To model prior beliefs, we use MaxEnt distributions. For instance, an analyst might know the expected degrees of nodes or the density of certain communities. By using MaxEnt, we ensure the background distribution is the most unbiased one that still respects the analyst's known constraints.
Problem Definitions and Hardness
We define two primary optimization problems:
- Maximum Subjectively Interesting Cycle (MSIC): Finding the single most interesting simple cycle in a graph.
- Maximum Subjectively Interesting Steiner Cycle (k-MSIC): Finding the most interesting cycle that must pass through a specific set of $k$ "query" nodes.
The paper proves that MSIC is NP-hard and difficult to approximate within a constant factor, as it relates to the Longest Cycle problem. The Steiner version (k-MSIC) is even more challenging, being NP-hard to approximate within a factor polynomial in the input size.
Algorithmic Solutions
Given the theoretical hardness, we propose efficient heuristics:
- Unconstrained Case: We adapt Karp’s Maximum Mean Cycle algorithm to find cycles that maximize the IC/DL ratio.
- Steiner Case (Local-SCS): A local search heuristic that iteratively improves a cycle through four graph-rewiring moves: sequential primary, quad, shortcutting, and extending.
Experimental Evaluation
We evaluated our methods on synthetic Erdős-Rényi graphs and a real-world 2018 International Trade dataset from the World Bank. In synthetic benchmarks, our heuristics consistently achieved over 80% of the optimal interestingness score found by exhaustive search.
In the trade network analysis, the framework successfully uncovered non-obvious dependencies. For example, with only node degrees as a prior, the most interesting cycle was a 2-cycle between the U.S. and the Dominican Republic, reflecting the DR's heavy economic reliance on the U.S. By updating the prior to include known trade agreements, the algorithm shifted to identify a surprising cycle between China and Sudan. When Iranian and U.S. trade was queried, the algorithm discovered a path through Nicaragua, highlighting complex global trade routes.
Conclusion
This work provides a robust statistical foundation for cycle discovery in graphs. By moving beyond simple structural metrics to a subjective measure of interestingness, we enable analysts to find patterns that are truly informative. Future work includes extending the framework to non-simple cycles (tours) and undirected graphs.
Summary updated