Few-Shot Joint Multimodal Entity-Relation Extraction via Knowledge-Enhanced Cross-modal Prompt Model

Li Yuan, Yi Cai, Junsheng Huang

Abstract

Joint Multimodal Entity-Relation Extraction (JMERE) is a critical task for constructing comprehensive knowledge graphs from diverse data sources like social media. However, standard models often fail in few-shot scenarios where labeled data is scarce, struggling with information scarcity in short texts and the difficulty of aligning visual and linguistic modalities. This paper introduces the Knowledge-Enhanced Cross-modal Prompt Model (KECPM), a two-stage framework designed to overcome these challenges. KECPM utilizes a Large Language Model (LLM) as an external knowledge base to provide context and a self-reflection mechanism to ensure the quality of the generated information. Experimental results on the FS-JMERE dataset show that KECPM significantly outperforms state-of-the-art baselines, demonstrating the effectiveness of LLM-augmented prompts in data-sparse environments.

Introduction

Building multimodal knowledge graphs requires the simultaneous identification of entities and their semantic relationships from paired text and images. While deep learning models have made significant strides in this area, their performance typically relies on massive amounts of annotated data. In real-world social media contexts, researchers often face "few-shot" scenarios where only a handful of examples are available for specific relation types.

Two primary obstacles hinder performance in these settings:

  1. Information Scarcity: Social media posts are frequently brief and informal (e.g., "RT @saladinMY: TV3 with the MCMC"), making it nearly impossible to determine relationships without external context.
  2. Modality Alignment: Mapping high-dimensional visual features (pixels) to discrete linguistic concepts is difficult to learn when training samples are limited.

Methodology

The proposed Knowledge-Enhanced Cross-modal Prompt Model (KECPM) addresses these issues through a two-stage pipeline that integrates external knowledge and simplifies multimodal fusion.

Stage 1: Knowledge Ingestion and Refinement

To compensate for the lack of context in short texts, KECPM treats an LLM (such as ChatGPT) as a heuristic knowledge repository. This stage involves three steps:

  • Prompt Selection: A T5-large model identifies the most semantically relevant human-annotated examples from a small candidate pool to serve as in-context learning prompts for the LLM.
  • Knowledge Generation: The LLM generates background information regarding the entities identified in the input.
  • Self-Reflection & Selection: To mitigate the risk of LLM "hallucinations," the model prompts the LLM to verify its own output. A specialized Knowledge Selector then uses cosine similarity to choose the most relevant generated snippet relative to the original input.

Stage 2: Knowledge-Enhanced Extraction

In the second stage, the model fuses three distinct information streams: the original text, a descriptive image caption (generated by the OFA model), and the refined background knowledge. This combined "super-prompt" is fed into a T5 model fine-tuned to generate structured entity-relation quintuples (Entity1, Type1, Entity2, Type2, Relation). By converting images into text captions, the model avoids the noise associated with aligning raw pixels in few-shot settings.

Experimental Setup

As no standard few-shot benchmark existed for JMERE, the authors developed FS-JMERE by sampling from a Twitter-based dataset. The sampling process used three different random seeds to ensure the training sets accurately reflected the original distribution of relation categories, such as peer, member_of, and subsidiary.

Results and Discussion

KECPM was evaluated against several strong baselines, including unimodal models (Tplinker, SpERT) and multimodal frameworks (EEGA).

  • Performance: KECPM achieved a Micro F1 score of 39.96 and a Macro F1 of 21.29, representing an improvement of approximately 3.5% and 3.8% over the state-of-the-art EEGA model.
  • Ablation Studies: Removing the knowledge ingestion component led to a significant performance drop, confirming that external LLM-generated context is the primary driver of success in few-shot extraction.
  • The Reflection Limit: Interestingly, the authors found that while self-reflection improves accuracy, exceeding two rounds of reflection introduces noise and degrades model performance.

Conclusion

KECPM demonstrates that LLMs can serve as effective implicit knowledge bases for multimodal tasks where data is sparse. By transforming visual data into captions and leveraging a self-reflecting knowledge retrieval process, the framework provides a robust solution for few-shot JMERE. Future work will focus on reducing the computational costs associated with LLM APIs and exploring reinforcement learning to further refine the selection of auxiliary knowledge.

Summary updated

BibTeX
@inproceedings{yuan2024few,
  author = {Li Yuan and Yi Cai and Junsheng Huang},
  title = {{Few-Shot Joint Multimodal Entity-Relation Extraction via Knowledge-Enhanced Cross-modal Prompt Model}},
  booktitle = {ACM Multimedia},
  year = {2024},
  doi = {10.1145/3664647.3680717},
}
Figure