Suraj Suresh
AI / MLApr to May 2026Solo buildPublished May 7, 2026

Person of Interest, explainable multimodal face retrieval

Finds the closest faces in a corpus from a written description and explains why each one matched.

My contribution
Solo. I designed the describe-then-retrieve architecture and built the SigLIP-2 encoder wrapper, the FAISS index, the eval harness, the NiceGUI front end, the SLURM job scripts, and the pre-registered encoder ablation.

  • PyTorch
  • SigLIP-2
  • FAISS
  • Qwen2.5-VL
  • NiceGUI
  • SLURM
  • Python
Composite of the Person of Interest interface showing a natural-language query in a search bar above a grid of retrieved face results. The image is rendered from real retrieval output, not a browser screenshot.

Results

Each row shows how I measured the number and links to the file in the repo that produced it.

MeasureValueMethodSource
Pipeline validation, Recall@50.877 on a synthetic corpus500-image synthetic CelebA-format corpus with a deterministic hash encoder. This validates the wiring from query to metrics, not model quality.results.md (opens in a new tab)
Pipeline validation, MRR0.650 on a synthetic corpusSame synthetic run as the Recall@5 row. Not a model-quality result.results.md (opens in a new tab)
Pipeline validation, p95 query latency0.12 ms on a synthetic corpusSame run, FAISS on CPU over 500 vectors.results.md (opens in a new tab)

Problem

Face recognition demos usually do identity matching: is this the same person as that one? That is a closed-world problem with a known gallery. I wanted the harder, more realistic version: describe someone in natural language ("a woman with curly dark hair, glasses, and a thoughtful expression") and retrieve the closest faces from an open corpus, then explain why each result was returned. The query has no fixed schema, the matches are not guaranteed to exist, and the system has to operate on narrative rather than labels, the way a witness describes someone.

My contribution

SigLIP-2 encodes text and faces into one shared embedding space. A FAISS IVF-Flat index holds normalized face embeddings for cosine retrieval, built once and cached on disk. Qwen2.5-VL-7B captions each retrieved face in the context of the query so the user can see why the system thinks it fits. A NiceGUI front end ties it together. The eval harness synthesizes queries from CelebA attribute labels, scores Recall@K and mean reciprocal rank, and measures latency at p50, p95, and p99. SLURM scripts package the index build and evaluation for a shared GPU cluster.

Architecture

SigLIP-2 puts text and image embeddings on the same unit hypersphere through contrastive training, so retrieval is angular proximity. FAISS searches over those embeddings. Qwen2.5-VL reads the query and the retrieved face and writes a sentence about whether they match and where the system might be wrong.

Key decisions

SigLIP-2 over CLIP, as a hypothesis to test. SigLIP's sigmoid loss should produce a more uniform embedding distribution on the hypersphere than CLIP's batch softmax, and that uniformity should translate into better recall for description-to-image retrieval. I wrote this down as a pre-registered ablation (CLIP-ViT-L/14 vs SigLIP-2 base vs SigLIP-2 large on CelebA) with the hypothesis and metrics fixed before the run.

A separate vision-language stage for explanation. Keeping retrieval and explanation separate means the index can be rebuilt without touching the explainer, and the explainer can be swapped without re-indexing.

Demographic attributes excluded from query synthesis. The eval deliberately does not build queries from CelebA labels like Male, Young, Attractive, or Chubby.

CelebA labels as a lower bound. CelebA attributes are noisy and not exhaustive, so treating the original sample as the only gold target lower-bounds true retrieval quality. Absolute Recall@1 will look low; relative comparisons between encoders remain valid because the same noise affects all of them.

Evidence

Pipeline validation on a 500-image synthetic corpus that mirrors CelebA's attribute structure. The encoder in this run is a deterministic hash over attribute combinations, not a real visual encoder, so these numbers confirm the wiring from query to encode to search to metrics. They say nothing about SigLIP-2 versus CLIP.

MetricHash encoder, 500 synthetic images
Recall@10.474
Recall@50.877
Recall@100.965
Recall@501.000
Mean reciprocal rank0.650
p95 query latency0.12 ms

The real-model ablation is scripted in slurm/ablation.sbatch and has not been run yet. The repo README will carry the measured numbers when it completes.

Tradeoffs and next steps

The real-model run is the next step and depends on GPU time. After that I want to compare IVF-Flat against brute force at the full 200k-image scale and measure how much the explanation stage costs per query.