Character-level Convolutional Networks for Text Classification
Written for the Research library (claude-opus-5-5) from the paper text, in our own words: the license "arXiv — non-exclusive licence to distribute" does not allow redistributing the text itself. Original — arxiv.org/pdf/1509.01626
Summary
Most text classifiers of the time worked on words or word n-grams. This paper asks whether a deep convolutional network can classify documents when it sees only raw characters, with no tokenization and no knowledge of words, syntax or semantics. Each character is one-hot encoded over a fixed 70-symbol alphabet, and documents are cut to 1014 characters. A 9-layer temporal ConvNet then processes the input: 6 convolutional layers followed by 3 fully-connected layers, in a large and a small version. ConvNets need a lot of training data, so the authors built several large datasets covering news topics, ontology categories, Q&A topics and review sentiment. They compared the model with bag-of-words, n-gram and TFIDF baselines, with word-based ConvNets and with an LSTM. The character-level model was competitive or best on the million-sample datasets. Classic n-gram TFIDF still won on smaller ones. The work matters because it showed that text can be treated as a raw signal. That could make one system usable across languages and robust to noisy user-generated text.
Key points
- New benchmark datasets: AG News, Sogou News, DBPedia, Yelp Review (Polarity/Full), Yahoo! Answers and Amazon Review (Full/Polarity). Amazon Polarity has 1.8M training samples per class.
- Architecture: 70-character alphabet, input length 1014, 6 conv layers (1024 features in the large model, 256 in the small) and 3 FC layers with dropout 0.5. Temporal max-pooling made networks deeper than 6 layers trainable.
- Data augmentation replaces words with synonyms from a WordNet-derived thesaurus (LibreOffice mytheas). The number of replacements and the synonym chosen are both drawn from geometric distributions with p = q = 0.5.
- Dataset size decides the winner. n-gram TFIDF stays strong up to a few hundred thousand samples, and the character-level ConvNet pulls ahead at millions of samples. It also does relatively well on less-curated texts such as Amazon reviews.
- Treating upper- and lower-case letters as the same often helped on large datasets. Bag-of-means over word2vec clusters was the weakest model in every comparison.
Cited by
- Intrinsic Dimensionality Explains the Effectiveness of Language Model Fine-Tuning
- Muppet: Massive Multi-task Representations with Pre-Finetuning
- Adapting Pre-trained Language Models to African Languages via Multilingual Adaptive Fine-Tuning
- Adapting Language Models to Compress Contexts
- Representations and Architectures in Neural Sentiment Analysis for Morphologically Rich Languages: A Case Study from Modern Hebrew
- RLPrompt: Optimizing Discrete Text Prompts with Reinforcement Learning
- Toxicity in chatgpt: Analyzing persona-assigned language models
- A Survey on In-context Learning
- A Survey of Data Augmentation Approaches for NLP
- Black-box Generation of Adversarial Text Sequences to Evade Deep Learning Classifiers
- Time Travel in LLMs: Tracing Data Contamination in Large Language Models
- PPT: Pre-trained Prompt Tuning for Few-shot Learning
- Surface Form Competition: Why the Highest Probability Answer Isn't Always Right
- Editing Models with Task Arithmetic
- Attention is not Explanation
- FastText.zip: Compressing text classification models
- Character-Aware Neural Language Models
- Contextual Augmentation: Data Augmentation by Words with Paradigmatic Relations
- GeDi: Generative Discriminator Guided Sequence Generation
- Submodular Optimization-based Diverse Paraphrasing and its Effectiveness in Data Augmentation
- Fully Character-Level Neural Machine Translation without Explicit Segmentation
- TextBugger: Generating Adversarial Text Against Real-world Applications
- BERT-ATTACK: Adversarial Attack Against BERT Using BERT
- Synthetic Data Generation with Large Language Models for Text Classification: Potential and Limitations
- On LLMs-Driven Synthetic Data Generation, Curation, and Evaluation: A Survey
- Fantastically Ordered Prompts and Where to Find Them: Overcoming Few-Shot Prompt Order Sensitivity
- Achieving Open Vocabulary Neural Machine Translation with Hybrid Word-Character Models
- Noisy Channel Language Model Prompting for Few-Shot Text Classification
- Adversarial Training Methods for Semi-Supervised Text Classification
- Generative Representational Instruction Tuning
- Multilingual Part-of-Speech Tagging with Bidirectional Long Short-Term Memory Models and Auxiliary Loss
- Mind the Style of Text! Adversarial and Backdoor Attacks Based on Text Style Transfer
- Learning to Generate Reviews and Discovering Sentiment
- A Recipe For Arbitrary Text Style Transfer with Large Language Models
- Generating Natural Language Adversarial Examples through Probability Weighted Word Saliency
- Leveraging Large Language Models for Multiple Choice Question Answering
- Multitask Prompted Training Enables Zero-Shot Task Generalization
- CARER: Contextualized Affect Representations for Emotion Recognition
- Exploiting Cloze-Questions for Few-Shot Text Classification and Natural Language Inference
- Is Attention Interpretable?
- One Embedder, Any Task: Instruction-Finetuned Text Embeddings
- How to Fine-Tune BERT for Text Classification?
- UL2: Unifying Language Learning Paradigms
- Aya Model: An Instruction Finetuned Open-Access Multilingual Language Model
- SPoT: Better Frozen Model Adaptation through Soft Prompt Transfer
- ``Liar, Liar Pants on Fire'': A New Benchmark Dataset for Fake News Detection
- Want To Reduce Labeling Cost? GPT-3 Can Help
- Label Words are Anchors: An Information Flow Perspective for Understanding In-Context Learning
- EDA: Easy Data Augmentation Techniques for Boosting Performance on Text Classification Tasks
- Unsupervised Data Augmentation for Consistency Training
- Hierarchical Attention Networks for Document Classification
- XLNet: Generalized Autoregressive Pretraining for Language Understanding
- Benchmarking Zero-shot Text Classification: Datasets, Evaluation and Entailment Approach
- GPT3Mix: Leveraging Large-scale Language Models for Text Augmentation
- QANet: Combining Local Convolution with Global Self-Attention for Reading Comprehension
- Large Language Model as Attributed Training Data Generator: A Tale of Diversity and Bias
- Big Bird: Transformers for Longer Sequences
- Active Example Selection for In-Context Learning
- Sentiment Analysis in the Era of Large Language Models: A Reality Check
- Calibrate Before Use: Improving Few-Shot Performance of Language Models
Cite
@misc{zhang2015character,
title = {{Character-level Convolutional Networks for Text Classification}},
author = {Zhang, Xiang and Zhao, Junbo and LeCun, Yann},
year = {2015},
doi = {10.48550/arxiv.1509.01626},
eprint = {1509.01626},
archivePrefix = {arXiv},
url = {https://doi.org/10.48550/arxiv.1509.01626}
}References
- L. Bottou, F. Fogelman Soulié, P. Blanchet, and J. Lienard. Experiments with time delay networks and dynamic time warping for speaker independent isolated digit recognition. In Proceedings of EuroSpeech 89, volume 2, pages 537–540, Paris, France, 1989. find
- Y.-L. Boureau, F. Bach, Y. LeCun, and J. Ponce. Learning mid-level features for recognition. In Computer Vision and Pattern Recognition (CVPR), 2010 IEEE Conference on, pages 2559–2566. IEEE, 2010. find
- Y.-L. Boureau, J. Ponce, and Y. LeCun. A theoretical analysis of feature pooling in visual recognition. In Proceedings of the 27th International Conference on Machine Learning (ICML-10), pages 111–118, 2010. find
- R. Collobert, K. Kavukcuoglu, and C. Farabet. Torch7: A matlab-like environment for machine learning. In BigLearn, NIPS Workshop, number EPFL-CONF-192376, 2011. find
- R. Collobert, J. Weston, L. Bottou, M. Karlen, K. Kavukcuoglu, and P. Kuksa. Natural language processing (almost) from scratch. J. Mach. Learn. Res., 12:2493–2537, Nov. 2011. find our card
- C. dos Santos and M. Gatti. Deep convolutional neural networks for sentiment analysis of short texts. In Proceedings of COLING 2014, the 25th International Conference on Computational Linguistics: Technical Papers, pages 69–78, Dublin, Ireland, August 2014. Dublin City University and Association for… find
- C. Fellbaum. Wordnet and wordnets. In K. Brown, editor, Encyclopedia of Language and Linguistics, pages 665–670, Oxford, 2005. Elsevier. find
- A. Graves and J. Schmidhuber. Framewise phoneme classification with bidirectional lstm and other neural network architectures. Neural Networks, 18(5):602–610, 2005. find
- K. Greff, R. K. Srivastava, J. Koutnı́k, B. R. Steunebrink, and J. Schmidhuber. LSTM: A search space odyssey. CoRR, abs/1503.04069, 2015. find
- G. E. Hinton, N. Srivastava, A. Krizhevsky, I. Sutskever, and R. R. Salakhutdinov. Improving neural networks by preventing co-adaptation of feature detectors. arXiv preprint arXiv:1207.0580, 2012. find
- S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural Comput., 9(8):1735–1780, Nov. 1997. find
- T. Joachims. Text categorization with suport vector machines: Learning with many relevant features. In Proceedings of the 10th European Conference on Machine Learning, pages 137–142. Springer-Verlag, 1998. find
- R. Johnson and T. Zhang. Effective use of word order for text categorization with convolutional neural networks. CoRR, abs/1412.1058, 2014. find
- K. S. Jones. A statistical interpretation of term specificity and its application in retrieval. Journal of Documentation, 28(1):11–21, 1972. find
- I. Kanaris, K. Kanaris, I. Houvardas, and E. Stamatatos. Words versus character n-grams for anti-spam filtering. International Journal on Artificial Intelligence Tools, 16(06):1047–1067, 2007. find
- Y. Kim. Convolutional neural networks for sentence classification. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1746–1751, Doha, Qatar, October 2014. Association for Computational Linguistics. find our card
- Y. LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. Hubbard, and L. D. Jackel. Backpropagation applied to handwritten zip code recognition. Neural Computation, 1(4):541–551, Winter 1989. find
- Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, November 1998. find
- J. Lehmann, R. Isele, M. Jakob, A. Jentzsch, D. Kontokostas, P. N. Mendes, S. Hellmann, M. Morsey, P. van Kleef, S. Auer, and C. Bizer. DBpedia - a large-scale, multilingual knowledge base extracted from wikipedia. Semantic Web Journal, 2014. find
- G. Lev, B. Klein, and L. Wolf. In defense of word embedding for generic text representation. In C. Biemann, S. Handschuh, A. Freitas, F. Meziane, and E. Mtais, editors, Natural Language Processing and Information Systems, volume 9103 of Lecture Notes in Computer Science, pages 35–50. Springer Intern… find
- D. D. Lewis, Y. Yang, T. G. Rose, and F. Li. Rcv1: A new benchmark collection for text categorization research. The Journal of Machine Learning Research, 5:361–397, 2004. find our card
- J. McAuley and J. Leskovec. Hidden factors and hidden topics: Understanding rating dimensions with review text. In Proceedings of the 7th ACM Conference on Recommender Systems, RecSys ’13, pages 165–172, New York, NY, USA, 2013. ACM. find
- T. Mikolov, I. Sutskever, K. Chen, G. S. Corrado, and J. Dean. Distributed representations of words and phrases and their compositionality. In C. Burges, L. Bottou, M. Welling, Z. Ghahramani, and K. Weinberger, editors, Advances in Neural Information Processing Systems 26, pages 3111–3119. 2013. find
- V. Nair and G. E. Hinton. Rectified linear units improve restricted boltzmann machines. In Proceedings of the 27th International Conference on Machine Learning (ICML-10), pages 807–814, 2010. find
- R. Pascanu, T. Mikolov, and Y. Bengio. On the difficulty of training recurrent neural networks. In ICML 2013, volume 28 of JMLR Proceedings, pages 1310–1318. JMLR.org, 2013. find
- B. Polyak. Some methods of speeding up the convergence of iteration methods. {USSR} Computational Mathematics and Mathematical Physics, 4(5):1 – 17, 1964. find
- D. Rumelhart, G. Hintont, and R. Williams. Learning representations by back-propagating errors. Nature, 323(6088):533–536, 1986. find
- C. D. Santos and B. Zadrozny. Learning character-level representations for part-of-speech tagging. In Proceedings of the 31st International Conference on Machine Learning (ICML-14), pages 1818–1826, 2014. find
- Y. Shen, X. He, J. Gao, L. Deng, and G. Mesnil. A latent semantic model with convolutional-pooling structure for information retrieval. In Proceedings of the 23rd ACM International Conference on Conference on Information and Knowledge Management, pages 101–110. ACM, 2014. find
- I. Sutskever, J. Martens, G. E. Dahl, and G. E. Hinton. On the importance of initialization and momentum in deep learning. In S. Dasgupta and D. Mcallester, editors, Proceedings of the 30th International Conference on Machine Learning (ICML-13), volume 28, pages 1139–1147. JMLR Workshop and Conferen… find
- A. Waibel, T. Hanazawa, G. Hinton, K. Shikano, and K. J. Lang. Phoneme recognition using time-delay neural networks. Acoustics, Speech and Signal Processing, IEEE Transactions on, 37(3):328–339, 1989. find
- C. Wang, M. Zhang, S. Ma, and L. Ru. Automatic online news issue construction in web environment. In Proceedings of the 17th International Conference on World Wide Web, WWW ’08, pages 457–466, New York, NY, USA, 2008. ACM. find