A Survey And Practice Of Neural-network-based Textual .

2y ago
30 Views
2 Downloads
3.51 MB
88 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Raelyn Goode
Transcription

A survey and practice ofNeural-network-basedTextual iuDepartment of Social Network Operation,Social Network Group,TencentWang B, Wang L, Wei Q, Wang Y, Liu L. TextZoo, a New Benchmark for Reconsidering Text Classification[J]. arXiv preprint arXiv:1802.03656, 2018.

welcome for any issues and contributions !!!

3256linesfind . -name "*.py" -print xargs wc -l

TextZOOA new Benchmark to Reconsidering TextClassificationWang B, Wang L, Wei Q, Wang Y, Liu L. TextZoo, a New Benchmark for Reconsidering Text Classification[J]. arXiv preprint arXiv:1802.03656, 2018.

Can not do Can not directly deploy online Implementing is easy, while design is what really challenging Can not tell you the precise hyper-parameter of your task A fish or a fishing skill? Can not ensure to improve your performance It depends on the scale of your supervised data

Highly depends on your data and task NLP features extraction Model TFIDF is enough strong, e.s. long text A Few pretrained Model CV features extraction SIFT or SIFT-like is not very strong. pretrained ResNet from ImageNet Glove/Word2vec only for initialization No common-known CN embedding No pretrained ModelZero-shot learning can hardly works in NLP, currently

Can do Easy to implement a model after talking Talking is cheap, 10 lines a model. Directly support all the public dataset Testing model Know how to design a DL model for NLP, not only text classification A fishing skill

Contents Brief Introduction of TextZoo Why text classification? General Overview of Text Classification Overview of Text Classification in Neural Network approach. Architecture of TextZoo Conclusions

Contents Brief Introduction of TextZoo Why text classification? General Overview of Text Classification Overview of Text Classification in Neural Network approach. Architecture of TextZoo Conclusions

TextZoo Text Classification SentimentalTopicSpam filter A benchmark 20 Dataset 20 Models PyTorch Life is short, I use PyTorch(Python)

Models FasText CNN (Kim CNN, Multi-Layer CNN, Multi-perspective CNN, Inception CNN) LSTM (BILSTM, StackLSTM, LSTM with Attention ) Hybrids between CNN and RNN (RCNN, C-LSTM) Attention (Self Attention / Quantum Attention) Transformer - Attention is all you need Capsule Quantum-inspired NN ConS2S Memory Network

Datasets IMDB MR CR MPQA SST1 SST2 Subj TREC

Contents Brief Introduction of TextZoo Why text classification? General Overview of Text Classification Overview of Text Classification in Neural Network approach. Architecture of TextZoo Conclusions

Supervised tasks in NLP

Why text classification?Text ication

Why text classification?Text icationMatchingText RepresentationTextMLP/CNN/RNNrepresentation

Why text classification?Text /RNNclassificationText

Why text classification?Text RepresentationToken 1RNN cellrepresentationclassificationToken 2RNN cellrepresentationclassificationToken 3RNN cellrepresentationclassification

Examples for COw

Fundamental Demo In Code with PyTorch pseudo code Model LSTM/CNN/Capsule/ text,lable Dataset.nextBatch() representation Model(text) Classification FC(representation)FC : Mapping to label size Translation Decode(representation) Matching Cosine(representation1, representation2) Sequential labelling FCs(representations )

Contents Brief Introduction of TextZoo Why text classification? General Overview of Text Classification Overview of Text Classification in Neural Network approach. Architecture of TextZoo Conclusions

Overview Traditional Models Naïve Bayes SVM DL Models ?CNN ?RNN ?NN

Traditional Classification SVM/Naïve Bayes Bag-of-words(N-gram) hypothesis Features : TFIDF (unigram, N-gram)POS, parserhypernyms, WordNethand-coded rules May needs “feature selection” Good performance in long textIt performs better than you expected !!

Contents Brief Introduction of TextZoo Why text classification? General Overview of Text Classification Overview of Text Classification in Neural Network approach. Architecture of TextZoo Conclusions

Embedding and further DL modelsDistributional hypothesislinguistic items with similar distributions have similar al semantics

Localist representationSize color unknown BMW [1, 0, 0, 0, 0][.3, .7, .2, .1, .5] Audi[.5, .3, .2, .1, .0][0, 0, 0, 1, 0] Benz [0, 0, 1, 0, 0][.2, .0, .31, .03, .01] Polo [0, 0, 0, 1, 0][.1, .1, .5, .5, 0.2]http://www.cs.toronto.edu/ bonner/courses/2014s/csc321/lectures/lec5.pdf

Distributed representationSize color unknown BMW [1, 0, 0, 0, 0][.3, .7, .2, .1, .5] Audi[.5, .3, .2, .1, .0][0, 0, 0, 1, 0] Benz [0, 0, 1, 0, 0][.2, .0, .31, .03, .01] Polo [0, 0, 0, 1, 0][.1, .1, .5, .5, 0.2]

How to get Distributed representation Matrix Factorization Word-word Matrix Document-word Matrix PLSA LDA Sample-based Prediction NNLM C&W Word2vecGlove is a combination between these two schools of approachesLevy, Omer, and Yoav Goldberg. "Neural word embedding as implicit matrix factorization." Advances in neural information processing systems. 2014.

Why embedding is so hot? Only automatically build supervised pairs in unsupervised corpus Life is complex. It has both real and imaginary parts

NNLM

C&W

Word2Vec

State-of-art Embedding Word2Vec Glove Many and many improved version of word embedding Improved Word Representation Learning with Sememes“Polysemy problem”“Antonym problem”Complex embedding [We are interested, now] life is complex, it has both real and imaginary parts

Which is the most similar word of “Tencent” ?May be “Baidu” or “pony” ?Nie Jianyun said in SIGIR 2016 Chinese-Author Workshop, Tsinghua University, Beijing

Attention!!!Average Embedding may be a problematic practicefor textual representation, especially in long text.Should add some supervised signals after embedding to reduce the noise !, like FastextZhang, Xiang, Junbo Zhao, and Yann LeCun. "Character-level convolutional networks for text classification." Advances in neural information processing systems. 2015.

Embedding is everywhere!!! Word2vec Doc2vec Item2vec Everything can be embed!!Embedding is a kind of approach, while word vector is a typical application of embeddingWu, Ledell, et al. "StarSpace: Embed All The Things!." arXiv preprint arXiv:1709.03856 (2017).

How to choose Word Vector Word2vec or Glove Depends on you final performance, not a prior test in linguistic/syntax regulation Embedding dim, depends on scale of training dataset. Larger dataset, bigger dimension, but overfitting. If possible, train the embedding on own your data.Topic-relevant is somehow more important than the data size

More features in DL POS Embedding CCG Embedding Extract matching Embedding Position Embedding Embed Every discrete features in Neural Network If it is continuous, bucket it and make it discrete.

MLP

UAT in MLPMulti-layer Non-linear Mapping - Universal Approximation Theorem

A sample of 𝜃(wx tml

An another sample

CNN Basic CNN Kalchbrenner N, Grefenstette E, Blunsom P. A convolutional neuralnetwork for modelling sentences[J]. arXiv preprint arXiv:1404.2188,2014 Kim CNN VDCNN

CNN [Kalchbrenner. et.al ACL 2014]

CNN [kim EMNLP 2014]

FASTEX [EACL 2017]

Why Mr. Lace chooses FasText Fast Input may a set of keywords instead of a sequential of words (Group name) Label may be inaccurate Build more hand-code features would get comparable results

Very Large CNN [Conneau EACL ]

Go deeper or not? DEEP Slower Overfitting More Parameters, more data need to feed Hard for convergence Highway network Residual Block Inception Shallow: one-layer Fast Less data, es. Fastext.

Go deeper or not?

RNN and its Variant RNN LSTM LSTM mean LSTM bidirectional LSTM Attention LSTM Stack LSTM Self-Attention TreeLSTM

Bias in RNN

Bias in RNN

From RNN to ding-LSTMs/

LSTM How many gates ? Difference between cell and the hidden state? How many parameters in a LSTM?

Forget gate

Input gatereplace tanh with softsign (not softmax) activation for prevent overfittinghttps://zhuanlan.zhihu.com/p/21952042

Forgotten input

Output Gate

LSTM Variants: Peephole connections

LSTM Variants: coupled forget and input gates

LSTM Variants: GRU Hidden Cell Forget gate input gate 1

BiLSTM

Last or Mean?

RNN/LSTM with Attentionhttps://www.jianshu.com/p/4fbc4939509f

Visualization of Attention in RNN/LSTMMachine TranslationImage Caption

Visualization of Attention in RNN/LSTMSematic EntailmentSpeech Recognition

Deeper LSTM

Deeper LSTMDeep is not necessary, but more data!!!

CNN/RNN Comparative Study of CNN and RNN for Natural Language Processing

RNN vs CNN

CNN vs RNN vs their ls/78013352Dimensional Sentiment Analysis Using a Regional CNN-LSTM Model

From a Industrial perspective Add features. Understanding your data : pay more attention on data preparation. Parameter adjusting with a robust setting Oh, overfit Model is not very important, especially data is not low-quality. Models differs slightly in low-quality data. Trade-off between performance and efficiency For example, multi-size kennels is better but slower!

Related Models Do not directly aims at this task, but also aims to build a textrepresentation. ConvS2S Attention is all you need Dynamic Memory Network

Conv S2S

Attention is all you need

Self-Attention

Dynamic Memory Network

Other models Tree-LSTM Pointer networks Bi-Directional Block Self-Attention for Fast and Memory-EfficientSequence Modeling (T. Shen et al., ICLR 2018) Directional Self-Attention Network Recurrent Entity Network

Char-CNNZhang, Xiang, Junbo Zhao, and Yann LeCun. "Character-level convolutional networks for text classification." Advances in neural information processing systems. 2015.

Component-EnhancedComponent-Enhanced Yanran Li, Wenjie Li, Fei Sun, and Sujian Li. Component-Enhanced Chinese Character Embeddings.Proceedings of EMNLP, 201

Char-word HybridsCombining Word-Level and Character-Level Representations for Relation Classification ofInformal Text

Long text/document classification Hierarchical Attention Networks(HAN)

Multi-task LearningPengfei Liu, Xipeng Qiu, Xuanjing Huang, Deep Multi-Task Learning with Shared Memory for Text Classification, In Proceedings of the 2016 Conference onEmpirical Methods in Natural Language Processing (EMNLP), 2016.

Adversarial Multi-task LearningPengfei Liu, Xipeng Qiu, Xuanjing Huang, Adversarial Multi-task Learning for Text Classification, In Proceedings of the 55th AnnualMeeting of the Association for Computational Linguistics (ACL), pp. 1-10, 2017.

RL for text classfication Learning Structured Representation for Text Classification viaReinforcement Learning AAAI 2018 minlieHuang

Adversarial Training Methods For Semisupervised Text Classification ICLR 2017

To-do List Support more datasets, especially in Chinese Support more models Fine-tune the result. Installable Library with Python (Pip)

From a Industrial perspective Add features. Understanding your data : pay more attention on data preparation. Parameter adjusting with a robust setting Oh, overfit Model is not very important, especially data is not low-quality. Models differs slightly in low-quality data. Trade-off between performance and efficien

Related Documents:

Survey as a health service research method Study designs & surveys Survey sampling strategies Survey errors Survey modes/techniques . Part II (preliminary) Design and implementation of survey tools Survey planning and monitoring Analyzing survey da

1. A recruitment survey (public survey) will be used to recruit subjects in the study. Public survey link. 2. If a participant agrees to participate, a demographic survey (private survey) will be sent to the participant to fill out. Automatic survey invitation. 3. Based on the answer in the demographic survey, the

new survey. Select one of those options to apply to your new survey form. 1)Create a new survey from scratch - will create a blank survey form that you can use to add your own questions 2)Copy an existing survey - can be used to create a copy of a survey form you have already created 3)Use a Survey Template - will allow you to select

Collectively make tawbah to Allāh S so that you may acquire falāḥ [of this world and the Hereafter]. (24:31) The one who repents also becomes the beloved of Allāh S, Âَْ Èِﺑاﻮَّﺘﻟاَّﺐُّ ßُِ çﻪَّٰﻠﻟانَّاِ Verily, Allāh S loves those who are most repenting. (2:22

akuntansi musyarakah (sak no 106) Ayat tentang Musyarakah (Q.S. 39; 29) لًََّز ãَ åِاَ óِ îَخظَْ ó Þَْ ë Þٍجُزَِ ß ا äًَّ àَط لًَّجُرَ íَ åَ îظُِ Ûاَش

AP Biology Practice Tests 2 2020 2020 Practice Tests . AP Calculus AB Practice Tests ; 2 2020 . 2020 . Practice Tests . AP Calculus BC Practice Tests 2 2020 2020 . Practice Tests . AP Chemistry Practice Tests . 2 2020 . 2020 : Practice Tests AP Computer Science 2 2019 2020 Practice Tests . AP English Language and Composition Practice Tests : 2 2020

Section III – Conducting an Employee Satisfaction Survey 8 Steps in Process 9 Survey Design/Construction 11 Packaging and Layout of Survey 14 Section IV – Employee Satisfaction Survey Template 15 Section V – Employee Satisfaction Survey Report Template 21 Processing Survey Responses 22 Survey Report Content 24 Example 1 25

2009 Ohio E-Check Customer Satisfaction Survey 7 Voinovich School of Leadership and Public Affairs at Ohio University How the Survey Was Conducted Survey Instrument The 2009 survey was the same as the 2008 Ohio E-Check Customer Satisfaction Survey. For 2008, several changes were made to the survey instrument. These changes included;