Recall, Expand and Multi-Candidate Cross-Encode: Fast and Accurate Ultra-Fine Entity Typing

Chengyue Jiang, Wenyang Hui, Yong Jiang, Xiaobin Wang, Pengjun Xie, Kewei TuarXiv 2022 · DOI

Abstract

Ultra-Fine Entity Typing (UFET) involves assigning highly specific labels from a vocabulary of over 10,000 types to entity mentions in text. Current approaches typically face a trade-off between the speed of Multi-label Classification (MLC) and the accuracy of Cross-Encoders (CE). We introduce a novel "recall-expand-filter" framework that bridges this gap. By combining a rapid initial search with a Multi-Candidate Cross-Encoder (MCCE), our system achieves state-of-the-art accuracy while operating thousands of times faster than previous top-tier models. On the UFET benchmark, our model achieves a Macro-F1 score of 52.1 and processes approximately 60 sentences per second on a single GPU.

Introduction

Ultra-Fine Entity Typing (UFET) extends traditional entity typing by using a massive, open-ended set of labels. For instance, the entity "Joe Biden" might be labeled not just as a "Person," but as a "president," "politician," and "author." The primary challenge in UFET is the scale of the label space, often exceeding 10,000 types.

Existing methodologies face a significant trade-off. Multi-label Classification (MLC) models are efficient but lack the deep semantic interaction between entity context and type definitions necessary for high accuracy. Conversely, Cross-Encoders (CE) provide superior accuracy by jointly encoding the mention and the type, but they require a separate inference pass for every possible type, making them impractical for large-scale vocabularies.

Comparison of MLC, CE, and the proposed MCCE across key performance dimensions.

The Recall-Expand-Filter Framework

To address these limitations, we propose a three-stage pipeline designed to maintain high recall while ensuring efficient filtering.

  1. Recall Stage: A fast MLC model is employed to quickly narrow the 10,000+ types down to a manageable shortlist of the top $K$ candidates (typically 100-200).
  2. Expand Stage: To account for rare or "unseen" types that MLC models might miss, we utilize Exact Matching and Masked Language Modeling (MLM). The MLM component uses prompts like "[Entity] such as [MASK]" to leverage the internal knowledge of models like BERT to suggest additional likely types.
  3. Filter Stage: The core of our approach is the Multi-Candidate Cross-Encoder (MCCE). Unlike standard Cross-Encoders, MCCE processes all $K$ candidates simultaneously in a single sequence.
The Recall-Expand-Filter pipeline for training and inference.

Multi-Candidate Cross-Encoding

The MCCE achieves its efficiency through a key observation: while types must interact with the entity context to be scored accurately, they do not need to interact with each other. By removing candidate-to-candidate (C2C) attention, we significantly reduce computational complexity. This allows the model to perform deep cross-encoding for hundreds of candidates in roughly the same time a standard model takes for one.

Furthermore, we represent types as fixed-size sub-token blocks. This "blocking" strategy allows the model to better capture the semantics of multi-word labels compared to simple embedding averaging.

Experimental Results

We evaluated our framework on the UFET (English) and CFET (Chinese) benchmarks. Our model achieved a Macro-F1 of 52.1 on UFET, setting a new state-of-the-art without requiring external knowledge bases or heavy pre-training. In terms of efficiency, the MCCE-S variant is approximately 40 times faster than a vanilla Cross-Encoder and thousands of times faster than previous state-of-the-art models like LITE. The "Expand" stage proved critical, as approximately 30% of types in the UFET development set are unseen during training; our MLM-based expansion effectively bridges this gap.

Conclusion

The "recall-expand-filter" framework with Multi-Candidate Cross-Encoding provides a scalable solution for ultra-fine entity typing. By optimizing the attention mechanism to focus on context-type interactions rather than type-type interactions, we achieve a massive speedup without sacrificing the semantic depth required for accurate classification. This approach holds promise for other large-scale ranking and classification tasks in natural language processing.

Summary updated

Abstract

Ultra-fine entity typing (UFET) predicts extremely free-formed types (e.g., president, politician) of a given entity mention (e.g., Joe Biden) in context. State-of-the-art (SOTA) methods use the cross-encoder (CE) based architecture. CE concatenates the mention (and its context) with each type and feeds the pairs into a pretrained language model (PLM) to score their relevance. It brings deeper interaction between mention and types to reach better performance but has to perform N (type set size) forward passes to infer types of a single mention. CE is therefore very slow in inference when the type set is large (e.g., N = 10k for UFET). To this end, we propose to perform entity typing in a recall-expand-filter manner. The recall and expand stages prune the large type set and generate K (K is typically less than 256) most relevant type candidates for each mention. At the filter stage, we use a novel model called MCCE to concurrently encode and score these K candidates in only one forward pass to obtain the final type prediction. We investigate different variants of MCCE and extensive experiments show that MCCE under our paradigm reaches SOTA performance on ultra-fine entity typing and is thousands of times faster than the cross-encoder. We also found MCCE is very effective in fine-grained (130 types) and coarse-grained (9 types) entity typing. Our code is available at \url{https://github.com/modelscope/AdaSeq/tree/master/examples/MCCE}.
BibTeX
@misc{jiang2022recall,
  author = {Chengyue Jiang and Wenyang Hui and Yong Jiang and Xiaobin Wang and Pengjun Xie and Kewei Tu},
  title = {{Recall, Expand and Multi-Candidate Cross-Encode: Fast and Accurate Ultra-Fine Entity Typing}},
  year = {2022},
  eprint = {2212.09125},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2212.09125},
}
Figure