Text Classification In The Wild: A Large-Scale Long-Tailed Name Normalization Dataset

Jiexing Qi, Shuhao Li, Zhixin Guo, Yusheng Huang, Chenghu Zhou, Weinan Zhang, Xinbing Wang, Zhouhan Lin

Introduction

In real-world Natural Language Processing (NLP) applications, data rarely follows the balanced distributions found in standard benchmarks. Instead, it is characterized by a "long tail," where a small number of categories appear frequently (the head) while a vast majority appear rarely (the tail). This phenomenon is particularly acute in Name Normalization—the task of mapping diverse, often messy strings (e.g., "Yale Univ," "Yale Medical School," or "Yale#N# University") to a single canonical entity like "Yale University."

While the Computer Vision community has long utilized robust benchmarks for long-tailed distributions, NLP has historically relied on balanced datasets or artificially thinned versions of them. This creates a significant gap: models optimized for clean, balanced data often fail when confronted with the typos, abbreviations, and rare classes found in academic publications or web-scale data. This paper introduces LoT-insts, a large-scale, naturally long-tailed dataset for institution name normalization, and proposes a character-level BERT architecture designed to handle the "noisy" reality of short-text classification.

The LoT-insts Dataset

Derived from the Microsoft Academic Graph (MAG), LoT-insts is the first large-scale dataset of its kind. Unlike existing long-tail datasets like ImageNet-LT, which are created by artificially sampling balanced data, LoT-insts reflects a natural distribution.

Dataset Scale and Structure

  • Scale: The dataset contains over 2.2 million training instances across more than 25,000 classes.
  • Subsets: To rigorously test generalization, the test set is divided into four categories based on class frequency in the training set:
  • Many-shot: >20 examples.
  • Medium-shot: 5–20 examples.
  • Few-shot: <5 examples.
  • Zero-shot: Classes entirely absent from the training set.

Research indicates that the natural distribution in LoT-insts differs significantly from the Pareto distribution typically used to synthesize long-tail data, suggesting that existing synthetic research may not fully capture the complexities of real-world NLP problems.

Methodology

The authors propose a multi-faceted approach to address the challenges of long-tailed name normalization, focusing on robustness to noise and generalization to rare classes.

1. Character-Level BERT

Standard NLP models like BERT use subword tokenization (WordPiece). While effective for standard prose, subwords often fail on the out-of-vocabulary (OOV) words, typos, and idiosyncratic abbreviations common in institution names. The authors developed a character-level BERT from scratch, pretrained specifically on institution names. This approach allows the model to remain robust against OCR errors and creative naming variations.

2. Structural Embeddings

To maintain structural awareness within the character-level framework, the model combines three types of embeddings:

  • Character embeddings
  • Character-position embeddings
  • Word-position embeddings

3. Resampling and Contrastive Learning

To prevent the model from being dominated by "head" classes (e.g., high-frequency institutions like Harvard or MIT), the researchers implemented a resampling strategy where the probability of selecting a class $j$ is $p_j \propto n_j^q$ (with $q < 1$).

Furthermore, for the Open-Set Verification (OSV) task—determining if two names belong to the same unseen class—they integrated a contrastive loss term. This pushes feature vectors of the same class together while pulling different ones apart, forcing the model to learn generalizable features of "institution-ness" rather than simply memorizing labels.

Experimental Results

Closed-Set Classification (CSC)

The proposed model significantly outperformed standard baselines on the CSC task. It achieved a Macro-F1 of 65.90, compared to 62.79 for the original subword-based BERT and 50.20 for Naive Bayes. The performance gap was most pronounced in the Few-shot subset, where the proposed model reached 49.36% accuracy, nearly 10 percentage points higher than standard BERT (40.99%).

Open-Set Verification (OSV)

On the task of verifying if two previously unseen names represent the same entity, the model achieved 79.79% accuracy. This result demonstrates that the combination of character-level modeling and contrastive loss effectively captures the underlying semantics of name variations, even for entities the model has never encountered during training.

Discussion and Future Work

A key insight from the study is the Head-Tail Trade-off. While the character-level model dominated in few-shot and medium-shot scenarios, it slightly lagged behind standard BERT on many-shot classes. This suggests a fundamental tension in long-tail learning: optimizing for the rare can sometimes degrade performance on the common.

Future research may explore hybrid architectures or routing mechanisms that can dynamically handle both ends of the distribution. While LoT-insts focuses on academic institutions, the "in the wild" methodology provides a blueprint for expanding long-tailed normalization research to other entities such as products, locations, and medical terms.

Summary updated

BibTeX
@inproceedings{qi2023text,
  author = {Jiexing Qi and Shuhao Li and Zhixin Guo and Yusheng Huang and Chenghu Zhou and Weinan Zhang and Xinbing Wang and Zhouhan Lin},
  title = {{Text Classification In The Wild: A Large-Scale Long-Tailed Name Normalization Dataset}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2023},
  doi = {10.1109/icassp49357.2023.10096769},
}
Figure