Contrastive Learning with Hard Negative Entities for Entity Set Expansion

Yinghui Li, Yangning Li, Yuxin He, Tianyu Yu, Ying Shen, Hai-Tao Zheng

Abstract

Entity Set Expansion (ESE) aims to expand a small set of seed entities into a complete set belonging to the same semantic class. A major challenge in ESE is semantic drift, where models mistakenly include "hard negative" entities—those semantically similar to the target class but belonging to a different category. This paper presents ProbExpan, a framework that leverages contrastive learning to sharpen boundaries between target entities and hard negatives. By combining an entity-level masked language model with a probabilistic ensemble approach, ProbExpan achieves state-of-the-art performance on multiple benchmarks, particularly on fine-grained datasets like SE2.

Introduction: The Challenge of Semantic Drift

Entity Set Expansion is a fundamental task for knowledge graph construction and search engine optimization. Given a few seeds like {Illinois, Arizona, California}, the goal is to retrieve more members of the "US States" class. However, iterative expansion processes often suffer from semantic drift.

Figure 1: The expansion process and the challenge of hard negative entities. Models often confuse fine-grained categories (e.g., US Cities) with the target category (e.g., US States) due to shared coarse-grained parent classes (e.g., Location).

As shown in Figure 1, "hard negative" entities like San Francisco or Los Angeles are semantically close to the target class because they share a coarse-grained category (Location). Standard models often fail to distinguish these fine-grained differences, leading to the accumulation of errors that pull the expanded set away from the original intent.

The ProbExpan Framework

To address these challenges, the authors propose the ProbExpan framework, which integrates contrastive learning with a robust ensemble mechanism.

Figure 4: The ProbExpan architecture, featuring an Entity Representation Model with contrastive learning and an ensemble-based re-ranking pipeline.

1. Entity-Level Masked Language Modeling

Unlike standard word-level pre-training, ProbExpan uses an entity-level Masked Language Model (MLM). The model is trained to predict masked entities within sentences, allowing it to learn the specific linguistic contexts that characterize different entity types.

2. Contrastive Representation Learning

The core innovation is the use of contrastive learning to refine entity embeddings. The model is trained to minimize the distance between representations of entities within the same class while maximizing the distance to "hard negatives." These negatives are identified automatically by selecting entities that rank highly in the expansion process but do not belong to the target set. This "push-pull" mechanism forces the model to learn sharper semantic boundaries.

3. Probabilistic Ensemble and Re-ranking

ProbExpan employs a model selection strategy based on probabilistic consistency. By measuring the KL-divergence between the representations of seed entities, the framework can score how well a specific model has captured the target semantic class. The top-performing models are ensembled to reduce variance. Finally, a window search and re-ranking step ensure the high quality of the final expanded set.

Experimental Evaluation

The framework was evaluated on three datasets: Wiki (Wikipedia-based), APR (news-based), and SE2 (a large-scale, fine-grained benchmark).

Key Results

  • State-of-the-Art Performance: ProbExpan significantly outperformed previous methods. On the challenging SE2 dataset, it achieved a Mean Average Precision (MAP@10) of 0.683, compared to 0.628 for the previous best, SynSetExpan.
  • Ablation Study: Removing the contrastive learning component (ProbExpan-NoCL) resulted in a performance drop, confirming that explicitly modeling hard negatives is crucial for maintaining expansion accuracy.
  • Handling Fine-Grained Classes: Qualitative analysis showed that ProbExpan successfully excluded "cousin" entities (e.g., distinguishing China Provinces from major Chinese Cities) that typically cause drift in other models.

Conclusion

ProbExpan demonstrates that addressing granularity through contrastive learning is key to solving semantic drift in Entity Set Expansion. By focusing on hard negatives, the framework creates more robust and precise entity representations. Future work will explore the generalizability of these models to specialized domains, such as medical or scientific literature, and investigate more sophisticated automated metrics for entity "hardness."

Summary updated

BibTeX
@inproceedings{li2022contrastive,
  author = {Yinghui Li and Yangning Li and Yuxin He and Tianyu Yu and Ying Shen and Hai-Tao Zheng},
  title = {{Contrastive Learning with Hard Negative Entities for Entity Set Expansion}},
  booktitle = {International ACM SIGIR Conference on Research and Development in Information Retrieval},
  year = {2022},
  doi = {10.1145/3477495.3531954},
}
Figure