All Projects → lancopku → Label Embedding Network

lancopku / Label Embedding Network

Label Embedding Network

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Label Embedding Network

Tf Vqvae
Tensorflow Implementation of the paper [Neural Discrete Representation Learning](https://arxiv.org/abs/1711.00937) (VQ-VAE).
Stars: ✭ 226 (+227.54%)
Mutual labels:  mnist, cifar10
gans-2.0
Generative Adversarial Networks in TensorFlow 2.0
Stars: ✭ 76 (+10.14%)
Mutual labels:  mnist, cifar10
Nnpulearning
Non-negative Positive-Unlabeled (nnPU) and unbiased Positive-Unlabeled (uPU) learning reproductive code on MNIST and CIFAR10
Stars: ✭ 181 (+162.32%)
Mutual labels:  mnist, cifar10
Generative adversarial networks 101
Keras implementations of Generative Adversarial Networks. GANs, DCGAN, CGAN, CCGAN, WGAN and LSGAN models with MNIST and CIFAR-10 datasets.
Stars: ✭ 138 (+100%)
Mutual labels:  mnist, cifar10
Cifar-Autoencoder
A look at some simple autoencoders for the Cifar10 dataset, including a denoising autoencoder. Python code included.
Stars: ✭ 42 (-39.13%)
Mutual labels:  mnist, cifar10
image-defect-detection-based-on-CNN
TensorBasicModel
Stars: ✭ 17 (-75.36%)
Mutual labels:  mnist, cifar10
Awesome Tensorlayer
A curated list of dedicated resources and applications
Stars: ✭ 248 (+259.42%)
Mutual labels:  natural-language-processing, mnist
Randwire tensorflow
tensorflow implementation of Exploring Randomly Wired Neural Networks for Image Recognition
Stars: ✭ 29 (-57.97%)
Mutual labels:  mnist, cifar10
PFL-Non-IID
The origin of the Non-IID phenomenon is the personalization of users, who generate the Non-IID data. With Non-IID (Not Independent and Identically Distributed) issues existing in the federated learning setting, a myriad of approaches has been proposed to crack this hard nut. In contrast, the personalized federated learning may take the advantage…
Stars: ✭ 58 (-15.94%)
Mutual labels:  mnist, cifar10
deeplearning-mpo
Replace FC2, LeNet-5, VGG, Resnet, Densenet's full-connected layers with MPO
Stars: ✭ 26 (-62.32%)
Mutual labels:  mnist, cifar10
Theano Xnor Net
Theano implementation of XNOR-Net
Stars: ✭ 23 (-66.67%)
Mutual labels:  mnist, cifar10
Relativistic Average Gan Keras
The implementation of Relativistic average GAN with Keras
Stars: ✭ 36 (-47.83%)
Mutual labels:  mnist, cifar10
Emailparser
remove signature blocks from emails
Stars: ✭ 63 (-8.7%)
Mutual labels:  natural-language-processing
Deeplearning
Deep Learning From Scratch
Stars: ✭ 66 (-4.35%)
Mutual labels:  mnist
Repo 2017
Python codes in Machine Learning, NLP, Deep Learning and Reinforcement Learning with Keras and Theano
Stars: ✭ 1,123 (+1527.54%)
Mutual labels:  natural-language-processing
Tsne Cuda
GPU Accelerated t-SNE for CUDA with Python bindings
Stars: ✭ 1,120 (+1523.19%)
Mutual labels:  mnist
Touchdown
Cornell Touchdown natural language navigation and spatial reasoning dataset.
Stars: ✭ 69 (+0%)
Mutual labels:  natural-language-processing
Text Analytics With Python
Learn how to process, classify, cluster, summarize, understand syntax, semantics and sentiment of text data with the power of Python! This repository contains code and datasets used in my book, "Text Analytics with Python" published by Apress/Springer.
Stars: ✭ 1,132 (+1540.58%)
Mutual labels:  natural-language-processing
Emnlp2018 nli
Repository for NLI models (EMNLP 2018)
Stars: ✭ 62 (-10.14%)
Mutual labels:  natural-language-processing
Slate
A Super-Lightweight Annotation Tool for Experts: Label text in a terminal with just Python
Stars: ✭ 61 (-11.59%)
Mutual labels:  natural-language-processing

Label Embedding Network

This is an implementation of the paper Label Embedding Network: Learning Label Representation for Soft Training of Deep Networks https://arxiv.org/abs/1710.10393.

Label Embedding Network can learn label representation (label embedding) during the training process of deep networks. With the proposed method, the label embedding is adaptively and automatically learned through back propagation. The original one-hot represented loss function is converted into a new loss function with soft distributions, such that the originally unrelated labels have continuous interactions with each other during the training process. As a result, the trained model can achieve substantially higher accuracy and with faster convergence speed. Experimental results based on competitive tasks demonstrate the effectiveness of the proposed method, and the learned label embedding is reasonable and interpretable. The proposed method achieves comparable or even better results than the state-of-the-art systems.

The contributions of this work are as follows:
Learning label embedding and compressed embedding: We propose the Label Embedding Network that can learn label representation for soft training of deep networks. Furthermore, some large-scale tasks have a massive number of labels, and a naive version of label embedding network will suffer from intractable memory cost problem. We propose a solution to automatically learn compressed label embedding, such that the memory cost is substantially reduced.

Interpretable and reusable: The learned label embeddings are reasonable and interpretable, such that we can find meaningful similarities among the labels. The proposed method can learn interpretable label embeddings on both image processing tasks and natural language processing tasks. In addition, the learned label embeddings can be directly adapted for training a new model with improved accuracy and convergence speed.

General-purpose solution and competitive results: The proposed method can be widely applied to various models, including CNN, ResNet, and Seq-to-Seq models. We conducted experiments on computer vision tasks including CIFAR-100, CIFAR-10, and MNIST, and on natural language processing tasks including LCSTS text summarization task and IWSLT2015 machine translation task. Results suggest that the proposed method achieves significantly better accuracy than the existing methods (CNN, ResNet, and Seq-to-Seq). We achieve results comparable or even better than the state-of-the-art systems on those tasks.


bibtex:

@article{LabelEmb,
author = {Xu Sun and Bingzhen Wei and Xuancheng Ren and Shuming Ma},
title = {Label Embedding Network: Learning Label Representation for Soft Training of Deep Networks},
journal = {CoRR},
volume = {abs/1710.10393},
year = {2017}
}

DataSet

CIFAR100: Download
CIFAR10: Download
MNIST: Download
LCSTS: Download
IWSLT2015: Download


Environment and Dependency

  • Ubuntu 16.04
  • Python 3.5
  • Tensorflow 1.3 (for MNIST)
  • Pytorch 0.2.0 (for other tasks)

Training for Computer Vision Tasks

You can change the training mode by setting the parameter "mode", as the mode=baseline means the baseline models(CNN, ResNet-8 or ResNet-18) and the mode=emb means our proposed label embedding network. There are also some other super parameters, see the codes for more details.

CIFAR-100

python3 resnet18.py --mode=baseline
python3 resnet18.py --mode=emb
The outputs will be in ./100_results

CIFAR-10

python3 resnet8.py --mode=baseline
python3 resnet8.py --mode=emb
The outputs will be in ./10_results

MNIST

python3 cnn.py --mode=baseline
python3 cnn.py --mode=emb
The outputs will be in ./cnn_results
python3 mlp.py --mode=baseline
python3 mlp.py --mode=emb
The outputs will be in ./mlp_results



Training for Natural Language Processing Tasks

LCSTS (Text Summarization)

python3 preprocess.py -train_src TRAIN_SRC_DATA -train_tgt TRAIN_TGT_DATA
		      -test_src TEST_SRC_DATA -test_tgt TEST_TGT_DATA
		      -valid_src VALID_SRC_DATA -valid_tgt VALID_TGT_DATA
		      -save_data data/lcsts/lcsts.low.share.train.pt
		      -lower -share
python3 train.py -gpus 0 -config lcsts.yaml -unk -score emb -loss emb -log label_embedding
python3 predict.py -gpus 0 -config lcsts.yaml -unk -score emb -restore data/lcsts/label_embedding/best_rouge_checkpoint.pt

IWSLT2015 (English-Vietnamese Machine Translation)

python3 preprocess.py -train_src TRAIN_SRC_DATA -train_tgt TRAIN_TGT_DATA
		      -test_src TEST_SRC_DATA -test_tgt TEST_TGT_DATA
		      -valid_src VALID_SRC_DATA -valid_tgt VALID_TGT_DATA
		      -save_data data/iwslt15/iwslt.low.train.pt
		      -lower
python3 train.py -gpus 0 -config iwslt.yaml -unk -score emb -loss emb -log label_embedding
python3 predict.py -gpus 0 -config iwslt.yaml -unk -score emb -restore data/lcsts/label_embedding/best_bleu_checkpoint.pt

Results for Computer Vision Tasks

Results of Label Embedding on computer vision:

cv_tab.png

Error rate curve for CIFAR-100, CIFAR-10, and MNSIT. 20 times experiments (the light color curves) are conducted for credible results both on the baseline and our proposed model. The average results are shown as deep color curves:

cv_fig.png

Heatmaps generated by the label embeddings:

cv_heatmap.png


Results for Natural Language Processing Tasks

Results of Label Embedding for LCSTS: lcsts_tab.png

Results of Label Embedding for IWSLT2015: iwslt_tab.png

Examples of the similarity results on IWSLT2015: iwslt_heatmap.png

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].