Learnware Specification via Label-Aware Neural Embedding

Wei Chen, Junxiang Mao, Min-Ling ZhangAAAI 2025

Introduction

The learnware paradigm proposes a transformative approach to machine learning development. Rather than training models from scratch for every new task, developers submit well-trained models to a centralized "dock system" (a marketplace). Users can then identify and reuse these pre-existing models for their specific requirements. A fundamental requirement of this paradigm is the generation of specifications—compact, privacy-preserving fingerprints that describe a model's specialty without exposing the developer's private training data.

The Challenge of Specification Generation

Existing specification methods primarily rely on Reduced Kernel Mean Embedding (RKME). This technique maps data into a Reproducing Kernel Hilbert Space (RKHS) to represent the data distribution. However, RKME faces two significant limitations:

  1. Kernel Dependency: Its effectiveness is highly sensitive to the choice of kernel (e.g., Gaussian). A poorly chosen kernel may fail to capture the nuances of complex, real-world data distributions.
  2. Label Neglect: RKME focuses almost exclusively on feature distributions. By ignoring the ground-truth labels associated with training data, it discards rich semantic information that defines the boundaries and objectives of the original task.

Methodology: The LANE Framework

To address these shortcomings, we introduce LANE (Label-Aware Neural Embedding). LANE shifts the specification process from fixed kernel spaces to dynamic neural embedding spaces, incorporating label information to create more descriptive fingerprints.

The Learnware Paradigm workflow comparing traditional RKME with the proposed LANE framework.

Neural Embedding vs. RKHS

Instead of relying on a single kernel, LANE utilizes a diverse set of random neural networks to project data into an embedding space. Random networks are mathematically known to preserve distances between data points, providing a robust and flexible alternative to traditional kernels that generalizes better across different data modalities.

Label-Awareness and Intra-Class Prototypes

LANE treats label information as a form of supervision during specification generation. It models "intra-class feature distributions," establishing prototypes for each class. This ensures that the resulting specification captures not just the general shape of the data, but the specific decision boundaries that define the model's expertise.

The Two-Stage Process

  • Submitting Stage: Developers use Maximum Mean Discrepancy (MMD) within the neural embedding space to identify a "reduced set" of representative points that accurately summarize their dataset's distribution.
  • Deploying Stage: When a user submits a requirement, the system employs quadratic programming to estimate "mixture weights." This process determines which combination of available learnwares best matches the user's needs. The system then generates "mimic data" from these specifications to train a selector that routes new data to the most appropriate models.

Experimental Results

LANE was evaluated against state-of-the-art baselines, including RKME, MAX, and HMR, across diverse benchmarks.

Benchmark Performance

  • CIFAR100 (Image): In a complex scenario involving 20 mixed tasks, LANE achieved an accuracy of 68.13%, significantly outperforming RKME (66.27%) and the naive MAX baseline (52.15%).
  • 20newsgroups (Text): LANE maintained a consistent lead across varying task complexities, demonstrating its ability to handle text embeddings as effectively as image features.

Visual Analysis and Validation

Visualization of synthetic datasets confirms that LANE accurately identifies useful learnwares and generates mimic data that closely approximates the user's actual requirements. In synthetic tests, this high-precision selection enabled a model reuse accuracy of 98.70%.

Visualization of the LANE pipeline on synthetic data, from task specification to final prediction.

Conclusion

LANE represents a significant advancement in the learnware paradigm by leveraging neural embeddings and label information to create superior model specifications. By moving beyond the limitations of kernel-based methods, LANE provides a more accurate, scalable, and privacy-preserving way to retrieve and reuse machine learning models. Future work will focus on optimizing the balance between specification size and retrieval efficiency, as well as extending the framework to handle heterogeneous feature spaces.

Summary updated

BibTeX
@inproceedings{chen2025learnware,
  author = {Wei Chen and Junxiang Mao and Min-Ling Zhang},
  title = {{Learnware Specification via Label-Aware Neural Embedding}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i15.33741},
}
Figure