Nearly-Linear Time and Massively Parallel Algorithms for $k$-anonymity

Kevin Aydin, Honghao Lin, David Woodruff, Peilin ZhongNeurIPS 2025

In an era of massive data breaches and increasing surveillance, protecting individual privacy in public datasets is paramount. One of the most established techniques for this is $k$-anonymity. However, as datasets have grown into the millions and billions of records, the algorithms traditionally used to anonymize them have struggled to keep up.

A recent breakthrough offers the first nearly-linear time algorithm for $k$-anonymity with provable guarantees, alongside a version designed for massively parallel systems. By overcoming the $O(n^2)$ bottleneck of previous methods, this approach allows privacy-preserving techniques to scale to modern, massive datasets.

The Challenge of $k$-Anonymity and Suppression

$k$-anonymity is a privacy standard requiring that each record in a released dataset be indistinguishable from at least $k-1$ other records based on "quasi-identifiers" (such as age, ZIP code, or gender). A common method to achieve this is through suppression—replacing specific values with a wildcard symbol ($\star$). The objective is to minimize the number of suppressed values to preserve the utility of the data.

Example of k-anonymity by suppression

The fundamental challenge is that finding the optimal suppression strategy is NP-hard. Existing algorithms with provable guarantees are notoriously slow: they either require $O(n^2k)$ time (impractical for large $n$) or have runtimes exponential in $k$. As data scales, algorithms must scale linearly with the number of records ($n$) without sacrificing theoretical rigor.

A Nearly-Linear Time Approach

The researchers' approach hinges on a clever reduction: treating $k$-anonymity as a Minimum Size Constrained Clustering problem. In this framework, records are points in space, and the goal is to group them into clusters of at least size $k$ such that the "radius" of each cluster (representing the number of suppressed attributes) is minimized.

To achieve nearly-linear runtime, the algorithm employs three key technical pillars:

  1. Dimensionality Reduction: The Johnson-Lindenstrauss (JL) Lemma is used to project high-dimensional data into $O(\log n)$ dimensions while preserving the distances between points.
  2. Locality Sensitive Hashing (LSH): Instead of falling into the $O(n^2)$ trap of comparing every pair of points, LSH quickly identifies "near neighbors." This allows the algorithm to focus exclusively on points likely to end up in the same anonymity group.
  3. Massively Parallel Computation (MPC): The clustering logic is adapted for the MPC model (used by frameworks like MapReduce or Spark), ensuring the workload can be distributed across many machines with minimal communication rounds.

Key Insights and Empirical Results

By utilizing LSH to approximate $k$-nearest neighbors, the authors bypass the need to compute all-pairs distances. This yields a runtime of $\tilde{O}(nd + n^{1+\epsilon})$, which is nearly as fast as simply reading the input data.

Theoretical Efficiency and Hardness: The algorithm achieves an $O(k)$-approximation in nearly-linear time. The authors also investigated whether an $o(k)$ approximation is possible in polynomial time. By analyzing "single-point $k$-anonymity," they proved that, assuming the Dense vs. Random conjecture in complexity theory, achieving an approximation ratio significantly better than $k$ is likely impossible in polynomial time.

Empirical Speedup: The theoretical ideas translate remarkably well to practice. The authors evaluated a heuristic version of their algorithm against existing methods using the Adult dataset (48,842 records) from the UCI Machine Learning Repository. For $k=10$, their LSH-enhanced heuristic ran in just 17.4 seconds, compared to 894.2 seconds for the previous state-of-the-art heuristic. This represents a 50x speedup while maintaining comparable data utility.

Parallel Scalability: For distributed systems, their MPC algorithm requires only $O(\log^{1+\epsilon} n)$ rounds, making it highly suitable for modern cloud infrastructure.

Limitations and Future Directions

While this algorithm represents a massive leap in speed, its approximation ratio is $O(k)$. Although the authors provide evidence that $o(k)$ is computationally hard, a theoretical gap remains between the $O(\log k)$ ratio achieved by much slower, impractical algorithms and the $O(k)$ ratio achieved here.

Furthermore, while the lower bound for "single-point $k$-anonymity" provides a strong signal, extending that hardness proof to the general $k$-anonymity problem remains an open theoretical challenge. Future work may also explore applying these nearly-linear techniques to other privacy models, such as $l$-diversity or $t$-closeness, further expanding the toolkit for scalable data privacy.

Summary updated

BibTeX
@inproceedings{aydin2025nearly,
  author = {Kevin Aydin and Honghao Lin and David Woodruff and Peilin Zhong},
  title = {{Nearly-Linear Time and Massively Parallel Algorithms for $k$-anonymity}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=It69GYOep0},
}
Figure