Generalized Fine-Grained Category Discovery with Multi-Granularity Conceptual Experts

October 1, 2025 ยท View on GitHub

Generalized Fine-Grained Category Discovery with Multi-Granularity Conceptual Experts

framework Generalized Category Discovery (GCD) is an open-world problem that clusters unlabeled data by leveraging knowledge from partially labeled categories. A key challenge is that unlabeled data may contain both known and novel categories. Existing approaches suffer from two main limitations. First, they fail to exploit multi-granularity conceptual information in visual data, which limits representation quality. Second, most assume that the number of unlabeled categories is known during training, which is impractical in real-world scenarios. To address these issues, we propose a Multi-Granularity Conceptual Experts (MGCE) framework that adaptively mines visual concepts and integrates multi-granularity knowledge for accurate category discovery. MGCE consists of two modules: (1) Dynamic Conceptual Contrastive Learning (DCCL), which alternates between concept mining and dual-level representation learning to jointly optimize feature learning and category discovery; and (2) Multi-Granularity Experts Collaborative Learning (MECL), which extends the single-expert paradigm by introducing additional experts at different granularities and by employing a concept alignment matrix for effective cross-expert collaboration. Importantly, MGCE can automatically estimate the number of categories in unlabeled data, making it suitable for practical open-world settings. Extensive experiments on nine fine-grained visual recognition benchmarks demonstrate that MGCE achieves state-of-the-art results, particularly in novel-class accuracy. Notably, even without prior knowledge of category numbers, MGCE outperforms parametric approaches that require knowing the exact number of categories, with an average improvement of 3.6%.

๐Ÿš€ Quick Start

Environment Setup

  1. Create and activate the conda environment:
conda env create -f environment.yml
conda activate gcd-env
  1. Configure data paths:
# Modify the data directory paths in config.py
vim config.py

Training Pipeline

For each dataset, follow these two steps:

  1. Get KNN param:
bash scripts_knn/[dataset_name].sh
  1. Train the model:
bash scripts/train_[dataset_name].sh

Replace [dataset_name] with one of: cub, scars, animalia, fungi, mollusca, actinopterygii, herbarium19, nabirds, reptilia.

๐Ÿ“Š Results

Known Number of Categories

DatasetSeedAllOldNew
CUB070.676.267.8
170.372.669.1
270.273.468.6
Avg70.3774.0768.50
SCARS061.775.854.9
161.476.054.3
261.375.854.4
Avg61.4775.8754.53
Animalia059.260.658.6
158.762.157.3
260.861.960.3
Avg59.5761.5358.73
Fungi058.168.253.6
158.468.054.2
258.269.753.1
Avg58.2368.6353.63
Mollusca054.960.951.7
155.358.553.6
256.365.751.3
Avg55.5061.7052.20
Actinopterygii045.357.540.6
145.052.142.2
245.553.842.3
Avg45.2754.4741.70
Herbarium 19045.353.141.1
145.353.740.8
245.452.741.4
Avg45.3353.1741.10
NABirds050.873.940.6
150.673.540.3
247.772.136.9
Avg49.7073.1739.27
Reptilia030.545.424.4
130.246.423.6
230.945.425.1
Avg30.5345.7324.37

Unknown Number of Categories

DatasetEstimated KSeedAllOldNew
CUB202068.972.667.1
168.173.865.2
267.273.264.3
Avg68.0773.2065.53
SCARS203058.674.651.0
157.273.549.4
257.670.151.6
Avg57.8072.7350.67
Animalia53061.065.559.1
160.166.057.7
259.861.259.2
Avg60.3064.2358.67
Fungi112055.871.348.9
156.771.650.0
254.974.346.4
Avg55.8072.4048.43
Mollusca43050.959.746.2
151.462.845.3
250.961.745.1
Avg51.0761.4045.53
Actinopterygii61043.455.238.8
145.354.741.5
243.255.438.4
Avg43.9755.1039.57
Herbarium 19459043.553.138.4
143.153.137.7
242.654.636.5
Avg43.0753.6037.37
NABirds715053.874.344.7
154.375.045.1
251.874.941.6
Avg53.3074.7343.80
Reptilia140029.552.820.1
130.146.123.7
229.852.820.5
Avg29.8050.5721.43

Note: "All" refers to overall accuracy, "Old" to known categories, and "New" to novel categories.

Acknowledgments

This repository builds upon the excellent work of:

We thank the authors for their contributions to the field of Generalized Category Discovery.