Abstract Adapting Large Pre-trained Models (LPMs) to specific tasks typically requires significant computational resources and task-specific data. This paper introduces SG-LoRA, a novel framework designed for Zero-Shot Open-world Adaptation (ZSOA). SG-LoRA generates task-specific Low-Rank Adaptation (LoRA) parameters directly from text descriptions by leveraging a semantic bridge to "distill" knowledge from a repository of existing LoRA experts. This approach enables high-performance model adaptation in real-time without requiring user data or additional fine-tuning. Experiments across diverse benchmarks like MS-COCO and OxfordPets demonstrate that SG-LoRA not only outperforms existing merging-based methods but can also surpass "Oracle" models fine-tuned on target data, offering a privacy-preserving and efficient solution for edge-device deployment.
Introduction
Fine-tuning Large Pre-trained Models (LPMs) for specialized tasks is a computationally intensive process. While Parameter-Efficient Fine-Tuning (PEFT) methods, such as Low-Rank Adaptation (LoRA), significantly reduce the number of trainable parameters, they still necessitate access to task-specific data and substantial compute time for every new application. This requirement is particularly problematic for edge devices, such as smartphones, where data privacy is paramount and computational resources are limited.
Existing solutions generally fall into two categories:
- Merging-based methods: These combine existing LoRA modules but are often deterministic and rigid, struggling to generalize to truly novel tasks.
- Generation-based methods: These synthesize parameters but typically operate in a "closed-world" setting, meaning they only work for tasks very similar to those seen during training.
To address these limitations, the authors introduce the Zero-Shot Open-world Adaptation (ZSOA) setting. In this scenario, a model must adapt to a broad, unconstrained space of user-defined tasks (e.g., "retrieve photos of a rare bird species") without ever seeing training data for that specific task.
Methodology
The core innovation of SG-LoRA is the realization that language can serve as a universal bridge between tasks and model parameters. The framework operates in three distinct stages:
- Expert Repository Formation: The authors curate a library of "expert" LoRA modules trained on various known tasks. Each expert is paired with a semantic embedding of its task description, generated via a frozen CLIP text encoder.
- Semantic Prior Construction: When a user provides a new task description, a sparse router identifies the top-$k$ most semantically similar experts from the repository. Their parameters are fused, weighted by similarity, to create a "semantic prior"—a preliminary estimation of the optimal parameters for the new task.
- Conditional Parameter Generation: This prior is fed into a Conditional Variational Autoencoder (CVAE). Unlike deterministic merging, the CVAE models the distribution of parameters. It uses the semantic guidance to "sample" high-performing, task-specific LoRA weights.
This approach allows the model to "hallucinate" effective weights for a new task by intelligently interpolating between the knowledge of known experts.
Experimental Setup
The researchers evaluated SG-LoRA across several diverse benchmarks to test its versatility:
- MS-COCO & Flickr30K: Standard datasets used for image-text retrieval tasks.
- OxfordPets & Flowers102: Used to evaluate fine-grained adaptation, such as identifying specific animal breeds or plant species.
- CIFAR-100: Used to demonstrate the method's efficacy in standard image classification.
To facilitate the ZSOA setting, the authors utilized Qwen2-VL to generate highly detailed, fine-grained captions for these datasets, creating a richer semantic space for the model to navigate.
Results and Discussion
SG-LoRA demonstrates superior performance across multiple metrics and datasets. On the MS-COCO benchmark, the framework achieved an R@1 of 74.31 for Image-to-Text retrieval, significantly outperforming the original Zero-shot CLIP (66.43) and even the "Oracle" model that was fine-tuned directly on the target data (72.45).
Several key insights emerged from the study:
- Text as a Universal Adapter: The semantic relationship between task descriptions (e.g., "cat" vs. "Persian cat") maps effectively to the relationship between their optimal LoRA parameters.
- Stochasticity vs. Determinism: By using a CVAE instead of a simple weighted average (like Model Soups), SG-LoRA can explore the parameter space more flexibly. This "probabilistic sampling" helps the model find better configurations that a simple merge might miss.
- Avoiding the "Overfitting Trap": SG-LoRA occasionally outperforms the Oracle model. This is attributed to the fact that direct fine-tuning on small datasets often leads to overfitting, whereas SG-LoRA benefits from the "distilled" wisdom of multiple experts.
- Privacy by Design: Because parameters are generated from a text prompt and pre-existing experts, users do not need to upload private data to a server for training.
Conclusion
SG-LoRA presents a robust and efficient framework for adapting large models to open-world tasks without the need for additional data or fine-tuning. While the performance is inherently tied to the diversity and quality of the "Expert Repository," the method enables real-time construction of specialized models. Future research will focus on expanding the repository to broader domains and exploring the application of semantic-to-parameter mapping in more complex generative tasks.
Summary updated