Papers
Topics
Authors
Recent
Search
2000 character limit reached

PointNN Selector: Nearest-Neighbor Condensation

Updated 26 November 2025
  • PointNN Selector is an algorithm that selects a sparse set of labeled points ensuring perfect nearest-neighbor classification using a separation constraint.
  • It modifies the classic FCNN heuristic by incorporating a user-defined separation parameter δ to control density and prevent over-representation in training sets.
  • The method provides a constant-factor approximation to the minimum consistent subset, with theoretical guarantees based on doubling dimension and nearest-enemy complexity.

A PointNN Selector is a selection algorithm for identifying representative or relevant points from a dataset embedded in a metric space, with formal guarantees on both accuracy and subset size. It is most prominently defined in the context of nearest-neighbor condensation, where the goal is to minimize the subset of labeled points required for perfect classification under the nearest neighbor rule. The term encompasses a specific algorithmic modification of the classic Fast Condensed Nearest Neighbor (FCNN) heuristic, introducing separation constraints to prevent pathological clusterings and to obtain size and approximation guarantees (Flores-Velazco, 2020). The PointNN Selector framework is distinguished by its theoretical foundation, making it applicable as a robust solution for subset selection tasks in geometric and learning contexts.

1. Problem Definition and Formalism

The PointNN Selector algorithm addresses the minimum consistent subset (Min-CS) problem for nearest-neighbor classification in metric spaces (X,d)(X,d). Given a labeled dataset PXP \subset X with class labels :P{1,2,,c}\ell:P\to\{1,2,\dots,c\}, and the nearest neighbor function nnP(q)=argminpPd(q,p)nn_P(q) = \arg\min_{p\in P} d(q,p), the aim is to find a subset SPS\subseteq P such that every pPp\in P is classified correctly, i.e., (nnS(p))=(p)\ell(nn_S(p)) = \ell(p). The size of SS should be as small as possible, ideally approaching the minimum required for perfect consistency.

Key notations and structural parameters central to the problem include:

  • Margin γ\gamma: The smallest distance between a point and its nearest enemy,

γ=minpPd(p,neP(p))\gamma = \min_{p \in P} d(p, \mathrm{ne}_P(p))

where PXP \subset X0.

  • Nearest-enemy complexity PXP \subset X1: The number of distinct nearest-enemy points in PXP \subset X2.
  • Doubling dimension PXP \subset X3: The smallest integer such that every ball of radius PXP \subset X4 can be covered by PXP \subset X5 balls of radius PXP \subset X6.
  • Diameter PXP \subset X7, assumed normalized to 1.

2. Classic FCNN and Its Limitations

The original FCNN heuristic (Angiulli 2007) builds the subset PXP \subset X8 iteratively:

  1. Initialize PXP \subset X9 with the centroid of each class.
  2. For each :P{1,2,,c}\ell:P\to\{1,2,\dots,c\}0, find misclassified points in :P{1,2,,c}\ell:P\to\{1,2,\dots,c\}1 for which :P{1,2,,c}\ell:P\to\{1,2,\dots,c\}2 is the nearest representative.
  3. Add the closest such misclassified point to :P{1,2,,c}\ell:P\to\{1,2,\dots,c\}3.
  4. Repeat until no misclassifications remain.

While this approach preserves nearest-neighbor accuracy, its output size can become pathological (arbitrarily large in :P{1,2,,c}\ell:P\to\{1,2,\dots,c\}4), especially when points are densely packed near class boundaries (Flores-Velazco, 2020).

3. PointNN Selector: Algorithmic Description

The PointNN Selector is a modification of FCNN, introducing a user-specified separation parameter :P{1,2,,c}\ell:P\to\{1,2,\dots,c\}5, usually set to the empirical margin :P{1,2,,c}\ell:P\to\{1,2,\dots,c\}6. The algorithm is as follows:

  1. :P{1,2,,c}\ell:P\to\{1,2,\dots,c\}7 centroids of all classes.
  2. For each :P{1,2,,c}\ell:P\to\{1,2,\dots,c\}8, enqueue any :P{1,2,,c}\ell:P\to\{1,2,\dots,c\}9 with nnP(q)=argminpPd(q,p)nn_P(q) = \arg\min_{p\in P} d(q,p)0 and nnP(q)=argminpPd(q,p)nn_P(q) = \arg\min_{p\in P} d(q,p)1.
  3. While the queue nnP(q)=argminpPd(q,p)nn_P(q) = \arg\min_{p\in P} d(q,p)2 is not empty:
    • Dequeue nnP(q)=argminpPd(q,p)nn_P(q) = \arg\min_{p\in P} d(q,p)3.
    • If nnP(q)=argminpPd(q,p)nn_P(q) = \arg\min_{p\in P} d(q,p)4 for all nnP(q)=argminpPd(q,p)nn_P(q) = \arg\min_{p\in P} d(q,p)5, add nnP(q)=argminpPd(q,p)nn_P(q) = \arg\min_{p\in P} d(q,p)6 to nnP(q)=argminpPd(q,p)nn_P(q) = \arg\min_{p\in P} d(q,p)7.
    • For the new nnP(q)=argminpPd(q,p)nn_P(q) = \arg\min_{p\in P} d(q,p)8, enqueue any additional misclassified points for which nnP(q)=argminpPd(q,p)nn_P(q) = \arg\min_{p\in P} d(q,p)9 is now the closest.

The algorithm ensures SPS\subseteq P0 is always SPS\subseteq P1-separated; no two selected points are closer than SPS\subseteq P2. This enforces a packing constraint, preventing arbitrarily high local density in SPS\subseteq P3 (Flores-Velazco, 2020).

4. Theoretical Guarantees

The PointNN Selector is the first variant in this family to provide provable worst-case size bounds and approximation guarantees for the Min-CS problem:

  • Packing Bound: In a metric space of doubling dimension SPS\subseteq P4 and diameter 1, the size of SPS\subseteq P5 is

SPS\subseteq P6

  • Approximation Guarantee: Compared to the minimum-size consistent subset OPT, the PointNN Selector produces a SPS\subseteq P7-approximation:

SPS\subseteq P8

  • These results are obtained by partitioning SPS\subseteq P9 by nearest-enemy and distance scale, showing that within each, packing numbers in doubling spaces limit cardinality.

If pPp\in P0, the algorithm always achieves exact consistency (zero error) for the training set. If pPp\in P1, a small number of boundary misclassifications may occur.

5. Parameter Selection and Practical Considerations

  • Separation Parameter pPp\in P2: In practice, set to the empirical margin pPp\in P3 to guarantee consistency and optimal separation.
  • Algorithmic Complexity: Each insertion spends pPp\in P4 time checking the separation constraint; total runtime is pPp\in P5, matching FCNN asymptotically.
  • Queue Mechanics: The FIFO structure ensures that additions are well-ordered, and that density control is maintained throughout progress.

A typical application involves running PointNN Selector on a dataset to produce a sparse, robust, and representative set of exemplars, with size and approximation guarantees, to accelerate nearest-neighbor queries or to serve as condensed training sets for resource-constrained deployments.

FCNN PointNN Selector
Size bound None (unbounded) pPp\in P6
Approximation to Min-CS Heuristic only pPp\in P7 factor
Runtime pPp\in P8 pPp\in P9
Consistency on (nnS(p))=(p)\ell(nn_S(p)) = \ell(p)0 Always if full Always if (nnS(p))=(p)\ell(nn_S(p)) = \ell(p)1

FCNN demonstrates no non-trivial worst-case size bound, while PointNN Selector achieves a provable packing bound and constant-factor approximation for the NP-hard Min-CS problem. Both share similar asymptotic runtimes.

7. Interpretive Notes and Implications

The introduction of a separation constraint enables PointNN Selector to be robust to pathological input configurations and prevents over-representation of localized high-density regions. This suggests the method is suited to high-dimensional, potentially low-margin datasets where classic condensation algorithms fail by redundancy or overselection.

A plausible implication is that PointNN Selector is broadly applicable as a core method for prototype selection in metric learning, geometric data condensation, and for accelerating the inference speed of nearest-neighbor-based classifiers, while maintaining formal error and size guarantees. Its parameters expose an explicit trade-off between sparsity and fidelity, controlled via the separation (nnS(p))=(p)\ell(nn_S(p)) = \ell(p)2. The algorithm’s performance is determined by the underlying geometry (doubling dimension) and the labeling complexity (through (nnS(p))=(p)\ell(nn_S(p)) = \ell(p)3).

References: The main definition, results, and algorithm are presented in "Social Distancing is Good for Points too!" (Flores-Velazco, 2020).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to PointNN Selector.