+
# Introduction
@@ -48,35 +48,49 @@ In addition, the `learnware` package serves as the engine for the [Beimingwu Sys
A learnware consists of a high-performance machine learning model and specifications that characterize the model, i.e., "Learnware = Model + Specification".
These specifications, encompassing both semantic and statistical aspects, detail the model's functionality and statistical information, making it easier for future users to identify and reuse these models.
-The need for Learnware arises due to challenges in machine learning, such as the need for extensive training data, advanced techniques, continuous learning, catastrophic forgetting, and data privacy issues. Although there are many efforts focusing on one of these issues separately, they are entangled, and solving one problem may exacerbate others. The learnware paradigm aims to address many of these challenges through a unified framework. Its benefits are listed as follows.
+
+
+
-| Benefit | Description |
-| ---- | ---- |
-| Lack of training data | Strong models can be built with small data by adapting well-performed learnwares. |
-| Lack of training skills | Ordinary users can obtain strong models by leveraging well-performed learnwares instead of building models from scratch. |
-| Catastrophic forgetting | Accepted learnwares are always stored in the learnware market, retaining old knowledge. |
-| Continual learning | The learnware market continually enriches its knowledge with constant submissions of well-performed learnwares. |
-| Data privacy/ proprietary | Developers only submit models, not data, preserving data privacy/proprietary. |
-| Unplanned tasks | Open to all legal developers, the learnware market can accommodate helpful learnwares for various tasks. |
-| Carbon emission | Assembling small models may offer good-enough performance, reducing interest in training large models and the carbon footprint. |
-
-The learnware paradigm consists of two distinct stages:
+The above diagram illustrates the learnware paradigm, which consists of two distinct stages:
- `Submitting Stage`: Developers voluntarily submit various learnwares to the learnware market, and the system conducts quality checks and further organization of these learnwares.
- `Deploying Stage`: When users submit task requirements, the learnware market automatically selects whether to recommend a single learnware or a combination of multiple learnwares and provides efficient deployment methods. Whether it’s a single learnware or a combination of multiple learnwares, the system offers convenient learnware reuse interfaces.
+## Framework and Infrastructure Design
+
-
+
-## Learnware Package Design
+The architecture is designed based on the guidelines including _decoupling_, _autonomy_, _reusability_, and _scalability_. The above diagram illustrates the framework from the perspectives of both modules and workflows.
+
+- At the workflow level, the `learnware` package consists of `Submitting Stage` and `Deploying Stage`.
+
+
+
+| Module | Workflow |
+| ---- | ---- |
+| `Submitting Stage` | The developers submit learnwares to the learnware market, which conducts usability checks and further organization of these learnwares. |
+| `Deploying Stage` | The learnware market recommends learnwares according to users’ task requirements and provides efficient reuse and deployment methods. |
+
+
+
+- At the module level, the `learnware` package is a platform that consists of `Learnware`, `Market`, `Specification`, `Model`, `Reuse`, and `Interface` modules.
+
+
+
+| Module | Description |
+| ---- | ---- |
+| `Learnware` | The specific learnware, consisting of specification module, and user model module. |
+| `Market` | Designed for learnware organization, identification, and usability testing. |
+| `Specification` | Generating and storing statistical and semantic information of learnware, which can be used for learnware search and reuse. |
+| `Model` | Including the base model and the model container, which can provide unified interfaces and automatically create isolated runtime environments. |
+| `Reuse` | Including the data-free reuser, data-dependent reuser, and aligner, which can deploy and reuse learnware for user tasks. |
+| `Interface` | The interface for network communication with the `Beimingwu` backend.|
-
-
-At the workflow level, the `learnware` package consists of `Submitting Stage` and `Deploying Stage`.
-At the module level, the `learnware` package is a platform that consists of above components. The components are designed as loose-coupled modules and each component could be used stand-alone.
# Quick Start
@@ -105,7 +119,7 @@ In the `learnware` package, each learnware is encapsulated in a `zip` package, w
- `stat.json`: the statistical specification of the learnware. Its filename can be customized and recorded in learnware.yaml.
- `environment.yaml` or `requirements.txt`: specifies the environment for the model.
-To facilitate the construction of a learnware, we provide a [Learnware Template](https://www.bmwu.cloud/static/learnware-template.zip) that users can use as a basis for building their own learnware. We've also detailed the format of the learnware `zip` package in [Learnware Preparation](docs/workflows/upload:prepare-learnware).
+To facilitate the construction of a learnware, we provide a [Learnware Template](https://www.bmwu.cloud/static/learnware-template.zip) that users can use as a basis for building their own learnware. We've also detailed the format of the learnware `zip` package in [Learnware Preparation](https://learnware.readthedocs.io/en/latest/workflows/upload.html#prepare-learnware).
## Learnware Package Workflow
@@ -147,7 +161,7 @@ After defining the semantic specification, you can upload your learnware using a
demo_market.add_learnware(zip_path, semantic_spec)
```
-Here, `zip_path` is the directory of your learnware `zip` package.
+Here, `zip_path` is the file path of your learnware `zip` package.
### Semantic Specification Search
@@ -169,7 +183,7 @@ print(single_result)
If you decide in favor of providing your own statistical specification file, `stat.json`, the `Learnware Market` can further refine the selection of learnwares from the previous step. This second-stage search leverages statistical information to identify one or more learnwares that are most likely to be beneficial for your task.
-For example, the code below executes learnware search when using Reduced Set Kernel Embedding as the statistical specification:
+For example, the code below executes learnware search when using Reduced Kernel Mean Embedding as the statistical specification:
```python
import learnware.specification as specification
@@ -215,20 +229,20 @@ reuse_ensemble = AveragingReuser(learnware_list=mixture_item.learnwares)
ensemble_predict_y = reuse_ensemble.predict(user_data=test_x)
```
-We also provide two methods when the user has labeled data for reusing a given list of learnwares: `EnsemblePruningReuser` and `FeatureAugmentReuser`. Substitute `test_x` in the code snippet below with your testing data, and substitute `train_X, train_y` with your training labeled data, and you're all set to reuse learnwares:
+We also provide two methods when the user has labeled data for reusing a given list of learnwares: `EnsemblePruningReuser` and `FeatureAugmentReuser`. Substitute `test_x` in the code snippet below with your testing data, and substitute `train_x, train_y` with your training labeled data, and you're all set to reuse learnwares:
```python
from learnware.reuse import EnsemblePruningReuser, FeatureAugmentReuser
# Use ensemble pruning reuser to reuse the searched learnwares to make prediction
reuse_ensemble = EnsemblePruningReuser(learnware_list=mixture_item.learnwares, mode="classification")
-reuse_ensemble.fit(train_X, train_y)
-ensemble_pruning_predict_y = reuse_ensemble.predict(user_data=data_X)
+reuse_ensemble.fit(train_x, train_y)
+ensemble_pruning_predict_y = reuse_ensemble.predict(user_data=test_x)
# Use feature augment reuser to reuse the searched learnwares to make prediction
reuse_feature_augment = FeatureAugmentReuser(learnware_list=mixture_item.learnwares, mode="classification")
-reuse_feature_augment.fit(train_X, train_y)
-feature_augment_predict_y = reuse_feature_augment.predict(user_data=data_X)
+reuse_feature_augment.fit(train_x, train_y)
+feature_augment_predict_y = reuse_feature_augment.predict(user_data=test_x)
```
### Auto Workflow Example
@@ -237,6 +251,8 @@ The `learnware` package also offers automated workflow examples. This includes p
# Experiments and Examples
+We build various types of experimental scenarios and conduct extensive empirical study to evaluate the baseline algorithms for specification generation, learnware identification, and reuse on tabular, image, and text data.
+
## Environment
For all experiments, we used a single Linux server. Details on the specifications are listed in the table below. All processors were used for training and evaluating.
@@ -251,89 +267,84 @@ For all experiments, we used a single Linux server. Details on the specification
## Tabular Scenario Experiments
-### Datasets
-
-Our study involved three public datasets in the sales forecasting field: [Predict Future Sales (PFS)](https://www.kaggle.com/c/competitive-data-science-predict-future-sales/data), [M5 Forecasting (M5)](https://www.kaggle.com/competitions/m5-forecasting-accuracy/data), and [Corporacion](https://www.kaggle.com/competitions/favorita-grocery-sales-forecasting/data).
-
-We applied various pre-processing methods to these datasets to enhance the richness of the data. After pre-processing, we first divided each dataset by store and then split the data for each store into training and test sets. Specifically:
-
-- For PFS, the test set consisted of the last month's data from each store.
-- For M5, we designated the final 28 days' data from each store as the test set.
-- For Corporacion, the test set was composed of the last 16 days of data from each store.
+On various tabular datasets, we initially evaluate the performance of identifying and reusing learnwares from the learnware market that share the same feature space as the user's tasks. Additionally, since tabular tasks often come from heterogeneous feature spaces, we also assess the identification and reuse of learnwares from different feature spaces.
-In the submitting stage, the Corporacion dataset's 55 stores are regarded as 165 uploaders, each employing one of three different feature engineering methods. For the PFS dataset, 100 uploaders are established, each using one of two feature engineering approaches. These uploaders then utilize their respective stores' training data to develop LightGBM models. As a result, the learnware market comprises 265 learnwares, derived from five types of feature spaces and two types of label spaces.
+### Settings
-Based on the specific design of user tasks, our experiments were primarily categorized into two types:
+Our study utilize three public datasets in the field of sales forecasting: [Predict Future Sales (PFS)](https://www.kaggle.com/c/competitive-data-science-predict-future-sales/data), [M5 Forecasting (M5)](https://www.kaggle.com/competitions/m5-forecasting-accuracy/data), and [Corporacion](https://www.kaggle.com/competitions/favorita-grocery-sales-forecasting/data). To enrich the data, we apply diverse feature engineering methods to these datasets. Then we divide each dataset by store and further split the data for each store into training and test sets. A LightGBM is trained on each Corporacion and PFS training set, while the test sets and M5 datasets are reversed to construct user tasks. This results in an experimental market consisting of 265 learnwares, encompassing five types of feature spaces and two types of label spaces. All these learnwares have been uploaded to the [Beimingwu system](https://bmwu.cloud/).
-- **homogeneous experiments** are designed to evaluate performance when users can reuse learnwares in the learnware market that have the same feature space as their tasks (homogeneous learnwares). This contributes to showing the effectiveness of using learnwares that align closely with the user's specific requirements.
+### Baseline algorithms
+The most basic way to reuse a learnware is Top-1 reuser, which directly uses the single learnware chosen by RKME specification. Besides, we implement two data-free reusers and two data-dependent reusers that works on single or multiple helpful learnwares identified from the market. When users have no labeled data, JobSelector reuser selects different learnwares for different samples by training a job selector classifier; AverageEnsemble reuser uses an ensemble method to make predictions. In cases where users possess both test data and limited labeled training data, EnsemblePruning reuser selectively ensembles a subset of learnwares to choose the ones that are most suitable for the user’s task; FeatureAugment reuser regards each received learnware as a feature augmentor, taking its output as a new feature and then builds a simple model on the augmented feature set. JobSelector and FeatureAugment are only effective for tabular data, while others are also useful for text and image data.
-- **heterogeneous experiments** aim to evaluate the performance of identifying and reusing helpful heterogeneous learnwares in situations where no available learnwares match the feature space of the user's task. This helps to highlight the potential of learnwares for applications beyond their original purpose.
+### Homogeneous Cases
-### Homogeneous Tabular Scenario
+In the homogeneous cases, the 53 stores within the PFS dataset function as 53 individual users. Each store utilizes its own test data as user data and applies the same feature engineering approach used in the learnware market. These users could subsequently search for homogeneous learnwares within the market that possessed the same feature spaces as their tasks.
-For homogeneous experiments, the 55 stores in the Corporacion dataset act as 55 users, each applying one feature engineering method, and using the test data from their respective store as user data. These users can then search for homogeneous learnwares in the market with the same feature spaces as their tasks.
-
-The Mean Squared Error (MSE) of search and reuse across all users is presented in the table below:
+We conduct a comparison among different baseline algorithms when the users have no labeled data or limited amounts of labeled data. The average losses over all users are illustrated in the table below. It shows that unlabeled methods are much better than random choosing and deploying one learnware from the market.
| Setting | MSE |
|-----------------------------------|--------|
-| Mean in Market (Single) | 0.331 |
-| Best in Market (Single) | 0.151 |
-| Top-1 Reuse (Single) | 0.280 |
-| Job Selector Reuse (Multiple) | 0.274 |
-| Average Ensemble Reuse (Multiple) | 0.267 |
+| Mean in Market (Single) | 0.897 |
+| Best in Market (Single) | 0.756 |
+| Top-1 Reuse (Single) | 0.830 |
+| Job Selector Reuse (Multiple) | 0.848 |
+| Average Ensemble Reuse (Multiple) | 0.816 |
-When users have both test data and limited training data derived from their original data, reusing single or multiple searched learnwares from the market can often yield better results than training models from scratch on limited training data. We present the change curves in MSE for the user's self-trained model, as well as for the Feature Augmentation single learnware reuse method and the Ensemble Pruning multiple learnware reuse method. These curves display their performance on the user's test data as the amount of labeled training data increases. The average results across 55 users are depicted in the figure below:
+The figure below showcases the results for different amounts of labeled data provided by the user; for each user, we conducted multiple experiments repeatedly and calculated the mean and standard deviation of the losses; the average losses over all users are illustrated in the figure. It illustrates that when users have limited training data, identifying and reusing single or multiple learnwares yields superior performance compared to user's self-trained models.
-
+
-From the figure, it's evident that when users have limited training data, the performance of reusing single/multiple table learnwares is superior to that of the user's own model. This emphasizes the benefit of learnware reuse in significantly reducing the need for extensive training data and achieving enhanced results when available user training data is limited.
+### Heterogeneous Cases
-### Heterogeneous Tabular Scenario
+Based on the similarity of tasks between the market's learnwares and the users, the heterogeneous cases can be further categorized into different feature engineering and different task scenarios.
-In heterogeneous experiments, the learnware market would recommend helpful heterogeneous learnwares with different feature spaces with the user tasks. Based on whether there are learnwares in the market that handle tasks similar to the user's task, the experiments can be further subdivided into the following two types:
+#### Different Feature Engineering Scenarios
-#### Cross Feature Space Experiments
+We consider the 41 stores within the PFS dataset as users, generating their user data using a unique feature engineering approach that differ from the methods employed by the learnwares in the market. As a result, while some learnwares in the market are also designed for the PFS dataset, the feature spaces do not align exactly.
-We designate the 41 stores in the PFS dataset as users, creating their user data with an alternative feature engineering approach that varies from the methods employed by learnwares in the market. Consequently, while the market's learnwares from the PFS dataset undertake tasks very similar to our users, the feature spaces do not match exactly. In this experimental configuration, we tested various heterogeneous learnware reuse methods (without using user's labeled data) and compared them to the user's self-trained model based on a small amount of training data. The average MSE performance across 41 users is as follows:
+In this experimental setup, we examine various data-free reusers. The results in the following table indicate that even when users lack labeled data, the market exhibits strong performance, particularly with the AverageEnsemble method that reuses multiple learnwares.
| Setting | MSE |
|-----------------------------------|--------|
-| Mean in Market (Single) | 1.459 |
-| Best in Market (Single) | 1.226 |
-| Top-1 Reuse (Single) | 1.407 |
-| Average Ensemble Reuse (Multiple) | 1.312 |
-| User model with 50 labeled data | 1.267 |
+| Mean in Market (Single) | 1.149 |
+| Best in Market (Single) | 1.038 |
+| Top-1 Reuse (Single) | 1.105 |
+| Average Ensemble Reuse (Multiple) | 1.081 |
-From the results, it is noticeable that the learnware market still performs quite well even when users lack labeled data, provided it includes learnwares addressing tasks that are similar but not identical to the user's. In these instances, the market's effectiveness can match or even rival scenarios where users have access to a limited quantity of labeled data.
-#### Cross Task Experiments
+#### Different Task Scenarios
+
+We employ three distinct feature engineering methods on all the ten stores from the M5 dataset, resulting in a total of 30 users. Although the overall task of sales forecasting aligns with the tasks addressed by the learnwares in the market, there are no learnwares specifically designed to satisfy the M5 sales forecasting requirements.
-Here we have chosen the 10 stores from the M5 dataset to act as users. Although the broad task of sales forecasting is similar to the tasks addressed by the learnwares in the market, there are no learnwares available that directly cater to the M5 sales forecasting requirements. All learnwares show variations in both feature and label spaces compared to the tasks of M5 users. We present the change curves in RMSE for the user's self-trained model and several learnware reuse methods. These curves display their performance on the user's test data as the amount of labeled training data increases. The average results across 10 users are depicted in the figure below:
+In the following figure, we present the loss curves for the user's self-trained model and several learnware reuse methods. It is evident that heterogeneous learnwares prove beneficial with a limited amount of the user's labeled data, facilitating better alignment with the user's specific task.
-
+
-We can observe that heterogeneous learnwares are beneficial when there's a limited amount of the user's labeled training data available, aiding in better alignment with the user's specific task. This underscores the potential of learnwares to be applied to tasks beyond their original purpose.
## Image Scenario Experiment
-For the CIFAR-10 dataset, we sampled the training set unevenly by category and constructed unbalanced training datasets for the 50 learnwares that contained only some of the categories. This makes it unlikely that there exists any learnware in the learnware market that can accurately handle all categories of data; only the learnware whose training data is closest to the data distribution of the target task is likely to perform well on the target task. Specifically, the probability of each category being sampled obeys a random multinomial distribution, with a non-zero probability of sampling on only 4 categories, and the sampling ratio is 0.4: 0.4: 0.1: 0.1. Ultimately, the training set for each learnware contains 12,000 samples covering the data of 4 categories in CIFAR-10.
+Second, we assess our algorithms on image datasets. It is worth noting that images of different sizes could be standardized through resizing, eliminating the need to consider heterogeneous feature cases.
+
+### Settings
+
+We choose the famous image classification dataset [CIFAR-10](https://www.cs.toronto.edu/~kriz/cifar.html), which consists of 60000 32x32 color images in 10 classes. A total of 50 learnwares are uploaded: each learnware contains a convolutional neural network trained on an unbalanced subset that includs 12000 samples from four categories with a sampling ratio of `0.4:0.4:0.1:0.1`.
+A total of 100 user tasks are tested and each user task consists of 3000 samples of CIFAR-10 with six categories with a sampling ratio of `0.3:0.3:0.1:0.1:0.1:0.1`.
-We constructed 50 target tasks using data from the test set of CIFAR-10. Similar to constructing the training set for the learnwares, to allow for some variation between tasks, we sampled the test set unevenly. Specifically, the probability of each category being sampled obeys a random multinomial distribution, with non-zero sampling probability on 6 categories, and the sampling ratio is 0.3: 0.3: 0.1: 0.1: 0.1: 0.1. Ultimately, each target task contains 3000 samples covering the data of 6 categories in CIFAR-10.
+### Results
-With this experimental setup, we evaluated the performance of RKME Image using 1 - Accuracy as the loss.
+We assess the average performance of various methods using 1 - Accuracy as the loss metric. The following table and figure show that when users face a scarcity of labeled data or possess only a limited amount of it (less than 2000 instances), leveraging the learnware market can yield good performances.
@@ -347,34 +358,23 @@ With this experimental setup, we evaluated the performance of RKME Image using 1
-In some specific settings, the user will have a small number of labelled samples. In such settings, learning the weight of selected learnwares on a limited number of labelled samples can result in better performance than training directly on a limited number of labelled samples.
-
+
## Text Scenario Experiment
-### Datasets
-
-We conducted experiments on the widely used text benchmark dataset: [20-newsgroup](http://qwone.com/~jason/20Newsgroups/). 20-newsgroup is a renowned text classification benchmark with a hierarchical structure, featuring 5 superclasses {comp, rec, sci, talk, misc}.
-
-In the submitting stage, we enumerated all combinations of three superclasses from the five available, randomly sampling 50% of each combination from the training set to create datasets for 50 uploaders.
-
-In the deploying stage, we considered all combinations of two superclasses out of the five, selecting all data for each combination from the testing set as a test dataset for one user. This resulted in 10 users. The user's own training data was generated using the same sampling procedure as the user test data, despite originating from the training dataset.
-
-Model training comprised two parts: the first part involved training a tfidf feature extractor, and the second part used the extracted text feature vectors to train a naive Bayes classifier.
+Finally, we evaluate our algorithms on text datasets. Text data naturally exhibit feature heterogeneity, but this issue can be addressed by applying a sentence embedding extractor.
-Our experiments comprise two components:
+### Settings
-- **unlabeled_text_example** is designed to evaluate performance when users possess only testing data, searching and reusing learnware available in the market.
-- **labeled_text_example** aims to assess performance when users have both testing and limited training data, searching and reusing learnware directly from the market instead of training a model from scratch. This helps determine the amount of training data saved for the user.
+We conduct experiments on the well-known text classification dataset: [20-newsgroup](http://qwone.com/~jason/20Newsgroups/), which consists approximately 20000 newsgroup documents partitioned across 20 different newsgroups.
+Similar to the image experiments, a total of 50 learnwares are uploaded. Each learnware is trained on a subset that includes only half of the samples from three superclasses and the model in it is a tf-idf feature extractor combined with a naive Bayes classifier. We define 10 user tasks, and each of them encompasses two superclasses.
### Results
-- **unlabeled_text_example**:
-
-The table below presents the mean accuracy of search and reuse across all users:
+The results are depicted in the following table and figure. Similarly, even when no labeled data is provided, the performance achieved through learnware identification and reuse can match that of the best learnware in the market. Additionally, utilizing the learnware market allows for a reduction of approximately 2000 samples compared to training models from scratch.
@@ -388,15 +388,11 @@ The table below presents the mean accuracy of search and reuse across all users:
-- **labeled_text_example**:
-
-We present the change curves in classification error rates for both the user's self-trained model and the multiple learnware reuse (EnsemblePrune), showcasing their performance on the user's test data as the user's training data increases. The average results across 10 users are depicted below:
-
+
-From the figure above, it is evident that when the user's own training data is limited, the performance of multiple learnware reuse surpasses that of the user's own model. As the user's training data grows, it is expected that the user's model will eventually outperform the learnware reuse. This underscores the value of reusing learnware to significantly conserve training data and achieve superior performance when user training data is limited.
# Citation
@@ -418,12 +414,9 @@ Please acknowledge the use of our project by citing these papers in your work. T
# About
-## Contributors
-We appreciate all contributions and thank all the contributors!
+## How to Contribute
-
-
-
+Learnware is still young and may contain bugs and issues. We highly value and encourage contributions from the community. For detailed development guidelines, please consult our [Developer Guide](https://learnware.readthedocs.io/en/latest/about/dev.html). We kindly request that contributors adhere to the provided commit format and pre-commit configuration when participating in the project. Your valuable contributions are greatly appreciated.
## About Us
diff --git a/README_zh.md b/README_zh.md
new file mode 100644
index 0000000..85a5696
--- /dev/null
+++ b/README_zh.md
@@ -0,0 +1,433 @@
+
+
+| Setting | Accuracy |
+|-----------------------------------|----------|
+| Mean in Market (Single) | 0.507 |
+| Best in Market (Single) | 0.859 |
+| Top-1 Reuse (Single) | 0.846 |
+| Job Selector Reuse (Multiple) | 0.845 |
+| Average Ensemble Reuse (Multiple) | 0.862 |
+
+
+
+
+
+
+
+
+
+# 引用
+
+如果你在研究或工作中使用了我们的项目,请引用下述论文,感谢你的支持!
+
+```bibtex
+@article{zhou2022learnware,
+ author = {Zhou, Zhi-Hua and Tan, Zhi-Hao},
+ title = {Learnware: Small Models Do Big},
+ journal = {SCIENCE CHINA Information Sciences},
+ year = {2024},
+ volume = {67},
+ number = {1},
+ pages = {1--12},
+}
+```
+
+# 关于
+
+## 如何贡献
+
+`learnware` 还很年轻,可能存在错误和问题。我们非常欢迎大家为 `learnware` 做出贡献。
+我们为所有的开发者提供了详细的[项目开发指南](https://learnware.readthedocs.io/en/latest/about/dev.html),并设置了相应的 commit 格式和 pre-commit 配置,请大家遵守。
+非常感谢大家的贡献!
+
+## 关于我们
+
+`learnware` 由 LAMDA 北冥坞研发团队开发和维护,更多信息可参考:[团队简介](https://docs.bmwu.cloud/zh-CN/about-us.html)。
\ No newline at end of file
diff --git a/SECURITY.md b/SECURITY.md
new file mode 100644
index 0000000..faa5ff0
--- /dev/null
+++ b/SECURITY.md
@@ -0,0 +1,30 @@
+# Security Policy
+
+Welcome to our project! We are committed to maintaining the security of our project and take security issues very seriously. Our team promptly addresses any reported security vulnerabilities to ensure the safety and integrity of our project.
+
+## Reporting Security Issues
+
+Should you discover a security vulnerability or encounter any security-related issue in our project, we encourage you to report it to us immediately with the following methods:
+
+- Email: [bmwu-support@lamda.nju.edu.cn](mailto:bmwu-support@lamda.nju.edu.cn)
+
+When reporting an issue, kindly include as much detail as possible:
+
+- **Description of the Issue**: Clearly describe what you have encountered.
+- **Scope of the Impact**: Assess how the issue affects the project or its users.
+- **Steps to Reproduce**: Provide a step-by-step guide to replicate the issue.
+- **Supporting Material**: Attach any relevant screenshots, example code, or other materials that could aid in understanding the issue.
+
+## Security Issue Handling Process
+
+Upon receiving a report of a security issue, we will:
+
+1. Promptly validate the reported issue to confirm its validity.
+2. Once confirmed, our team will diligently work towards resolving the issue as swiftly as possible.
+3. After resolving the issue, we will release a security advisory in accordance with our update schedule.
+
+## Acknowledgement of Contributions
+
+We deeply value the community's efforts in helping us maintain the security of our project. Therefore, we are committed to acknowledging the contributions of those who report security issues responsibly. We will recognize contributors in our advisories and public communications related to the security issue they helped address, respecting their privacy and confidentiality preferences.
+
+Thank you for your support in keeping our project secure. Your vigilance, responsible reporting, and contributions are greatly appreciated and play a vital role in our continuous effort to improve security.
diff --git a/docs/_static/img/Hetero_labeled_curves.svg b/docs/_static/img/Hetero_labeled_curves.svg
new file mode 100644
index 0000000..b0133ab
--- /dev/null
+++ b/docs/_static/img/Hetero_labeled_curves.svg
@@ -0,0 +1,1726 @@
+
+
+
diff --git a/docs/_static/img/Homo_labeled_curves.svg b/docs/_static/img/Homo_labeled_curves.svg
new file mode 100644
index 0000000..4c0d4c3
--- /dev/null
+++ b/docs/_static/img/Homo_labeled_curves.svg
@@ -0,0 +1,1737 @@
+
+
+
diff --git a/docs/_static/img/image_labeled.svg b/docs/_static/img/image_labeled_curves.svg
similarity index 64%
rename from docs/_static/img/image_labeled.svg
rename to docs/_static/img/image_labeled_curves.svg
index 0de61b1..1c8373e 100644
--- a/docs/_static/img/image_labeled.svg
+++ b/docs/_static/img/image_labeled_curves.svg
@@ -1,16 +1,16 @@
-