You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
\subsection*{From Online to Offline – shifting the bottleneck}
431
-
The dominant cost in existing implementations of Loop Modulus (and other cycle–richness metrics) is the *online* search for the most violated cycles at every iteration. A standard implementation using *baseline Dijkstra* must perform a fresh single–source shortest–path (SSSP) expansion *inside* every optimisation iteration, tying the overall runtime directly to the number of iterations.
432
-
433
-
Our \emph{Weighted Minimum‐Cycle} (\textbf{WMC}) algorithm changes this picture fundamentally. Because WMC minimises \emph{composite distance} rather than plain SSSP trees, all information required to answer subsequent cycle queries can be collected in a single, graph–wide preprocessing pass. In other words, the expensive part is pushed to a \emph{pre-processing stage} that can be run once, cached, and even distributed across multiple workers or machines. Once the WMC structure is built, each iteration of the Loop Modulus algorithm merely consults the pre-computed data to retrieve violating cycles – typically \(100\!\times\) faster than re-running Dijkstra.
434
-
435
-
Engineering accelerations such as BMSSP recursion, the Cython relaxation kernel, or the compiled block-priority queue further reduce preprocessing time, yet \emph{they are not necessary for correctness}. They only shrink the wall-clock time of building the WMC structure. The conceptual contribution – the ability to decouple preprocessing from iterative optimisation – is already present in the basic WMC algorithm.
436
-
437
-
\paragraph{Comparison hierarchy.} We therefore separate our experimental results into three tiers:
438
-
\begin{enumerate}[leftmargin=*]
439
-
\item\textbf{Baseline Dijkstra} – conventional approach with a fresh SSSP per iteration.
440
-
\item\textbf{Proposed WMC (our Dijkstra-replacement)} – composite-distance algorithm with no BMSSP or Cython; preprocessing executed once.
441
-
\item\textbf{WMC + Engineering accelerations} – optional BMSSP, Cython heap, $\rho$-pruning, etc., which only affect preprocessing speed.
442
-
\end{enumerate}
443
-
This hierarchy clarifies that BMSSP should be viewed as an implementation detail that optimises an already superior computational layout rather than as the core methodological advance.
444
-
445
429
\label{sec:loop_modulus_app}
446
430
A fundamental problem in network analysis is quantifying the ``richness'' of cyclic structures within a graph. The $p$-Modulus of a family of loops $L$ provides such a measure, analogous to concepts in complex analysis \cite{albin2016minimal}. For $p=2$, which offers computational advantages and a useful probabilistic interpretation, the modulus is defined via the quadratic programming problem (QP) \cite{shakeri2017network}:
The constraint-finding step (Step 3 above) is fundamentally a search for a minimum weight simple cycle (or top-k shortest cycles), where the edge weights are given by the dynamic density $\rho^{(k)}$. Algorithms specifically designed for finding the MWC, such as Algorithm \ref{alg:MWC_Dijkstra} presented in Section \ref{sec_alg} or others employing efficient techniques \cite{itai1978finding, orlin2016nm}, are prime candidates to implement the \texttt{FindTopKViolatedCycles} function.
477
461
462
+
\paragraph{Offline vs.~online cost.} In the conventional \emph{baseline Dijkstra} pipeline, each Loop-Modulus iteration launches a new single–source shortest-path search, so the total runtime scales with the number of QP updates. Our \textbf{WMC} algorithm amortises this work by performing a one-time graph-wide preprocessing pass that builds a composite–distance structure. Subsequent iterations merely query this structure to obtain the currently most-violated cycle—typically one to two orders of magnitude faster than re-running Dijkstra. Engineering accelerations such as BMSSP recursion or the Cython heap only shorten this preprocessing step; they are optional and do not affect the offline/online split introduced by WMC.
463
+
478
464
In iteration $k$ of the modulus algorithm, the chosen MWC algorithm is executed using the current density $\rho^{(k)}$ as the edge weights $w(e) = \rho^{(k)}(e)$. Its goal is to efficiently identify at least one, and preferably up to $k_{\text{add}}$, simple cycles $\gamma$ satisfying Equation \eqref{eq:rho_length_violation}. The efficiency stems from exploiting the structure of the MWC problem itself, potentially avoiding the exhaustive nature of simpler APSP-based methods. For instance, Algorithm \ref{alg:MWC_Dijkstra}'s $\gamma/2$ pruning condition (adapted to use $1.0 - \epsilon_{\text{tol}}$ perhaps, or simply running until the first few cycles shorter than the threshold are found) can significantly limit the search effort required within the \texttt{FindTopKViolatedCycles} call.
479
465
480
466
\subsection{Performance Enhancement: The Graph Pruning Heuristic}
0 commit comments