# Categorical Metadata Representation for Customized Text Classification

arXiv: https://arxiv.org/abs/1902.05196 · HTML: https://mlsanity.com/paper/1902.05196/

## Key facts

- Cited by 7 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 14 Feb 2019.

## Built on by (most cited first, 7 of 7)

- [MATCH: Metadata-Aware Text Classification in A Large Hierarchy](https://mlsanity.com/paper/2102.07349/) (2021)
- [Metadata-Induced Contrastive Learning for Zero-Shot Multi-Label Text Classification](https://mlsanity.com/paper/2202.05932/) (2022)
- [MotifClass: Weakly Supervised Text Classification with Higher-order Metadata Information](https://mlsanity.com/paper/2111.04022/) (2021)
- [Detecting Sexual Content at the Sentence Level in First Millennium Latin Texts](https://mlsanity.com/paper/2309.14974/) (2023)
- [Metadata Integration for Spam Reviews Detection on Vietnamese E-commerce Websites](https://mlsanity.com/paper/2405.13292/) (2024)
- [Efficient Attribute Injection for Pretrained Language Models](https://mlsanity.com/paper/2109.07953/) (2021)
- [Recurrent Neural Networks with Mixed Hierarchical Structures and EM Algorithm for Natural Language Processing](https://mlsanity.com/paper/2201.08919/) (2022)

## Abstract (arXiv)

The performance of text classification has improved tremendously using intelligently engineered neural-based models, especially those injecting categorical metadata as additional information, e.g., using user/product information for sentiment classification. These information have been used to modify parts of the model (e.g., word embeddings, attention mechanisms) such that results can be customized according to the metadata. We observe that current representation methods for categorical metadata, which are devised for human consumption, are not as effective as claimed in popular classification methods, outperformed even by simple concatenation of categorical features in the final layer of the sentence encoder. We conjecture that categorical features are harder to represent for machine use, as available context only indirectly describes the category, and even such context is often scarce (for tail category). To this end, we propose to use basis vectors to effectively incorporate categorical metadata on various parts of a neural-based model. This additionally decreases the number of parameters dramatically, especially when the number of categorical features is large. Extensive experiments on various datasets with different properties are performed and show that through our method, we can represent categorical metadata more effectively to customize parts of the model, including unexplored ones, and increase the performance of the model greatly.
