[Paper Review] AffinityNet: semi-supervised few-shot learning for disease type prediction
AffinityNet is a semi-supervised few-shot learning model for disease type prediction that uses stacked k-Nearest-Neighbor (kNN) attention pooling layers to learn robust representations from high-dimensional, low-sample-size genomic data. It outperforms conventional deep learning models and baseline Cox models, achieving a 0.729 concordance index on kidney cancer data with only 40% training data, demonstrating superior generalization in low-data regimes.
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 .
Motivation & Objective
- To address the 'big p, small N' problem in genomic data where high-dimensional features and few samples hinder deep learning performance.
- To develop a data-efficient deep learning model that generalizes well in few-shot learning scenarios common in biomedical research.
- To enable semi-supervised representation learning for complex, heterogeneous objects like patients without requiring predefined graph structures.
- To integrate automatic feature selection into deep learning via a learnable feature attention layer that assigns importance weights to input features.
- To improve survival prediction and disease subtyping in cancer genomics using limited labeled data and abundant unlabeled data.
Proposed method
- The core component is the kNN attention pooling layer, which dynamically constructs affinity graphs using attention mechanisms to pool representations from each object’s k-nearest neighbors, enabling clustering-like regularization.
- The kNN attention pooling layer generalizes Graph Attention Models (GAM) to non-graph-structured data, allowing application to any set of objects regardless of graph availability.
- The model stacks multiple kNN attention pooling layers to learn deep hierarchical representations, functioning as a plug-in module akin to convolutional layers in CNNs.
- A feature attention layer, a special case of kNN attention pooling, learns normalized, non-negative weights for input features via backpropagation, enabling end-to-end feature selection.
- The model is trained in a semi-supervised manner, leveraging both labeled and unlabeled data to improve representation learning and generalization.
- The framework is implemented in PyTorch and is publicly available on GitHub for reproducibility and extension.
Experimental results
Research questions
- RQ1Can a deep learning model effectively learn from few labeled examples in high-dimensional, low-sample-size genomic data?
- RQ2How can attention mechanisms be adapted to learn representations in the absence of predefined graph structures?
- RQ3Can kNN-based attention pooling improve generalization in few-shot learning for disease subtyping compared to standard neural networks?
- RQ4To what extent can the model leverage unlabeled data to enhance performance in survival prediction tasks?
- RQ5Does the integration of a learnable feature attention layer improve model performance and interpretability in genomic classification?
Key findings
- AffinityNet achieved a mean concordance index of 0.729 on kidney cancer data when trained on 40% of the samples, significantly outperforming the baseline Cox model (0.618).
- With only 10% training data, AffinityNet achieved a concordance index of 0.694, demonstrating strong generalization in low-data regimes.
- The model’s predicted hazard groups (low, intermediate, high) showed a log-rank test p-value of 6.7×10⁻¹⁶, outperforming the known disease types (p=1.5×10⁻⁵) in separating survival outcomes.
- On synthetic and TCGA cancer genomic datasets, AffinityNet showed better generalization than conventional neural network models with limited training data.
- The feature attention layer successfully identified and emphasized biologically relevant features, enabling automatic, differentiable feature selection during training.
- The kNN attention pooling layer effectively enforced similar representations for similar objects, acting as an implicit regularizer that mitigates overfitting in small-data settings.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.