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

Resilient Pattern Mining

Pengxin Bian, Panagiotis Charalampopoulos, Lorraine A. K. Ayad, Manal Mohamed, Solon P. Pissis, Grigorios LoukidesarXiv 2025

TL;DR

This paper introduces the $(\tau, k)$-Resilient Pattern Mining (RPM) problem, a robust variant of frequent pattern mining that identifies substrings remaining frequent even after any $k$ characters in the source string are altered. The authors present an exact, highly efficient algorithm operating in $\mathcal{O}(n \log n)$ time and $\mathcal{O}(n)$ space. Experimental evaluations demonstrate that this approach runs up to four orders of magnitude faster than a dynamic programming baseline, making it highly practical for biological sequence analysis and versioned text analytics.

What Problem Does This Paper Address?

Frequent Pattern Mining (FPM) is a foundational task in data mining used to find substrings that appear at least $\tau$ times within a text. However, standard FPM is fragile: minor data corruptions, sequencing errors in DNA, adversarial perturbations, or natural updates in versioned documents can drastically alter substring frequencies.

To bridge this gap, the authors introduce Resilient Pattern Mining (RPM). Given a string $S$ of length $n$, RPM finds all substrings that maintain a frequency of at least $\tau$ even under the worst-case scenario where an adversary substitutes characters at any $k$ positions. This ensures that the discovered patterns are truly robust to noise and future edits without requiring re-mining from scratch when the underlying data changes slightly.

Methods

The authors propose two main algorithmic approaches to solve the RPM problem:

  1. RPM-DP (Baseline): A dynamic programming approach that uses binary search to find the longest resilient substring at each position. It reduces the problem to an interval scheduling task, running in $\mathcal{O}(n^3 k \log n)$ time and $\mathcal{O}(n^2)$ space, which proves impractical for large datasets.
  2. RPM-ST / RPM-ESA (Advanced Algorithms): The core contribution is an exact algorithm that leverages advanced string index structures—specifically Suffix Trees (RPM-ST) or Enhanced Suffix Arrays (RPM-ESA)—combined with deep combinatorial insights.

Instead of explicitly testing all $\binom{n}{k}$ possible character substitutions, the algorithm categorizes substrings into two structural types to evaluate their resilience efficiently:

  • Aperiodic Substrings: The authors prove that any single position in a string can be covered by at most two occurrences of an aperiodic substring. This low-overlap property allows a simple, linear-time greedy algorithm to determine how many occurrences could be "destroyed" by $k$ substitutions.
  • Periodic Substrings: These substrings can overlap extensively, forming dense clusters ("runs"). The algorithm uses priority search trees and interval trees to group these occurrences efficiently, applying a specialized greedy strategy to evaluate resilience based on the period length.

Remarkably, the time complexity of this advanced algorithm is $\mathcal{O}(n \log n)$, making it completely independent of both $\tau$ and $k$.

Datasets

The algorithms were evaluated on several large-scale, real-world datasets:

  • Standard Benchmarks (from the Pizza & Chili Corpus): DNA (genomic data), ENGLISH (text), PROTEINS (protein sequences), SOURCES (source code), and XML (bibliographic data).
  • Versioned Datasets: BOOST (10,000 historical versions of the Boost C++ library repository) and WIKI (9,271 revisions of Wikipedia's "Einstein" page).
  • Viral Genomes (for clustering evaluation): EBOL (Ebola virus sequences) and COR (SARS-CoV-2 sequences).

Key Insights and Ideas

  • Independence from Noise Scale ($k$): The most surprising theoretical result is that checking for resilience against $k$ errors does not scale exponentially or even linearly with $k$ when using the advanced index structures. The combinatorial structure of strings naturally bounds how much damage $k$ substitutions can cause.
  • Generalization to Unseen Versions: In versioned datasets, standard frequent patterns mined from a single version degrade rapidly in subsequent versions. Resilient patterns, however, remain valid across thousands of future versions.
  • The Power of String Topology: By separating the problem into aperiodic and periodic cases, the authors exploit the mathematical limits of how substrings can overlap, turning a seemingly intractable combinatorial explosion into a highly structured counting problem.

Key Results

  • Massive Speedups: The advanced algorithms (RPM-ST and RPM-ESA) outperformed the RPM-DP baseline by up to four orders of magnitude in runtime while maintaining a strictly linear $\mathcal{O}(n)$ space footprint.
  • Suffix Array Efficiency: RPM-ESA proved to be roughly 10 times faster than its Suffix Tree counterpart (RPM-ST) and consumed about 3 times less memory, thanks to cache-friendly array operations.
  • Biological Relevance: When tested on 143,588 SARS-CoV-2 sequences, mining resilient patterns from a single, arbitrarily chosen sequence approximated the globally frequent patterns across all sequences with a Jaccard similarity of 0.96. In contrast, standard FPM achieved a similarity of only 0.50, demonstrating that resilience effectively captures evolutionary conservation.
Figure 1: (a) Running time and (b) Jaccard similarity.

Limitations and Future Work

  • Limited to Substitutions: The current formulation of RPM only accounts for character substitutions (Hamming distance). It does not handle insertions or deletions (edit distance), which are common in certain types of genetic mutations and text typos. The authors note that extending RPM to full edit distance is an open and challenging direction.
  • Engineering Approximations: While the paper outlines a theoretical $\mathcal{O}(1)$ time method for periodic extension queries, the practical implementation relies on an interval tree of runs with an $\mathcal{O}(\log n)$ query time due to the extreme engineering complexity of the optimal structure.

Summary updated

BibTeX
@misc{bian2025resilient,
  author = {Pengxin Bian and Panagiotis Charalampopoulos and Lorraine A. K. Ayad and Manal Mohamed and Solon P. Pissis and Grigorios Loukides},
  title = {{Resilient Pattern Mining}},
  year = {2025},
  eprint = {2506.04935},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.04935},
}
Figure