Image Classification With Block Sparse Self-Attention Clustering
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing self-attention modules for multi-instance image classification have high computational complexity and are prone to over-fitting when trained on small datasets of digital pathological images, leading to low detection accuracy.
Innovation Solution
An image detection method that performs feature extraction, generates attention weights, and applies block sparse self-attention to sub-image features within classification clusters, using a combination of independent and clustered information mining to improve accuracy and reduce complexity.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If a self-attention module is used to mine information of all instances in multi-instance images, then detection accuracy can be improved, but computational complexity increases significantly
Solution Approach 1:
The patent segments the self-attention computation by dividing instances into multiple clusters based on feature similarity. Instead of computing attention between all instance pairs (O(n²)), the method computes attention only within each cluster, significantly reducing computational complexity while maintaining detection accuracy through localized feature relationships.
Solution Approach 2:
The patent applies partial action by computing self-attention only for selected representative instances from each cluster rather than all instances. This partial computation approach maintains the essential feature relationships needed for accurate detection while avoiding the excessive computational burden of processing every instance pair.
2Measurement precision
If a high-complexity self-attention module is trained on a small dataset of digital pathological images, then the model can capture detailed features, but over-fitting occurs and detection accuracy decreases
Solution Approach 1:
By segmenting instances into clusters and computing attention locally within clusters, the method reduces the effective parameter space that needs to be learned from limited data. This segmentation prevents the model from memorizing noise in small datasets while still capturing meaningful local feature relationships, improving generalization performance.
Solution Approach 2:
The patent applies local quality by focusing attention computation on local clusters of similar instances rather than global relationships. This local focus allows the model to learn robust local feature patterns from limited data that can generalize better, avoiding over-fitting to specific global configurations in the small training dataset.
3Loss of information
If attention weights are computed for all sub-image features, then comprehensive information mining is achieved, but processing time increases
Solution Approach 1:
The patent segments the attention computation into multiple independent cluster-based sub-computations. By dividing the full set of sub-image features into clusters and computing attention separately within each cluster, the method maintains comprehensive information mining through cluster-level aggregation while significantly reducing processing time through parallelizable local computations.
Solution Approach 2:
The method computes attention weights only for representative instances within each cluster rather than all sub-image features. This partial computation approach maintains sufficient information completeness for accurate detection while dramatically reducing processing time by avoiding redundant attention calculations for similar instances within the same cluster.
Data Source
AI summary
An image detection method and apparatus are disclosed. The method includes: performing feature extraction processing on the image to obtain a feature representation subset of the image; generating attention weights corresponding to the at least two sub-image features; performing weighting aggregation processing on the at least two sub-image features according to the attention weights to obtain a first feature vector; performing clustering sampling processing on the at least two sub-image features to obtain at least two classification clusters comprising sampled sub-image features; determining a block sparse self-attention for each of the sampled sub-image features according to the at least two classification clusters and a block sparse matrix; determining a second feature vector according to at least two block sparse self-attentions respectively corresponding to the at least two classification clusters; and determining a classification result of the image according to the first feature vector and the second feature vector.


