Skip to content

Calibrated Similarity and Graph Clustering for Open-Set Animal Re-Identification

Source: arXiv:2608.02469 · Published 2026-08-03 · By Mohamed ElBassat, Seifeldin Elkerdany, Mohamed ElBialy, Gamal Abouelhamd, Jana Ghoneim, Assem Elkady et al.

TL;DR

This paper addresses the challenging open-set animal re-identification problem presented in AnimalCLEF 2026, where algorithms must both recognize known individual animals and discover previously unseen individuals by clustering their images correctly. The authors propose a similarity-to-clustering pipeline that integrates specimen segmentation, species-specific preprocessing to enhance identity-relevant visual cues, and a calibrated fusion of a global descriptor (MiewID) with two complementary local feature matching branches (ALIKED + LightGlue and DISK + LightGlue). After similarity computation via the WildFusion framework, query images are clustered using graph-based Chinese Whispers clustering, and confident clusters are attached to known identities via query-database similarity aggregation. They evaluate multiple MiewID global descriptor variants—pretrained, Dynamic ArcFace fine-tuned, and SphereFace2-Focal fine-tuned—and ensemble their outputs. The final ensemble substantially improves open-set discovery scores over the WildFusion baseline on four diverse species datasets, achieving a top public Adjusted Rand Index (ARI) of 0.72124 and private ARI of 0.70393 in AnimalCLEF 2026. A simpler variant still reaches a strong private ARI of 0.71087. These results demonstrate effective global-local similarity fusion calibrated for open-set recognition, combined with species-specific preprocessing and graph clustering, for robust individual animal identification in challenging field data.

Key findings

  • The final ensemble method achieves a best public Adjusted Rand Index (ARI) of 0.72124 and a private ARI of 0.70393 on AnimalCLEF 2026 datasets covering Eurasian lynx, fire salamander, loggerhead sea turtle, and Texas horned lizard.
  • A simpler preprocessing-before-calibration variant achieves a strong private ARI of 0.71087, indicating the benefit of species-specific image preprocessing.
  • Replacing the baseline WildFusion global descriptor MegaDescriptor with MiewID improved focus on identity-relevant image regions as shown by Score-CAM visualizations (Fig 3).
  • Fine-tuning MiewID with Dynamic ArcFace loss and SphereFace2-Focal losses tightened the embedding space, producing more compact clusters and better separation of known vs unknown individuals (Fig 5).
  • WildFusion integrates global cosine similarity with calibrated local keypoint matching scores from ALIKED + LightGlue and DISK + LightGlue branches using isotonic regression for score calibration.
  • Graph-based Chinese Whispers clustering applied after k-reciprocal re-ranking of query–query similarity clusters query images without requiring a predefined cluster count.
  • Known-identity attachment is performed at the cluster level using top-r similarity pooling and margin thresholds to assign clusters confidently to known identities.
  • Species-specific preprocessing steps (e.g. fur texture enhancement for lynx, gamma correction for sea turtles, edge sharpening for salamanders) improved identity cues, while Texas horned lizard images used segmentation only.

Threat model

Not applicable—this work does not focus on a threat model in the adversarial security sense but rather on open-set instance recognition where the system must identify known individuals and discover new ones in unlabeled query images despite visual noise, variation, and unknown classes.

Methodology — deep read

  1. Threat Model & Assumptions: The adversary is not explicitly modeled as this is a computer vision open-set recognition problem focusing on discovering known and unknown individual animals in field images under variable conditions (pose, lighting, occlusion). The system assumes labeled database identities for attachment and unknown individuals in query sets. It cannot rely on closed-set assumptions and must discover unseen individuals robustly.

  2. Data: The datasets include Eurasian lynx (LynxID2025), fire salamander (SalamanderID2025), loggerhead sea turtle (SeaTurtleID2022), and Texas horned lizard images, drawn from AnimalCLEF 2026 benchmark. The training data for fine-tuning MiewID consists of ~13k images across 1102 identities (Table 1 & 2). Validation splits are open-set with known/unknown identity partitions. Preprocessing includes segmentation masks generated by SAM 3, and species-specific image enhancements such as CLAHE, gamma correction, edge sharpening.

  3. Architecture / Algorithm: The pipeline has three main stages: specimen segmentation followed by species-specific preprocessing; similarity computation via WildFusion calibrated fusion; and query image clustering plus cluster-level identity attachment. WildFusion integrates three similarity branches: a global MiewID descriptor-based embedding cosine similarity, and two local keypoint-based branches—ALIKED + LightGlue and DISK + LightGlue. Both local branches produce confidence-weighted local matches without fine-tuning. Similarity scores are calibrated using isotonic regression (parameter B=256) and fused by averaging the calibrated scores. The query-query similarity matrix is re-ranked using k-reciprocal re-ranking to emphasize robust neighborhoods. A graph is built from the similarity matrix by pruning based on threshold and nearest neighbor limits. Chinese Whispers clustering, which converges through iterative label propagation maximizing weighted neighbor agreement, produces identity clusters without requiring the number of clusters a priori. Known-identity attachment uses a top-r pooling of query-database similarities with confidence and margin thresholding to assign clusters to known individuals.

  4. Training Regime: The global descriptor MiewID was used pretrained or fine-tuned on the AnimalCLEF data using two strategies. Dynamic ArcFace fine-tuning used a two-phase schedule with frozen backbone warm-up, then end-to-end training, k=3 sub-centers, embedding size 2048, scale 64, margin 0.6. SphereFace2-Focal fine-tuning treated identity prediction as one-vs-all with focal loss, margin 0.3, scale 55, similarity adjustment strength 3.0, positive-negative balance 0.99. Images resized to 440x440. Training data excluded unknown validation identities to model open-set. Hyperparameters for clustering and attachment were optimized with Optuna using a combined metric 0.6×ARI + 0.4×V-measure.

  5. Evaluation Protocol: The main metric is Adjusted Rand Index (ARI), measuring agreement between predicted clusters and ground truth while penalizing over- and under-segmentation. Validation used open-set splits dividing known and unknown identities separately for each species. Ablation studies compared the pretrained MiewID baseline, fine-tuned variants, and ensemble results, as well as effects of species-specific preprocessing and re-ranking. No adversarial attacks or distribution shifts were tested beyond the open-set unknown individuals.

  6. Reproducibility: The authors provide implementation code on GitHub. Exact dataset details come from the publicly benchmarked AnimalCLEF 2026 competition. Pretrained MiewID weights and WildFusion implementations are publicly known. Fine-tuning details and hyperparameters are fully documented. The segmentation model SAM 3 is publicly available. Some datasets (Texas horned lizard) were only in test sets. Details on random seeds or multiple training runs are not specified.

Concrete example: An input image of a Eurasian lynx is first segmented using SAM 3 (or used as provided cropped image). The segmented animal image is processed with CLAHE and bilateral filtering to sharpen fur textures. This image is passed through the pretrained or fine-tuned MiewID to produce a global embedding. Two local matching features are extracted via ALIKED+LightGlue and DISK+LightGlue pipelines producing local similarity scores. WildFusion calibrates and fuses these similarity scores with isotonic regression. Pairwise similarities between query images form a weighted graph. Query-query similarities undergo k-reciprocal re-ranking to emphasize reciprocal neighbors, and Chinese Whispers clusters the graph nodes to form identity clusters. Finally, query-database scores are pooled at cluster-level with thresholds to assign clusters confidently to known identities or mark as newly discovered individuals.

Technical innovations

  • Integration of species-specific lightweight image preprocessing after specimen segmentation to enhance identity-relevant visual cues.
  • Calibrated similarity fusion via WildFusion combining MiewID global descriptors and two complementary local matching branches (ALIKED + LightGlue and DISK + LightGlue) calibrated by isotonic regression.
  • Open-set capable graph-based clustering of query images using Chinese Whispers over a k-reciprocal re-ranked similarity graph, enabling discovery of unknown individuals without predefined cluster count.
  • Deployment of two task-adapted fine-tuning strategies for MiewID embeddings—Dynamic ArcFace and SphereFace2-Focal losses—designed to tighten embedding clusters for better open-set discrimination.

Datasets

  • LynxID2025 — 2957 images, 77 identities — AnimalCLEF 2026 benchmark
  • SalamanderID2025 — 1388 images, 587 identities — AnimalCLEF 2026 benchmark
  • SeaTurtleID2022 — 8729 images, 438 identities — AnimalCLEF 2026 benchmark
  • Texas Horned Lizard — size unspecified, test-only — AnimalCLEF 2026 benchmark

Baselines vs proposed

  • WildFusion baseline with MegaDescriptor global branch: public ARI < 0.70; Proposed ensemble using MiewID variants: public ARI = 0.72124
  • Pretrained MiewID global descriptor alone: ARI lower than fine-tuned variants (exact numbers not specified)
  • Dynamic ArcFace fine-tuned MiewID: tighter clusters and improved ARI over pretrained
  • SphereFace2-Focal fine-tuned MiewID: comparable embedding tightening and ARI improvement
  • Simpler preprocessing-before-calibration variant: private ARI = 0.71087 vs full pipeline with 0.70393 (private ARI)

Figures from the paper

Figures are reproduced from the source paper for academic discussion. Original copyright: the paper authors. See arXiv:2608.02469.

Fig 1

Fig 1: Overview of the proposed similarity-to-clustering pipeline.

Fig 2

Fig 2: Representative specimen segmentation and species-specific preprocessing outputs.

Fig 3

Fig 3: Score-CAM comparison of MiewID and MegaDescriptor across four species.

Fig 4

Fig 4: compares ALIKED + LightGlue and DISK + Light-

Fig 5

Fig 5 (page 5).

Fig 6

Fig 6 (page 5).

Fig 7

Fig 7 (page 5).

Fig 8

Fig 8 (page 5).

Limitations

  • No explicit adversarial robustness evaluation or stress-testing against active evasion attacks.
  • Limited discussion on handling severe distribution shifts beyond the open-set unknown identity splits.
  • Texas horned lizard data used segmentation only without species-specific preprocessing, which might underperform relative to others.
  • Local matching branches (ALIKED + LightGlue, DISK + LightGlue) are used without task-specific fine-tuning, potentially limiting optimal performance.
  • Hyperparameter selections and model ensembling add complexity, which may impact deployment simplicity or real-time use.
  • Some datasets and label distributions are imbalanced and relatively small, possibly affecting generalization.

Open questions / follow-ons

  • How would adversarial examples or intentional obfuscation affect the robustness of calibrated global-local similarity fusion and graph clustering?
  • Can task-specific fine-tuning or adaptation of local matching branches further improve open-set recognition performance?
  • How generalizable is the species-specific preprocessing approach for entirely new animal species or more diverse ecological conditions?
  • Could end-to-end trainable architectures incorporating segmentation, global and local feature fusion, and clustering improve accuracy beyond modular similarity-and-clustering pipelines?

Why it matters for bot defense

While this paper primarily addresses open-set animal re-identification in wildlife monitoring, its methodology—calibrated fusion of global and local similarity scores combined with flexible graph clustering—offers valuable insights for bot-defense and CAPTCHA systems requiring robust user/device clustering under uncertainty. The species-specific preprocessing parallels tailored input normalization that can enhance subtle feature separability. The calibrated similarity fusion and cluster-level assignment strategies may help improve confidence in unknown user discovery or detection of unseen automated bots. Additionally, the use of fully unsupervised, parameter-tuned clustering methods like Chinese Whispers underpins scalable grouping without predefined clusters, relevant to assembling behaviorally consistent bot groups. Practitioners could adapt the similarity calibration approaches and local-global fusion concepts to improve identification accuracy and clustering robustness in human verification and behavioral analysis settings.

Cite

bibtex
@article{arxiv2608_02469,
  title={ Calibrated Similarity and Graph Clustering for Open-Set Animal Re-Identification },
  author={ Mohamed ElBassat and Seifeldin Elkerdany and Mohamed ElBialy and Gamal Abouelhamd and Jana Ghoneim and Assem Elkady and Mohamed Elboraay and Nelly Semenova },
  journal={arXiv preprint arXiv:2608.02469},
  year={ 2026 },
  url={https://arxiv.org/abs/2608.02469}
}

Read the full paper

Articles are CC BY 4.0 — feel free to quote with attribution