  Drug-Target binding Affinity (DTA) prediction is essential for drug
discovery. Despite the application of deep learning methods to DTA prediction,
the achieved accuracy remain suboptimal. In this work, inspired by the recent
success of retrieval methods, we propose $k$NN-DTA, a non-parametric
embedding-based retrieval method adopted on a pre-trained DTA prediction model,
which can extend the power of the DTA model with no or negligible cost.
Different from existing methods, we introduce two neighbor aggregation ways
from both embedding space and label space that are integrated into a unified
framework. Specifically, we propose a \emph{label aggregation} with
\emph{pair-wise retrieval} and a \emph{representation aggregation} with
\emph{point-wise retrieval} of the nearest neighbors. This method executes in
the inference phase and can efficiently boost the DTA prediction performance
with no training cost. In addition, we propose an extension, Ada-$k$NN-DTA, an
instance-wise and adaptive aggregation with lightweight learning. Results on
four benchmark datasets show that $k$NN-DTA brings significant improvements,
outperforming previous state-of-the-art (SOTA) results, e.g, on BindingDB
IC$_{50}$ and $K_i$ testbeds, $k$NN-DTA obtains new records of RMSE
$\bf{0.684}$ and $\bf{0.750}$. The extended Ada-$k$NN-DTA further improves the
performance to be $\bf{0.675}$ and $\bf{0.735}$ RMSE. These results strongly
prove the effectiveness of our method. Results in other settings and
comprehensive studies/analyses also show the great potential of our $k$NN-DTA
approach.
