Generate to Teach: Adapting Flow Models with Class-Contrastive LoRA for Few-Shot Classification
Abstract
For synthetic data to help few-shot classification, generated images must preserve the distinctions among the target classes. Yet standard generator adaptation fits each support image only to its assigned prompt, leaving these relative distinctions implicit. We introduce TaskRel, a class-contrastive LoRA method for flow-matching generators that turns the generator's own conditional prediction errors into task supervision. For each support example, TaskRel evaluates the correct and competing class prompts on the same noisy latent and target velocity, so the class condition is the only variable. A finite-margin hinge favors the correct condition alongside positive flow-matching fitting. An evolving relation map selects hard competitors, while a scheduler-derived constant controls comparison strength independently of selection. The resulting shared generator is trained solely from labeled supports and its own predictions, without downstream-classifier feedback or inference-time filtering. Across six benchmarks with Stable Diffusion 3.5 Medium, TaskRel reaches 67.50% mean accuracy with a scratch ResNet-50, improving over the matched flow-matching control by 3.36 points and LoFT, the strongest external comparator, by 3.76 points. Its frozen synthetic pools retain gains across scratch ViT and CLIP learners and across 25–100 generated images per class. Thus, class relations provide a direct adaptation signal for reusable synthetic training data while preserving ordinary class-conditioned sampling.
est. 32% chance this paper gets accepted at ICLR 2027.
What do you think this paper will get?
All positions stay anonymous.