Read-Only Zero-Shot Classifier Expansion from Pairwise Semantics

Zhiqiang Zhong, Jun PangNeurIPS 2026

TL;DR

Imagine teaching an image classifier to recognize a zebra when it has never seen a zebra photo, you aren't allowed to touch its feature extractor, and its original training images are locked behind privacy firewalls. This paper introduces GeoRWS, a framework that expands "read-only" deployed models to new classes without looking at a single image during adaptation. By asking an LLM how a new concept compares to known ones, it mathematically blends existing classifier weights to synthesize new ones on the fly.

What Problem Does This Paper Address?

Deep learning models are great at recognizing things they’ve been trained on, until you need to add a new label in a strict enterprise or medical setting. Often, the original training images are long gone or locked behind copyright and privacy restrictions.

Standard Zero-Shot Learning (ZSL) tries to recognize unseen classes using text descriptions, but almost always assumes you still have access to the original training images (or extracted visual features) to align the text and vision spaces. Image-free Zero-Shot Learning (I-ZSL) drops that lifeline: you only get the frozen, pre-trained model and the list of class names.

Existing I-ZSL methods map standalone text descriptions of classes directly to classifier weights. This hits two snags: writing accurate standalone descriptions for subtle, fine-grained classes (like two nearly identical species of birds) is hard, and general-purpose text embeddings rarely match the internal geometry of a specialized vision model's classifier head.

Figure 1: Overview of GEORWS. Expansion uses read-only access to seen-class classifier weights and class labels, with no images or image features. The test image is used only for final prediction.

Methods

The authors propose Geometry-Regularized Relational Weight Synthesis (GeoRWS). Instead of defining classes in isolation, GeoRWS defines them relationally and synthesizes new linear classifier weights as weighted mixtures (convex combinations) of existing "seen" class weights.

Figure 2: Overview of GEORWS. Cached pairwise descriptions and seen-class weights determine synthesis coefficients. Leave-one-out training reconstructs masked seen weights; inference applies the learned rule to unseen classes. The semantic encoder, decoder, and scorer are trainable; the LLM, text encoder, backbone, and seen weights are frozen. Appendix C gives a concrete training and inference example.

Here is how the pipeline works:

  1. Pairwise Affinity Descriptions: A frozen LLM generates short, structured comparisons between pairs of classes—highlighting shared traits and key differences (e.g., "Both a sparrow and a warbler are small songbirds, but they differ in plumage coloration"). A frozen text encoder turns these into embeddings.
  2. Leave-One-Out Weight Reconstruction: How do you learn to mix weights without image data? During adaptation, GeoRWS masks out one known class weight at a time and trains a lightweight semantic encoder and MLP scoring head to reconstruct that missing weight using a softmax-weighted blend of the remaining known weights.
  3. Regularizing for Reality: Because LLM text can be noisy and misaligned with visual space, the authors add two clever training guardrails:
  4. Classifier-Geometry Regularizer ($\mathcal{L}_{\text{geo}}$): Uses KL divergence to anchor the learned mixing coefficients to the actual cosine-similarity neighborhoods of the seen classifier weights.
  5. Semantic-Consistency Regularizer ($\mathcal{L}_{\text{cons}}$): Applies dropout perturbations to the text embeddings, forcing the model to output stable mixing recipes even when descriptions fluctuate.
  6. Classifier Injection: At inference, GeoRWS relates an unseen class (e.g., Horse) to all seen classes (e.g., Zebra, Ox, Deer), computes the mixing coefficients, and injects the newly synthesized weight vector directly into the frozen classifier head.

Datasets

The authors evaluate GeoRWS on three standard ZSL benchmarks using established image-free splits (no new datasets are introduced):

  • CUB: Fine-grained recognition of bird species (150 seen, 50 unseen).
  • AWA2: Coarse-grained recognition of animals (40 seen, 10 unseen).
  • SUN: Scene-level recognition with high semantic and contextual overlap (645 seen, 72 unseen).

Key Insights and Ideas

  • Comparisons beat definitions: Replacing pairwise descriptions with standard single-class descriptions from the exact same LLM drops ZSL accuracy on CUB from 71.28% to 64.23%. Explicitly asking how A differs from B surfaces fine-grained transfer cues that standalone descriptions miss.
  • LLMs are better sidekicks than standalone classifiers: Using a multimodal LLM (GPT-4) directly to classify images fails dramatically on fine-grained birds (11.37% ZSL accuracy on CUB). Using the LLM purely to describe semantic relationships—and letting the vision model's own weight geometry do the heavy lifting—jumps accuracy to 71.28%.
  • Model-agnostic semantics: Whether the pairwise comparisons are written by GPT-4, Llama 3, Gemini 2.0, or human annotators, and whether they are encoded via CLIP, T5, or BERT, performance stays within a tight ~1–6% band. The adaptive alignment matters much more than picking a specific LLM.

Key Results

GeoRWS is tested on both standard ZSL (test images are only unseen classes) and Generalized ZSL (GZSL, where test images can be seen or unseen, measured by harmonic mean $H$).

  • Zero-Shot Accuracy: GeoRWS beats all image-free and weight-adapted baselines across the board, hitting 71.28% on CUB (+7.11 percentage points over the best baseline), 60.34% on AWA2 (+4.67 pp), and 59.07% on SUN (+6.93 pp).
  • Generalized ZSL ($H$): Many baselines suffer from catastrophic bias toward seen classes, scoring near-zero on $H$. GeoRWS achieves the highest harmonic mean on all datasets, with massive jumps on fine-grained CUB (71.79%, +10.37 pp) and scene-heavy SUN (46.91%, +7.64 pp), while reaching 53.57% on AWA2.
  • Graceful Degradation: When 20% of the pairwise text descriptions are randomly swapped at test time to simulate heavy LLM hallucinations, the semantic-consistency regularizer keeps GZSL performance remarkably steady compared to unregularized variants.

Limitations and Future Work

While the authors defer their extended discussion of limitations and future directions to Appendix H (not included in the main text), one fundamental mathematical boundary is made explicit in their theoretical analysis (Proposition 1): because every new classifier weight is synthesized as a non-negative mixture that sums to one, the new class must live inside the convex hull of the seen classes' weights. If you try to expand a bird-only classifier to recognize trucks, no convex blend of bird weights will approximate the ideal truck classifier well. Future extensions would likely need to explore ways to extrapolate beyond the existing weight hull when target domains shift drastically.

Summary updated

Abstract

Image-free Zero-Shot Learning (I-ZSL) aims to extend a pre-trained classifier to unseen classes without using training images or image features during adaptation. Existing I-ZSL methods often depend on pre-defined class descriptions and fixed text encoders, which can be misaligned with the classifier space of the deployed model. We propose Geometry-Regularized Relational Weight Synthesis (GeoRWS), a read-only classifier expansion framework that learns to synthesize unseen-class classifier weights from pairwise semantic relations and observed seen-class weights. Given class-pair affinity descriptions generated by a frozen large language model, GeoRWSuses an adaptive semantic encoder to estimate affinity coefficients over seen classifiers through leave-one-out reconstruction. The training objective further includes a classifier-geometry regularizer, which anchors the learned coefficients to neighborhoods in the seen-class classifier head, and a semantic-consistency regularizer, which improves stability under perturbations of pairwise semantic descriptions. At inference, GeoRWS synthesizes unseen-class weights as mixtures of seen-class weights and injects them into the classifier head while keeping the feature extractor fixed. Experiments on standard ZSL and GZSL benchmarks show consistent improvements over image-free and adapted zero-shot baselines, especially on fine-grained recognition tasks.
BibTeX
@inproceedings{zhong2026read,
  author = {Zhiqiang Zhong and Jun Pang},
  title = {{Read-Only Zero-Shot Classifier Expansion from Pairwise Semantics}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=4mw9dYRV4z},
}
Figure