# AffinityNet: semi-supervised few-shot learning for disease type prediction

arXiv: https://arxiv.org/abs/1805.08905 · HTML: https://mlsanity.com/paper/1805.08905/

## Key facts

- Cited by 12 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 22 May 2018.

## Built on by (most cited first, 12 of 12)

- [Eye-gaze-guided Vision Transformer for Rectifying Shortcut Learning](https://mlsanity.com/paper/2205.12466/) (2022)
- [Deep learning for drug repurposing: methods, databases, and applications](https://mlsanity.com/paper/2202.05145/) (2022)
- [OmiEmbed: a unified multi-task deep learning framework for multi-omics data](https://mlsanity.com/paper/2102.02669/) (2021)
- [Few Shot Learning for Medical Imaging: A Comparative Analysis of Methodologies and Formal Mathematical Framework](https://mlsanity.com/paper/2305.04401/) (2023)
- [Adaptive Prototypical Networks with Label Words and Joint Representation Learning for Few-Shot Relation Classification](https://mlsanity.com/paper/2101.03526/) (2021)
- [Deep Transfer Learning for Kidney Cancer Diagnosis](https://mlsanity.com/paper/2408.04318/) (2024)
- [IA-GCN: Interactive Graph Convolutional Network for Recommendation](https://mlsanity.com/paper/2204.03827/) (2022)
- [Coupling Deep Imputation with Multitask Learning for Downstream Tasks on Genomics Data](https://mlsanity.com/paper/2204.13705/) (2022)
- [BroadCAM: Outcome-agnostic Class Activation Mapping for Small-scale Weakly Supervised Applications](https://mlsanity.com/paper/2309.03509/) (2023)
- [Multi-Scale High-Resolution Logarithmic Grapher Module for Efficient Vision GNNs](https://mlsanity.com/paper/2510.13740/) (2025)
- [Transformer-based few-shot learning for modeling Electricity Consumption Profiles with minimal data across thousands of domains](https://mlsanity.com/paper/2408.08399/) (2024)
- [Beyond Traditional Diagnostics: Transforming Patient-Side Information into Predictive Insights with Knowledge Graphs and Prototypes](https://mlsanity.com/paper/2512.08261/) (2025)

## Abstract (arXiv)

While deep learning has achieved great success in computer vision and many other fields, currently it does not work very well on patient genomic data with the "big p, small N" problem (i.e., a relatively small number of samples with high-dimensional features). In order to make deep learning work with a small amount of training data, we have to design new models that facilitate few-shot learning. Here we present the Affinity Network Model (AffinityNet), a data efficient deep learning model that can learn from a limited number of training examples and generalize well. The backbone of the AffinityNet model consists of stacked k-Nearest-Neighbor (kNN) attention pooling layers. The kNN attention pooling layer is a generalization of the Graph Attention Model (GAM), and can be applied to not only graphs but also any set of objects regardless of whether a graph is given or not. As a new deep learning module, kNN attention pooling layers can be plugged into any neural network model just like convolutional layers. As a simple special case of kNN attention pooling layer, feature attention layer can directly select important features that are useful for classification tasks. Experiments on both synthetic data and cancer genomic data from TCGA projects show that our AffinityNet model has better generalization power than conventional neural network models with little training data. The code is freely available at https://github.com/BeautyOfWeb/AffinityNet .
