Manuscript Offprint

arXiv:2609.06020

What Does Animal Re-Identification Learn? Linear Biological Concepts and Their Origins in Visual Representations

Robert Nolting, Alexandra Schild, Moritz Weckbecker, Maximilian Schall, Gerard de Melo

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Conservation increasingly relies on camera traps that collect more wildlife imagery than experts can manually analyze, making animal re-identification (Re-ID) essential for monitoring individuals and populations. Yet understanding which cues drive model decisions is challenging for ViT-based Re-ID models, whose metric-learning objectives provide no explicit supervision for biological concepts. We ask whether such models nonetheless organize their representations along biologically meaningful axes. Using a DINOv3 backbone fine-tuned for Western lowland gorilla Re-ID with triplet-margin loss, we find that sex and age emerge as linear directions that generalize to held-out individuals, reaching up to 0.91 AUROC and being recoverable from a single image per individual. Activation steering further shows that the sex direction is causally used by the model, flipping a significant fraction of predictions to the opposite sex. Comparing off-the-shelf and fine-tuned backbones shows that Re-ID training does not create these concepts, but relocates them across the network. Finally, data attribution reveals that the representation we find reflects a graded biological axis, is redundantly encoded across the population and shaped by visually ambiguous individuals. Together, these findings show how interpretability can uncover both the biological structure and failure modes of Re-ID representations, providing a step toward auditable computer vision for wildlife monitoring. Our code is available: https://alexandraschild.github.io/bio-concepts/.

1. Introduction

Conservation efforts increasingly rely on motion-triggered camera traps, which collect far more observations of animals

in the wild than can be manually annotated and analyzed [20]. Animal re-identification (Re-ID) can help turn these large-scale data collections into valuable information about individual animals and populations. However, for animal conservation efforts, the trustworthiness of model predictions matters alongside their accuracy: practitioners need to understand why a model identifies an individual and whether its decisions rely on biologically meaningful cues or spurious correlations. This is particularly important for modern deep learning-based Re-ID models, whose learned representations are difficult to interpret. Interpretability techniques can reveal which cues drive identification and whether the model relies on misleading ones, which is essential for evaluating whether Re-ID models can be trusted in long-term, real-world conservation monitoring.

One promising route toward understanding model behavior is to identify human-meaningful concepts encoded by it. A growing body of work suggests that many semantic attributes are represented as approximately linear directions in neural activation spaces [22]. Such directions can be identified with linear probes, validated against external ground truth, and, importantly, causally manipulated through activation interventions. This perspective turns an otherwise opaque activation into a representation that can be inspected and experimentally tested.

However, existing evidence for linear concept representations comes predominantly from models trained with explicit class supervision or generative objectives. It remains unclear whether comparable interpretable structures emerge under metric learning, the objective commonly used for Re-ID and one that does not require a classification head. This raises a fundamental question: can a model trained only to distinguish individual animals nevertheless organize its internal representation along biologically meaningful axes such as sex and age?

Figure

Figure 1. Feature attribution for a female test image, produced by DualXDA. The middle image shows a female gorilla that was correctly predicted by our activation probe, together with an LRP heatmap showing which parts of the image were important for the classification. The right side shows the training images that pulled the prediction most towards female, the left side towards male. The heatmaps show that relevance concentrates on facial and anatomical regions but also on the nursing infant, suggesting a potential shortcut.

We investigate this question in the context of Western low-land gorilla re-identification, using a DINOv3-based model trained to distinguish individual gorillas [29]. Its backbone is fine-tuned on labelled images of individual gorillas using a triplet-margin loss. Rather than treating interpretability as a purely post-hoc visualization problem, we study the resulting representation from several complementary perspectives. First, we ask whether biologically meaningful concepts are linearly encoded across the model's layers and whether these directions generalize to individuals not seen during training. Second, we assess whether the resulting directions are actually used by the model, using causal interventions during the forward pass. Third, we compare the geometry of the stock DINOv3 backbone with that of its Re-ID-fine-tuned counterpart to determine how task-specific training alters existing concepts. Finally, we rely on data attribution to examine what the learned representation is built from: which training individuals contribute to a concept direction, how influence is distributed across the training set, and how robust the representation is to removing individual examples.

Our analysis reveals a consistent picture: biologically meaningful concepts emerge as structured, causal, and highly redundant components of the Re-ID representation, with Re-ID fine-tuning substantially reshaping where these concepts reside. Moreover, the learned representation reflects the structure of the underlying biology: concept directions form graded axes rather than discrete categories, and difficult biological cases disproportionately shape the resulting representation. At the same time, attribution exposes both useful diagnostics and potentially misleading shortcuts, highlighting why understanding a deployed Re-ID system requires going beyond predictive accuracy alone.

In summary, our findings are:

  • Linear concepts under metric learning. A ViT trained solely for gorilla Re-ID encodes sex and age as approximately linear directions, reaching up to 0.91 AUROC on held-out individuals and remaining detectable from a

single image per individual.

  • Functional role in retrieval. Activation steering along the sex direction shifts identity predictions toward individuals of the opposite sex, while off-manifold diagnostics distinguish this targeted effect from representation collapse.

  • Fine-tuning reshapes existing concepts. Pretrained and Re-ID-fine-tuned DINOv3 exhibit similar concept separability, but their directions increasingly diverge across layers, with sex reaching only ~0.25 cosine similarity in the final layer. Fine-tuning therefore reorganizes rather than creates the concept representation.

  • Biologically structured and redundant representation. The learned sex direction forms a graded axis reflecting sexual dimorphism across development. Visually ambiguous blackbacks are disproportionately represented among its constituting examples, yet removing any individual has little effect on held-out performance.

  • Attribution reveals potential shortcuts. Feature attribution surfaces a biologically plausible but potentially spurious shortcut: on images that show female gorillas nursing an infant, heatmaps show attribution placed on the infant.

References (30)