Relation Classification via Bidirectional Prompt Learning with Data Augmentation by Large Language Model

Yizhi Jiang, Jinlong Li, Huanhuan ChenCOLING 2024

Abstract

Relation Extraction (RE) is a fundamental task in knowledge graph construction, yet it faces persistent challenges regarding data quality, entity ordering sensitivity in prompts, and the performance trade-off between prompt learning and traditional fine-tuning. This paper introduces RCBP (Relation Classification via Bidirectional Prompt learning), a framework that integrates Large Language Model (LLM)-based data augmentation, bidirectional prompt templates, and an MLP-driven fusion layer. Experimental results demonstrate that RCBP achieves new state-of-the-art performance on the RETACRED and TACREV benchmarks, effectively addressing the limitations of existing RE methodologies.

Introduction

Relation Extraction (RE) involves identifying the semantic relationship between two entities within a sentence. For example, in the sentence "Steve Jobs founded Apple," the model must identify the org:founded_by relation. Despite its importance, RE research faces three primary hurdles:

  1. Data Scarcity and Quality: Traditional data augmentation, such as Back Translation, often fails to preserve original entities, rendering the augmented data unusable for training.
  2. The "Order" Problem in Prompts: Prompt-based models are often sensitive to the relative order of entities. A model's prediction can vary significantly between "Entity A [MASK] Entity B" and "Entity B [MASK] Entity A."
  3. The Prompt vs. Fine-tuning Gap: While prompt learning excels at capturing label semantics in low-resource settings, traditional fine-tuning often proves more robust on large, noisy datasets.

Methodology

The RCBP framework addresses these issues through a three-part strategy designed to maximize both semantic understanding and data robustness.

LLM-Based Back Translation

To mitigate entity loss during data augmentation, RCBP utilizes LLMs (such as ChatGLM2) for constrained Back Translation. By providing specific instructions to preserve original entities during the translation process, the authors achieved an entity inclusion rate approximately 20% higher than standard translation services like Google Translate.

Bidirectional Prompt Learning

RCBP employs two distinct prompt templates: a forward template ($e_1$ [MASK] $e_2$) and a reverse template ($e_2$ [MASK] $e_1$). These templates use multiple [MASK] tokens to simultaneously predict entity types and predicate phrases. The framework selects the maximum probability from both directions, reducing errors caused by entity ordering bias.

MLP-Driven Probability Fusion

To bridge the gap between prompt learning and fine-tuning, RCBP calculates two probability distributions: one from the prompt learning module and another from a standard fine-tuning head using the [CLS] token. A Multi-Layer Perceptron (MLP) adaptively learns to weight these distributions for the final prediction.

The RCBP framework architecture, illustrating (a) LLM-based Back Translation, (b) Bidirectional Prompt Learning, and (c) MLP-Driven Probability Distribution Fusion.

Experimental Results

The model was evaluated on four major RE benchmarks: TACRED, RETACRED, TACREV, and Semeval (2010 Task 8). RCBP achieved state-of-the-art (SOTA) F1 scores on RETACRED (91.95) and TACREV (85.49).

Performance comparison of RCBP against baseline fine-tuning and prompt learning models across four major benchmarks.

Ablation studies confirmed the importance of each component. Removing the bidirectional prompt module resulted in the most significant performance decline (averaging ~0.91 F1), highlighting that entity order is a critical variable in prompt engineering. Furthermore, while prompt learning can struggle with the noise in the original TACRED dataset, the MLP fusion layer acted as a necessary safety net, allowing the model to remain highly competitive.

Discussion and Key Insights

  • LLMs as Constrained Augmenters: The study demonstrates that the primary value of LLMs in RE data augmentation lies in their instruction-following capabilities, ensuring entity preservation across languages.
  • Directionality Matters: Single-direction prompts often miss correct labels due to internal model biases. Bidirectional prompts create a more robust "semantic net."
  • Hybridization for Scale: The success of the MLP fusion layer suggests that hybridizing prompt learning with traditional fine-tuning is essential for handling large-scale, noisy real-world data.

Conclusion

RCBP advances the state-of-the-art in Relation Extraction by combining the strengths of LLM-driven augmentation and bidirectional prompt learning. Future work will explore multi-relation extraction and testing the framework's robustness across a wider variety of LLMs and languages.

Summary updated

BibTeX
@inproceedings{jiang2024relation,
  author = {Yizhi Jiang and Jinlong Li and Huanhuan Chen},
  title = {{Relation Classification via Bidirectional Prompt Learning with Data Augmentation by Large Language Model}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2024},
}
Figure