Image Detection With Clustered Sparse Attention for Faster Classification

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing image detection methods, particularly in multiple instance learning (MIL), face high computational complexity and low detection accuracy due to the use of self-attention modules on small datasets of digital pathological images, leading to over-fitting and inefficient resource utilization.

Innovation Solution

An image detection method utilizing feature extraction, attention weight generation, clustering sampling, and block sparse self-attention to mine sub-image information, reducing computational complexity while improving detection accuracy by leveraging independent and category-based correlations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If 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

Engineering Contradiction:
Improvedetection accuracyVSAvoidcomputational complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent segments the self-attention computation by dividing instances into clusters and applying attention within clusters rather than globally across all instances. This segmentation reduces the computational complexity from O(N²) to O(k²) where k is the cluster size, while still capturing relevant instance relationships for accurate detection.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies partial attention by focusing computational resources only on instances within the same cluster rather than all instances. This partial action approach maintains detection accuracy for clustered instances while significantly reducing overall computational load by ignoring cross-cluster attention computations.

Inventive Principle:
Principle #16Partial or excessive action

2Quantity of substance

If self-attention module with high computational complexity is trained on small dataset of digital pathological images, then model can learn from available data, but over-fitting occurs and detection accuracy decreases

Engineering Contradiction:
Improvedataset sizeVSAvoiddetection accuracy
Core Design Contradiction:
Quantity of substanceVSMeasurement precision

Solution Approach 1:

By segmenting instances into clusters, the patent creates multiple smaller learning units from the limited dataset. Each cluster provides a focused learning scenario that generalizes better, preventing over-fitting that occurs when the model tries to learn from all instances uniformly in small datasets.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies local quality by making the attention mechanism cluster-specific rather than uniform across all data. This allows the model to learn localized patterns within clusters that are more robust to over-fitting, while the overall detection accuracy is maintained through proper cluster construction.

Inventive Principle:
Principle #3Local quality

3Measurement precision

If all sub-image features are processed to ensure comprehensive information mining, then detection accuracy improves, but detection speed decreases

Engineering Contradiction:
Improvedetection accuracyVSAvoiddetection speed
Core Design Contradiction:
Measurement precisionVSSpeed

Solution Approach 1:

The patent segments the feature processing task by organizing sub-images into clusters and processing features within clusters separately. This segmentation enables parallel processing of different clusters, improving detection speed while maintaining accuracy through focused attention on relevant clustered features.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent extracts and processes only the most relevant sub-image features within each cluster using attention mechanisms, rather than processing all features uniformly. This extraction of essential features maintains detection accuracy while reducing the total computational workload and improving detection speed.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentEP4428809B1Image detection method and apparatus, and device and readable storage medium
Publication Date: 2026.02.25 TENCENT TECHNOLOGY (SHENZHEN) CO LTD
  • EP4428809B1 patent drawingFigure 1a
  • EP4428809B1 patent drawingFigure 1b
  • EP4428809B1 patent drawingFigure 2

AI summary

The present disclosure discloses an image detection method and apparatus, a device, and a readable storage medium. The method includes: performing feature extraction processing on a to-be-detected image to obtain at least two sub-image features; generating attention weights corresponding to the at least two sub-image features, and 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 sampled sub-image features included in at least two classification clusters, determining a block sparse self-attention corresponding to each sampled sub-image feature according to the at least two classification clusters and a block sparse matrix, and determining a second feature vector according to the at least two block sparse self-attentions; and determining a classification result of the to-be-detected image according to the first feature vector and the second feature vector. The present disclosure may improve the detection speed and detection accuracy of images.