Abstract
This paper investigates the representational power of Nearest Neighbor (NN) models through the lens of Boolean circuit complexity. By establishing formal equivalences between NN classifiers and specific circuit classes, such as min-plus polynomial threshold functions (mpPTF), the authors provide new lower bounds for the number of anchors required to represent fundamental Boolean functions. Notably, the study identifies a "breakthrough barrier" in proving lower bounds for $k$-Nearest Neighbors ($k$NN) when $k$ is large, as the model's power approaches that of complex threshold circuits.
Introduction
Nearest Neighbor (NN) classification is a cornerstone of machine learning, prized for its simplicity and intuitive logic: a query point is assigned the label of its closest neighbor in a set of "anchors." While the statistical properties of NN are well-documented, its computational complexity—specifically its representational power—remains less understood. This research bridges this gap by mapping NN models to Boolean circuits, asking a fundamental question: how many anchors are necessary to exactly represent a given Boolean function, such as Majority or Inner Product?
Theoretical Framework
The authors introduce several key concepts to formalize the study of NN complexity and its relationship to circuit theory:
- Closure under Substitution: By defining the closure of NN classes ($\overline{NN}$ and $\overline{HNN}$), the authors allow these models to be treated as standard complexity classes. This facilitates direct comparisons with established circuit classes and allows for variable manipulation within the models.
- Min-Plus Polynomial Threshold Functions (mpPTF): A crucial finding is the equivalence between NN representations and mpPTFs. An mpPTF classifies an input based on which of two sets of linear equations yields a smaller value. The authors prove that the closure of Nearest Neighbors with real anchors is exactly equivalent to the class of min-plus polynomial threshold functions with unbounded weights ($\overline{NN} = mpPTF(\infty)$).
- The kSTAT Class: To analyze the $k$-nearest neighbor case, the authors propose kSTAT, a new class that utilizes the $k$-th smallest value (statistic) of a set of linear forms to determine a decision.
The Power of Real Anchors and Small $k$
A significant insight of this work is the disparity between Boolean anchors (binary vectors) and real-valued anchors. For certain functions, switching to real-valued anchors provides an exponential reduction in the number of required points compared to Boolean anchors. This demonstrates that the geometric flexibility of real-valued space significantly enhances the representational efficiency of the NN model.
Furthermore, the authors demonstrate that while $k$NN is powerful, its complexity is manageable for small $k$. They establish exponential lower bounds for $k$NN when $k$ is relatively small (specifically $k \le n^{1-\epsilon}$), using techniques from communication complexity such as sign-rank arguments and monochromatic rectangle properties.
Complexity Analysis of Explicit Functions
The paper provides concrete bounds for several fundamental Boolean functions, serving as benchmarks for the model's power:
- Majority (MAJ): For an input size $n$ (where $n$ is even), the Majority function requires exactly $n/2 + 2$ Boolean anchors, matching previously known upper bounds.
- Inner Product (IP): The authors establish that the Inner Product function requires $2^{\Omega(n/k)}$ anchors for $k$NN, providing the first superlinear lower bound for $k > 1$.
- CNFs and DNFs: Surprisingly, any Conjunctive or Disjunctive Normal Form with $m$ clauses can be represented by a mere $m+1$ real-valued anchors, showing that these standard logical formulas are relatively "easy" for NN models to represent.
The Breakthrough Barrier
The study highlights a fundamental challenge in computational complexity. As $k$ increases, $k$NN can simulate a circuit class called $SYM \circ AND$. Because proving lower bounds for $SYM \circ AND$ is a long-standing open problem that has eluded researchers for decades, establishing superpolynomial lower bounds for $k$NN with arbitrary $k$ (e.g., $k = n/2$) is currently considered "breakthrough-level" difficult. This simulation shows that $k$NN is a much more powerful model than previously realized, but that power makes it difficult to bound theoretically.
Conclusion
This work provides a rigorous foundation for understanding the limits and capabilities of Nearest Neighbor models. By translating these models into the language of Boolean circuits, the authors have identified both the strengths of the algorithm—such as its efficiency in representing CNFs—and the theoretical barriers to proving its limitations.
Future research may bridge the gap between the existence of these representations and learnability (the ability to efficiently find these anchors from data). Additionally, exploring the complexity of approximate nearest neighbor representations could yield more compact and practical models for real-world applications.
Summary updated