Nearest Neighbors Meet Deep Neural Networks for Point Cloud Analysis

Renrui Zhang, Liuhui Wang, Ziyu Guo, Jianbo Shi

Abstract

Performance on standard 3D point cloud benchmarks has plateaued, often requiring oversized models and complex network redesigns for marginal improvements. We present the Spatial-Neighbor Adapter (SN-Adapter), a non-parametric, plug-and-play module designed to enhance existing deep neural networks without retraining or additional parameters. By utilizing a trained network's encoding capability, we extract and summarize training data features into prototypical spatial knowledge. During inference, the SN-Adapter retrieves $k$-nearest neighbors ($k$-NN) from these prototypes and interpolates their predictions with the original network's output. Our approach demonstrates consistent performance gains across shape classification, part segmentation, and 3D object detection, offering a more economical and robust perspective for point cloud analysis.

Introduction

In recent years, the field of 3D point cloud analysis has entered a phase of diminishing returns. To achieve fractional gains on benchmarks like ModelNet40, researchers have increasingly turned to massive architectures and intricate design modifications. This "arms race" results in models that are computationally expensive and difficult to deploy.

The SN-Adapter addresses a fundamental question: Can we improve the performance of existing, pre-trained 3D networks at near-zero cost? The core issue with standard deep classifiers is their parametric nature; they rely on fixed weights to map features to labels. This often leads to failures in "long-tail" scenarios or when distinct categories share similar feature spaces. By introducing a non-parametric retrieval mechanism, we can provide a "second opinion" that corrects these systematic errors.

The SN-Adapter Framework

The SN-Adapter operates as a non-parametric enhancement that leverages the classic $k$-Nearest Neighbors ($k$-NN) algorithm to augment modern deep learning. The framework functions in two distinct stages:

1. Pre-construction of Spatial Prototypical Knowledge

First, a pre-trained 3D network is "frozen" to serve as a feature extractor. The entire training dataset is passed through this network to create a library of spatial prototypes. The granularity of these prototypes is tailored to the specific task:

  • Sample-wise: Storing one vector per object for classification tasks.
  • Part-wise: Averaging features for specific components (e.g., "chair legs") for segmentation.
  • Object-wise: Utilizing features combined with positional encodings for object detection.

2. Inference-time Enhancement

During inference, a test point cloud is processed by the frozen feature extractor. The resulting feature vector is then utilized in two parallel paths:

  • Parametric Path: The original 3D classifier produces standard prediction logits.
  • Non-parametric Path: The SN-Adapter searches the prototype library for the $k$ most similar neighbors and generates a prediction based on their associated labels.

The final output is a linear interpolation of these two predictions. This hybrid approach allows the model to balance the generalized "learned" logic of the neural network with the specific "retrieval" logic of the $k$-NN adapter.

Experimental Evaluation

We evaluated the SN-Adapter across several competitive 3D benchmarks, including ModelNet40 (synthetic classification), ScanObjectNN (real-world noisy classification), ShapeNetPart (part segmentation), and ScanNetV2 (indoor scene detection).

Key Results

The SN-Adapter consistently improved every baseline model tested:

  • Classification: On the real-world ScanObjectNN dataset, the adapter improved PointNet's Overall Accuracy by +1.9%. On ModelNet40, it boosted PointNet++ by +1.06% mAcc.
  • Object Detection: The most significant gains were observed in detection. For the 3DETR-m model on ScanNetV2, Average Recall (AR) increased by +7.34%.
  • Error Correction: Statistical analysis revealed that when the original network made an error but the SN-Adapter was correct, the interpolation method successfully rectified the final prediction nearly 90% of the time.

Discussion and Insights

Complementary Strengths

The SN-Adapter succeeds where traditional neural networks often fail. While a classifier might struggle to distinguish between numerically similar features (such as a "night-stand" vs. a "table"), the $k$-NN retrieval can leverage the specific neighborhood of training examples to resolve the ambiguity.

Handling the Long-Tail

Deep classifiers are prone to ignoring rare categories in favor of dominant ones. Because $k$-NN is based on local similarity rather than global optimization, it naturally handles category imbalance more effectively than purely parametric models.

Efficiency and Versatility

Because the adapter is non-parametric, it requires zero retraining. A prototype bank can be constructed in minutes for a pre-trained model, providing an immediate performance boost. While it introduces a slight increase in latency (e.g., increasing DGCNN inference from 0.022s to 0.046s), this is negligible compared to the computational cost of training larger architectures.

Conclusion and Future Work

The SN-Adapter demonstrates that retrieval-augmented approaches can significantly enhance 3D point cloud analysis. While gains in part segmentation (+0.17% mIoU) were more modest due to the complexity of dense per-point classification, the overall results across classification and detection are compelling. Future research will focus on optimizing retrieval speeds for large-scale datasets and developing more sophisticated part-wise prototypes to capture the nuances of complex 3D geometries.

Summary updated

Abstract

Performances on standard 3D point cloud benchmarks have plateaued, resulting in oversized models and complex network design to make a fractional improvement. We present an alternative to enhance existing deep neural networks without any redesigning or extra parameters, termed as Spatial-Neighbor Adapter (SN-Adapter). Building on any trained 3D network, we utilize its learned encoding capability to extract features of the training dataset and summarize them as prototypical spatial knowledge. For a test point cloud, the SN-Adapter retrieves k nearest neighbors (k-NN) from the pre-constructed spatial prototypes and linearly interpolates the k-NN prediction with that of the original 3D network. By providing complementary characteristics, the proposed SN-Adapter serves as a plug-and-play module to economically improve performance in a non-parametric manner. More importantly, our SN-Adapter can be effectively generalized to various 3D tasks, including shape classification, part segmentation, and 3D object detection, demonstrating its superiority and robustness. We hope our approach could show a new perspective for point cloud analysis and facilitate future research.

Empirical ResultsBrowse all benchmarks →

BenchmarkMethodMetricScoreProtocol / Evidence
ScanObjectNNPointMLPOA85.7Point Cloud Classification
Source quote
L183: PointMLP~\cite{pointmlp} │ 85.7 │ 84.0
ScanObjectNNPointMLP + SN-AdapterOA86.3Point Cloud Classification
Source quote
L184: \ \ \ \ + SN-Adapter │ 86.3 │ 84.6 │ 5
BibTeX
@inproceedings{zhang2023nearest,
  author = {Renrui Zhang and Liuhui Wang and Ziyu Guo and Jianbo Shi},
  title = {{Nearest Neighbors Meet Deep Neural Networks for Point Cloud Analysis}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2023},
  url = {https://openreview.net/forum?id=ckAmLYXsLyP},
}
Figure