SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2411.07527 · IJCAI · 2024

Prompt-enhanced Network for Hateful Meme Classification

Junxi Liu, Yun Xue, Yanyan Feng, Jiehai Chen, Fenghuan Li

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 5 functions out of this paper's own repositories and ran 5 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
juszzi/Pen — 5 of 5
FunctionStatusWhere it lives
EncoderLayer Ran juszzi/Pen/Pen/rela_encoder.py
pointer only (licence: NONE) · get_code("5f1c246ba093aa19")
MultiHeadedAttention Ran juszzi/Pen/Pen/rela_encoder.py
pointer only (licence: NONE) · get_code("295c7cd78c0c5615")
PositionwiseFeedForward Ran juszzi/Pen/Pen/rela_encoder.py
pointer only (licence: NONE) · get_code("310aa085b41983d9")
Rela_Module Ran juszzi/Pen/Pen/rela_encoder.py
pointer only (licence: NONE) · get_code("2f0602f40d97d77f")
attention Ran juszzi/Pen/Pen/rela_encoder.py
pointer only (licence: NONE) · get_code("a714be7300922d46")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

The dynamic expansion of social media has led to an inundation of hateful memes on media platforms, accentuating the growing need for efficient identification and removal. Acknowledging the constraints of conventional multimodal hateful meme classification, which heavily depends on external knowledge and poses the risk of including irrelevant or redundant content, we developed Pen-a prompt-enhanced network framework based on the prompt learning approach. Specifically, after constructing the sequence through the prompt method and encoding it with a language model, we performed region information global extraction on the encoded sequence for multi-view perception. By capturing global information about inference instances and demonstrations, Pen facilitates category selection by fully leveraging sequence information. This approach significantly improves model classification accuracy. Additionally, to bolster the model's reasoning capabilities in the feature space, we introduced promptaware contrastive learning into the framework to improve the quality of sample feature distributions. Through extensive ablation experiments on two public datasets, we evaluate the effectiveness of the Pen framework, concurrently comparing it with state-of-the-art model baselines. Our research findings highlight that Pen surpasses manual prompt methods, showcasing superior generalization and classification accuracy in hateful meme classification tasks. Our code is available at https://github.com/juszzi/Pen.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2411.07527")
get_code_for_paper("2411.07527")
have("2411.07527")

Connect an agent — have() is free.