Just KIDDIN ’ : Knowledge Infusion and Distillation for Detection of IN decent Memes (2025)

Abstract: Detecting toxicity in online multimodal environments, such as memes, remains a challenging task due to the complex contextual connections across modalities (e.g., text and visual), which demand both common-sense reasoning and contextual awareness. To bridge this gap, we propose a hybrid neurosymbolic framework that unifies (1) distillation of implicit contextual knowledge (e.g., sarcasm, cultural references) from Large Vision-Language Models (LVLMs) and (2) infusion of explicit relational semantics through sub-graphs from Knowledge Graphs (KGs). Experimental results on two benchmark datasets show the superior performance of our approach, Knowledge-Infused Distilled Vision-Language Model (KID-VLM) , over the state-of-the-art baselines across AUC and F1, with improvements of 0.5%, and 10.6%, respectively, in HatefulMemes Benchmark across variants. Further, KID-VLM demonstrates better generalizability and achieves the best performance across all baselines in the HarMeme Dataset with a 6.3% and 3.2% in F1 and AUC.Given the contextual complexity of the toxicity detection, KID-VLM showcases the significance of learning compact models (~500M parameters) from both explicit (i.e., KG) and implicit (i.e., LVLMs) contextual cues incorporated through a hybrid neurosymbolic approach. Our codes and pretrained models are publicly available.

## introduction online platforms have been increasingly prominent in disseminating harmful content, challenging the creation of safe digital spaces @xcite . according to the pew figure 1 : given a meme, we aim to derive the answer by joint reasoning over the knowledge from lvlm, the kg (green box), and reason over toxicity (red box). research center, 41% of americans report experiencing online harassment @xcite , and recent research highlights a surge in religious hate speech during the covid-19 pandemic @xcite . detecting toxic content, especially nuanced and context-dependent multimodal forms, such as memes, remains a complex task @xcite . @xcite noted that context availability alters the perceived toxicity in 5.2% of posts. memes that appear harmless can convey harmful messages through sarcasm, irony, or cultural references, thus potentially reinforcing negative stereotypes or societal norms @xcite . hence, accurate toxicity assessment requires a thorough understanding of context, as implicit evaluations can misinterpret tone or intent @xcite . although online multimodal toxicity detection has witnessed improvements, current methods, such as prompthate @xcite and @xcite , rely solely on training data and pre-trained models, which limits their ability to capture complex contextual cues and nuances of toxicity. moreover, while larger models, such as flamingo @xcite and lens @xcite , achieve comparable performance, they require substantial computational resources to deploy in limitedresource settings. these models often struggle to effectively address nuanced or context-dependent toxicity due to their reliance on pattern recognition without incorporating broader contextual knowledge @xcite . our approach, knowledge-infused distilled vision-language model (kid-vlm), addresses these limitations by leveraging conceptnet @xcite , a common sense knowledge graph (kg) that enhances the comprehension of contextual nuances. in this study, the following research questions guide our investigation: rq1: how can we incorporate knowledge distillation (kd) from lvlms and common sense knowledge from kgs into compact models, enhancing their effectiveness in detecting toxicity within memes? rq2: how does the generalizability of kid-vlm compare to baseline methods in detecting toxicity across datasets? hatefulmemes @xcite and harmeme @xcite ? we present a novel approach that enhances compact vlms by combining kd from lvlms with knowledge infusion from kgs, enriching them with both implicit and explicit contextual knowledge (see figure 1 ). utilizing clip @xcite as the backbone, we extract visual and textual features from memes, supplemented with captions generated by the llava 1.6-next model @xcite for additional contextual features. these features are then fused using align fusion @xcite to create a multimodal representation, refined with knowledge distilled from the teacher model's caption representations through consistency loss. this process enables the student model to learn implicit contextual cues. using graph-based reasoning, we further incorporate external knowledge from concept-net, constructing a joint graph that combines the meme context with kg entities. this knowledgeenhanced multimodal representation is then optimized using cross-entropy loss for final toxicity predictions (see figure 2 ). our findings demonstrate the effectiveness of the kid-vlm framework, which outperforms the baselines. error analysis and ablation studies further highlight the significance of explicit and implicit context incorporated through kd and infusion, providing improvements of 10.6% and 0.5% in f1 and auc, respectively. further, our approach demonstrates better generalizability compared to baselines, as seen in our performance on the harmeme dataset, where kid-vlm outperforms all baselines with an auc of 92.98. ## methodology our approach, kid-vlm, illustrated in figure 2 , utilizes a frozen vision-language (vl) encoder as the student model s, conceptnet as the kg k, and an lvlm as teacher model t , serving as nonparametric knowledge sources to query explicit and implicit knowledge, respectively. for each data point, a meme with an image i i and overlaid text t i , a joint multimodal feature representation s i is generated using the pre-trained student model, s @xmath0, t i ). to get the joint representation, we use the align fusion for it's low computational resource conditions (kumar and nandakumar, 2022b). concurrently, the teacher model t produces a caption c i capturing the meme's implicit context, which is used for two purposes: (i) aid in teaching the student model through kd loss l kd , and (ii) query conceptnet to extract relevant sub-kgs g sub for each data point. the distilled representation h distilled from the student model is then fused with the pooled representation h graph from sub-kgs obtained through a gnn g, h @xmath1. this fused representation is optimized through cross entropy loss l ce , enabling the model to synthesize outputs from both the teacher's latent reasoning and the explicit relational knowledge from the kg. ## conclusion the results demonstrate that the kid-vlm architecture, through its combination of kgs and kd, provides superior performance for detecting hate speech in memes compared to baseline methods. by integrating explicit relational knowledge with implicit contextual cues, kid-vlm better captures sarcasm, cultural references, and multimodal nuances that often obscure toxicity. the use of con-ceptnet subgraphs and distilled multimodal representations allows the model to understand the complex semantics of multimodal content better, resulting in improved accuracy, f1, and auc scores. by distilling knowledge into a compact model (~500m parameters), kid-vlm achieves these gains without the computational burden of large-scale models, making it scalable for real-world deployment.