Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chaoscodes/untl
EMNLP'2022: Unsupervised Non-transferable Text Classification
https://github.com/chaoscodes/untl
emnlp2022 nlp text-classification transfer-learning
Last synced: about 1 month ago
JSON representation
EMNLP'2022: Unsupervised Non-transferable Text Classification
- Host: GitHub
- URL: https://github.com/chaoscodes/untl
- Owner: ChaosCodes
- License: mit
- Created: 2022-10-12T09:33:05.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-01T12:46:10.000Z (about 2 years ago)
- Last Synced: 2024-04-28T02:13:10.469Z (7 months ago)
- Topics: emnlp2022, nlp, text-classification, transfer-learning
- Language: Python
- Homepage:
- Size: 178 KB
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Unsupervised-Non-transferable-Text-Classification
This repository is for our EMNLP' 22 paper:
> Unsupervised Non-transferable Text Classification [ArXiv](https://arxiv.org/abs/2210.12651)
>
> [Guangtao Zeng](github.com/ChaosCodes), [Wei Lu](istd.sutd.edu.sg/people/faculty/lu-wei)## Overview
We propose a novel unsupervised non-transferable learning method for the text classification task that does not require annotated target domain data. We further introduce a secret key component in our approach for recovering the access to the target domain, where we design both an explicit (prompt secret key) and an implicit method (adapter secret key) for doing so.
![overview](overview.png)
## Install dependencies
Run the following scripts to install the dependencies.
```shell
pip install -r requirements.txt
```## Training
Create a directory `outputs` for storing the checkpoints by:
```shell
mkdir outputs
```Run the scripts to train the UNTL model.
```shell
python UNTL.py
```As for the secret key based methods, run the following scripts to train the models
* Train the prompt secret key based model
```sh
python UNTL_with_prefix.py
```* Train the adapter secret key based model
```sh
python UNTL_with_adapter.py
```## Evaluatoin
After finishing training, run the following scripts for evaluating the model.
1. Evaluate the UNTL model
```shell
python predict.py
```2. Evaluate the prompt secret key based model
```sh
python predict_prefix.py
```3. Evaluate the adapter secret key based model
```shell
python predict_adapter.py
```## Reference
```
@inproceedings{zeng2022unsupervised,
author = {Guangtao Zeng and Wei Lu},
title = {Unsupervised Non-transferable Text Classification},
booktitle = {Proceedings of EMNLP},
year = {2022}
}
```