All Projects → microsoft → ASTRA

microsoft / ASTRA

Licence: MIT License
Self-training with Weak Supervision (NAACL 2021)

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to ASTRA

knodle
A PyTorch-based open-source framework that provides methods for improving the weakly annotated data and allows researchers to efficiently develop and compare their own methods.
Stars: ✭ 76 (-40.16%)
Mutual labels:  weak-supervision, weakly-supervised-learning
weasel
Weakly Supervised End-to-End Learning (NeurIPS 2021)
Stars: ✭ 117 (-7.87%)
Mutual labels:  weak-supervision, weakly-supervised-learning
concept-based-xai
Library implementing state-of-the-art Concept-based and Disentanglement Learning methods for Explainable AI
Stars: ✭ 41 (-67.72%)
Mutual labels:  weak-supervision, weakly-supervised-learning
Learning-From-Rules
Implementation of experiments in paper "Learning from Rules Generalizing Labeled Exemplars" to appear in ICLR2020 (https://openreview.net/forum?id=SkeuexBtDr)
Stars: ✭ 46 (-63.78%)
Mutual labels:  weak-supervision, weakly-supervised-learning
WeFEND-AAAI20
Dataset for paper "Weak Supervision for Fake News Detection via Reinforcement Learning" published in AAAI'2020.
Stars: ✭ 67 (-47.24%)
Mutual labels:  weak-supervision, weakly-supervised-learning
wrench
WRENCH: Weak supeRvision bENCHmark
Stars: ✭ 185 (+45.67%)
Mutual labels:  weak-supervision, weakly-supervised-learning
trove
Weakly supervised medical named entity classification
Stars: ✭ 55 (-56.69%)
Mutual labels:  weak-supervision, weakly-supervised-learning
WeSHClass
[AAAI 2019] Weakly-Supervised Hierarchical Text Classification
Stars: ✭ 83 (-34.65%)
Mutual labels:  weakly-supervised-learning
dcsp segmentation
No description or website provided.
Stars: ✭ 34 (-73.23%)
Mutual labels:  weakly-supervised-learning
WS3D
Official version of 'Weakly Supervised 3D object detection from Lidar Point Cloud'(ECCV2020)
Stars: ✭ 104 (-18.11%)
Mutual labels:  weakly-supervised-learning
deviation-network
Source code of the KDD19 paper "Deep anomaly detection with deviation networks", weakly/partially supervised anomaly detection, few-shot anomaly detection
Stars: ✭ 94 (-25.98%)
Mutual labels:  weakly-supervised-learning
GAL-fWSD
Generative Adversarial Learning Towards Fast Weakly Supervised Detection
Stars: ✭ 18 (-85.83%)
Mutual labels:  weakly-supervised-learning
TS-CAM
Codes for TS-CAM: Token Semantic Coupled Attention Map for Weakly Supervised Object Localization.
Stars: ✭ 96 (-24.41%)
Mutual labels:  weakly-supervised-learning
SPML
Universal Weakly Supervised Segmentation by Pixel-to-Segment Contrastive Learning
Stars: ✭ 81 (-36.22%)
Mutual labels:  weakly-supervised-learning
Awesome-Weak-Shot-Learning
A curated list of papers, code and resources pertaining to weak-shot classification, detection, and segmentation.
Stars: ✭ 142 (+11.81%)
Mutual labels:  weakly-supervised-learning
WSDEC
Weakly Supervised Dense Event Captioning in Videos, i.e. generating multiple sentence descriptions for a video in a weakly-supervised manner.
Stars: ✭ 95 (-25.2%)
Mutual labels:  weakly-supervised-learning
Learning-Action-Completeness-from-Points
Official Pytorch Implementation of 'Learning Action Completeness from Points for Weakly-supervised Temporal Action Localization' (ICCV-21 Oral)
Stars: ✭ 53 (-58.27%)
Mutual labels:  weakly-supervised-learning
Simple-does-it-weakly-supervised-instance-and-semantic-segmentation
Weakly Supervised Segmentation by Tensorflow. Implements semantic segmentation in Simple Does It: Weakly Supervised Instance and Semantic Segmentation, by Khoreva et al. (CVPR 2017).
Stars: ✭ 46 (-63.78%)
Mutual labels:  weakly-supervised-learning
hamnet
PyTorch implementation of AAAI 2021 paper: A Hybrid Attention Mechanism for Weakly-Supervised Temporal Action Localization
Stars: ✭ 30 (-76.38%)
Mutual labels:  weak-supervision
just-ask
[TPAMI Special Issue on ICCV 2021 Best Papers, Oral] Just Ask: Learning to Answer Questions from Millions of Narrated Videos
Stars: ✭ 57 (-55.12%)
Mutual labels:  weakly-supervised-learning

Self-Training with Weak Supervision

This repo holds the code for our weak supervision framework, ASTRA, described in our NAACL 2021 paper: "Self-Training with Weak Supervision"

Overview of ASTRA

ASTRA is a weak supervision framework for training deep neural networks by automatically generating weakly-labeled data. Our framework can be used for tasks where it is expensive to manually collect large-scale labeled training data.

ASTRA leverages domain-specific rules, a large amount of unlabeled data, and a small amount of labeled data through a teacher-student architecture:

alt text

Main components:

  • Weak Rules: domain-specific rules, expressed as Python labeling functions. Weak supervision usually considers multiple rules that rely on heuristics (e.g., regular expressions) for annotating text instances with weak labels.
  • Student: a base model (e.g., a BERT-based classifier) that provides pseudo-labels as in standard self-training. In contrast to heuristic rules that cover a subset of the instances, the student can predict pseudo-labels for all instances.
  • RAN Teacher: our Rule Attention Teacher Network that aggregates the predictions of multiple weak sources (rules and student) with instance-specific weights to compute a single pseudo-label for each instance.

The following table reports classification results over 6 benchmark datasets averaged over multiple runs.

Method TREC SMS YouTube CENSUS MIT-R Spouse
Majority Voting 60.9 48.4 82.2 80.1 40.9 44.2
Snorkel 65.3 94.7 93.5 79.1 75.6 49.2
Classic Self-training 71.1 95.1 92.5 78.6 72.3 51.4
ASTRA 80.3 95.3 95.3 83.1 76.1 62.3

Our NAACL'21 paper describes our ASTRA framework and more experimental results in detail.

Installation

First, create a conda environment running Python 3.6:

conda create --name astra python=3.6
conda activate astra

Then, install the required dependencies:

pip install -r requirements.txt

Download Data

For reproducibility, you can directly download our pre-processed data files (split into multiple unlabeled/train/dev sets):

cd data
bash prepare_data.sh

The original datasets are available here.

Running ASTRA

To replicate our NAACL '21 experiments, you can directly run our bash script:

cd scripts
bash run_experiments.sh

The above script will run ASTRA and report results under a new "experiments" folder.

You can alternatively run ASTRA with custom arguments as:

cd astra
python main.py --dataset <DATASET> --student_name <STUDENT> --teacher_name <TEACHER>

Supported STUDENT models:

  1. logreg: Bag-of-words Logistic Regression classifier
  2. elmo: ELMO-based classifier
  3. bert: BERT-based classifier

Supported TEACHER models:

  1. ran: our Rule Attention Network (RAN)

We will soon add instructions for supporting custom datasets as well as student and teacher components.

Citation

@InProceedings{karamanolakis2021self-training,
author = {Karamanolakis, Giannis and Mukherjee, Subhabrata (Subho) and Zheng, Guoqing and Awadallah, Ahmed H.},
title = {Self-training with Weak Supervision},
booktitle = {NAACL 2021},
year = {2021},
month = {May},
publisher = {NAACL 2021},
url = {https://www.microsoft.com/en-us/research/publication/self-training-weak-supervision-astra/},
}

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].