Harmful model factor detection depolarization method and system based on front door adjustment

By generating inference sequences through front-door adjustment and diversified bundle search, and combining them with a multimodal large language model for feature extraction and causal effect estimation, the problem of hidden bias in harmful meme detection is solved, and more accurate and interpretable harmful meme detection is achieved.

CN121861670APending Publication Date: 2026-04-14HUAZHONG NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-30
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing technologies ignore hidden data biases in the detection of harmful memes, resulting in impaired generalization ability of the model during testing and an inability to accurately identify the harmfulness of the meme.

Method used

We employ a front-door adjustment-based approach to generate inference sequences through diversified beam search, utilize a multimodal large language model for feature extraction and cross-attention layer transformation, and combine a normalized weighted geometric mean method for causal effect estimation to generate unbiased harmful meme detection results and provide interpretable explanatory statements.

Benefits of technology

It improves the model's generalization ability and interpretability, enabling it to more accurately identify harmful memes, mitigate the impact of hidden biases, and generate high-quality interpretable detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121861670A_ABST
    Figure CN121861670A_ABST
Patent Text Reader

Abstract

The invention discloses a front door adjustment-based harmful modal cause detection depolarization method, which comprises the following steps of: constructing a structural causal model, creating a back door path between a modal cause and a harmful label by using unobserved confounding factors, and eliminating harmful modal cause detection through front door adjustment; the front door adjustment then blocks the back door path by introducing reasoning as an intermediary between the memetic and the tag. The method comprises the following steps: decomposing the causal effect of a medal factor on a harmful tag into the influence of the medal factor on an intermediary, quantifying by adopting a multi-modal large-scale language model with different beam searches to calculate the probability of each reasoning sequence and the influence of the intermediary on the tag, and performing effective approximation through a normalized weighted geometric averaging method; finally, post-interpretation is synthesized from the inference sequence and the predictive tag using a large language model. According to the scheme, the most advanced performance is achieved while information interpretation is provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information identification and classification, and in particular to a method and system for detecting and debiasing harmful memes based on front-door adjustment. Background Technology

[0002] Internet memes are multimodal artifacts that combine images with short text, and they have become a primary vehicle for public commentary on social events. Their humor and shareability accelerate their widespread dissemination on social media platforms, but they can also be maliciously exploited by unscrupulous creators, shifting their impact from entertainment to harm, thus creating harmful memes. Due to their obscure nature, memes are often difficult to identify accurately.

[0003] In existing technologies, large-scale multimodal language models have achieved significant success in identifying harmful memes. However, they remain susceptible to unintended data biases that can mislead models in exploring spurious correlations between meme patterns and labels. Due to the human-centric nature of data creation and collection, human annotators and data managers inevitably embed various implicit or explicit biases into datasets, including entity bias and psycholinguistic bias. Furthermore, data biases exhibit high diversity and complexity, making the enumeration and identification of all potential sources of bias a computationally and cognitively challenging task. Similarly, word frequency-based labels learn these biases as shortcuts during model training, rather than through semantic reasoning, inevitably weakening their generalization and causal inference capabilities on unseen test data that eliminates such biases. Moreover, existing harmful meme detectors primarily focus on multimodal semantic fusion to capture subtle interactions between different modalities, neglecting potential data biases and leading to erroneous predictions based on spurious label-specific features. Summary of the Invention

[0004] To address the aforementioned deficiencies or improvement needs of existing technologies, this invention provides a method and system for debiasing harmful meme detection based on front-door adjustment. This solves the problem in existing technologies where ignoring hidden data biases leads to the learning of false label-specific features, thus impairing generalization ability when these biases are absent during testing. This invention mitigates these unobserved confounding factors from a causal inference perspective.

[0005] To achieve the above objectives, the present invention adopts the following technical solution.

[0006] In some embodiments, a method for debiasing harmful meme detection based on front-door adjustment is provided, the method comprising the following steps: S101, Given a meme, input the prompt text into the multimodal visual language large model to obtain harmful or harmless inference text, use diversified bundle search to generate a set of heterogeneous inference sequences and sequence scores from the inference text, and obtain the probability distribution of the inference sequence based on the inference sequence and the sequence score; S201, a multimodal image-text encoder is used to extract features from the meme to obtain visual embeddings and text embeddings. The visual embeddings and text embeddings are concatenated and fused to obtain a meme representation to eliminate hidden bias. A pre-trained visual language model is used to encode the inference sequence to obtain an inference representation of the inference sentence context embedding. The meme representation and the inference representation are converted into an expected representation based on two consecutive cross-attention layers. The label prediction result is obtained based on the expected representation. S301, using the Big Prophecy model to generate an explanatory description of the harmful meme detection results based on the probability distribution of the inference sequence and the label prediction results.

[0007] As one possible implementation, in step S101, a set of heterogeneous inference sequences and sequence scores are generated from the inference text using a diversity beam search, and the probability distribution of the inference sequences is obtained based on the inference sequences and the sequence scores. The method further includes: The multimodal large model using diversified beam search generates a set of inference sequences and corresponding sequence scores from the inference text. The semantic similarity within the inference sequences is suppressed based on explicit penalty redundancy to ensure that the generated inference sequences have high heterogeneity. The probability distribution of the reasoning sequence and its similarity are generated based on the scoring function of the sequence score and the given prompt conditions.

[0008] As one possible implementation, step S201, which converts the meme representation and the reasoning representation into a desired representation based on two consecutive cross-attention layers, further includes: An intervention distribution is generated based on the meme representation and the inference representation, and the expected form of the prediction result is generated based on the label prediction probability estimated by the classifier. The expected form of the prediction result is obtained by solving the normalized weighted geometric mean method.

[0009] As one possible implementation, it also includes: Latent variables are introduced as alternative distributions of confounding factors, which can encode characteristic representations with confounding awareness.

[0010] As one possible implementation, the two consecutive cross-attention layers specifically include: The first cross-attention layer serves as the query vector, using the meme representation as the key and value, and the output vector incorporates contextual signals with promiscuous awareness into the meme representation; In the second cross-attention layer, the meme representation is used as the query vector, and the hybrid perception meme representation is used as the key and value.

[0011] As one possible implementation, step S201, obtaining the label prediction result based on the expected representation, further includes: The label probability distribution of the inference representation is calculated using a classifier, the label probability distribution is normalized, and a label prediction result is generated based on the label probability distribution and the expected representation.

[0012] As one possible implementation, step S201 further includes causality loss and classification loss, specifically including: The expected value of meme representation is estimated using the normalized weighted geometric mean method, and a causal loss function is constructed based on the front-door decomposition. Binary cross-entropy is used during training. A meme-based classifier is introduced, and a corresponding binary cross-entropy is constructed to generate a classification loss function; A joint optimization objective is generated based on the binary cross-entropy corresponding to the causal loss function and the binary cross-entropy corresponding to the classification loss function.

[0013] As one possible implementation, step S301 further includes: Given a meme image containing text, and by fusing evidence from multiple reasoning sequences, we can filter out reasons that are consistent with the meme's label to generate an explanation that is both readable and causally consistent.

[0014] Some embodiments of this application also provide a harmful meme detection and debiasing system based on front-door adjustment, the system comprising: The intervention reasoning module is used to take a meme as a given and input the prompt text into the multimodal visual language large model to obtain harmful or harmless reasoning text. It uses a variety of bundle search to generate a set of heterogeneous reasoning sequences and sequence scores from the reasoning text, and obtains the probability distribution of the reasoning sequence based on the reasoning sequence and the sequence score. An unbiased prediction module is used to extract features from the meme using a multimodal image-text encoder to obtain visual embeddings and text embeddings. The visual embeddings and text embeddings are concatenated and fused to obtain a meme representation to eliminate hidden bias. A pre-trained visual language model is used to encode the inference sequence to obtain an inference representation of the inference sentence context embedding. The meme representation and the inference representation are converted into an expected representation based on two consecutive cross-attention layers, and the label prediction result is obtained based on the expected representation. An explanation generation module is used to generate explanatory descriptions of the harmful meme detection results based on the probability distribution of the inference sequence and the label prediction results using the Big Prophecy model.

[0015] Some embodiments of this application also provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the methods described above.

[0016] Compared to existing technologies, the beneficial effects of this invention are as follows: The harmful meme detection and debiasing method based on front-door adjustment provided by this invention, by introducing inference as a mediator and employing front-door adjustment, eliminates hidden bias in harmful meme detection; it models the effect of memes on inference as inference sequence probabilities, which are estimated by a multimodal large model through diversified bundle search, and then uses the NWGM approximation to estimate the causal effect of the mediator on the label; subsequently, a large language model is used to generate explanations, making the prediction results interpretable. The generalization ability and interpretability of the model are greatly enhanced. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of a conventional causal model for detecting harmful memes, provided as an embodiment of the present invention.

[0018] Figure 2 This is a schematic diagram of a structural causal model for an improved harmful meme detection provided in one embodiment of the present invention.

[0019] Figure 3 This is a schematic diagram of the causal explanation model framework provided in one embodiment of the present invention.

[0020] Figure 4 This is a schematic diagram of a harmful meme detection and debiasing method based on front-door adjustment according to an embodiment of the present invention.

[0021] Figure 5 In the experimental section provided for one embodiment of the present invention A diagram illustrating the impact of the value on the F1 score of the four datasets.

[0022] Figure 6 This is a schematic diagram of a harmful meme detection and debiasing system based on front-door adjustment, provided as an embodiment of the present invention. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0024] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0025] Harmful Meme Detection: Early efforts in harmful meme detection primarily relied on unimodal representation learning, applying pre-trained encoders to process the textual or visual components of the meme separately. This revealed that unimodal detectors exhibited limited performance due to the highly complex strategic interactions between images and text. Mainstream research has shifted towards integrating textual, visual, and even contextual information to capture subtle interactions between different modalities. With the advent of large language models, many LLM-enhanced frameworks have been designed to enrich contextual information and even achieve few-shot or zero-shot detection. Recently, some research has shifted its focus from detection accuracy to interpretability. However, the aforementioned methods ignore hidden data biases, learning spurious label-specific features that impair generalization when these biases are absent at test time. This invention mitigates these unobserved confounding factors from the perspective of causal inference.

[0026] Causal Inference: Existing techniques develop unbiased models through causal inference; backdoor adjustment and frontdoor adjustment are two widely used causal intervention tools for estimating the causal effect between treatment and outcome. With backdoor adjustment, CLIMB eliminates image-text matching bias; CCD mitigates psycholinguistic bias and addresses image-specific bias through counterfactual reasoning; SuCI eliminates subject bias in multimodal language understanding. However, backdoor adjustment fails when confounding factors are unobservable.

[0027] Generally speaking, causal reasoning has become the preferred paradigm for developing unbiased models through causal intervention or counterfactual reasoning in various tasks. For example... Figure 1 As shown, traditional methods directly estimate the total causal effect of the input meme (M) on the output label (L), but neglect unobserved confounding factors (U). From the perspective of causal inference, the existence of U introduces a backdoor path M←U→L, thus conflating the true causal effect of M on L with spurious correlations. However, backdoor adjustment is not feasible here because the unobserved confounding factors U encompass various biases that cannot be exhaustively enumerated and identified.

[0028] Front-door adjustment provides a viable alternative for estimating causal effects in the presence of hidden confounding factors. However, direct computation of causal effects based on front-door adjustment is intractable, and the true distribution of inference R is difficult to obtain, further increasing the difficulty of applying front-door adjustment.

[0029] In some embodiments, the present invention proposes a debiasing framework model that employs front-door adjustment to distinguish causal signals from biases, thereby achieving robust and causally plausible predictions for harmful meme detection. (Formulated as follows) Figure 2 As shown, the unobserved confounding factor U is replaced by inference (R), which acts as a mediator between the meme (M) and the harmful label (L). Subsequently, the causal effect of M on L is decomposed into two parts: the causal effect of M on R and the causal effect of R on L. Specifically, R is instantiated using a real inference sequence generated by a multimodal large language model through multi-sample bundle search, thereby quantifying the causal effect between M and R. In some embodiments, a normalized weighted geometric mean (NWGM) approximation is applied to compute the causal effect between R and L by producing an unbiased output based on the generated inference sequence. Furthermore, in some embodiments, a cue large language model (LLM) synthesizes ex post facto explanations from the inference and predicted harmful labels, thereby improving the transparency of the model's predictions.

[0030] In embodiments of this invention, multimodal large language models (MLLMs) are not required to directly classify memes as harmful / harmless. Instead, the generated inference sequences are used as mediating variables. These inference sequences simulate human thought processes, enabling them to interpret the deeper meaning of memes, collect evidence from both sides, and capture semantic, relational, and high-level interpretive features related to harmfulness, thus simulating realistic distributions. Simultaneously, the normalized weighted geometric mean (NWGM) approximation method is applied to derive unbiased results based on the generated inference sequences, addressing the problem that direct calculation of causal effects is intractable.

[0031] In some embodiments, the improvements of the present invention are mainly as follows: (1) removing bias from the perspective of causal inference in the detection of harmful memes; (2) the debiasing framework model of the present invention introduces inference between memes and harmful labels as a mediator, and uses front-door adjustment to achieve causal intervention, which is instantiated by inference sequences generated by multi-sample bundle search; (3) using LLM to generate informative interpretations, combining inference with the final detection decision, thereby revealing the potential semantic clues embedded in the multimodal meme content. The debiasing framework model of the present invention has superior performance in terms of model generalization and interpretability.

[0032] To facilitate a better understanding of this invention, the relevant technologies are now explained and described.

[0033] First, structural causal models and causal effects: Given a meme Here, m represents a specific meme, I represents visual content, T represents the associated text sequence, and M represents the set of specific memes m. The goal of harmful meme detection is to automatically predict its corresponding harmful label. .

[0034] This invention aims to mitigate hidden biases by utilizing causal inference. Harmful meme detection can be represented as a structural causal model: Here, V is the set of variables, and E is the set of directed edges representing causal dependencies. (Directed edges) This indicates the direct causal effect of meme M on output label L.

[0035] However, due to the human-centric nature of data annotation and collection processes, human annotators and data organizers inevitably embed various implicit or explicit biases into the data. In some embodiments of this invention, a confounding variable U is introduced into the structural causal model, thereby generating a backdoor path: This means that U simultaneously affects both the treatment variable M and the outcome variable L. Traditional detectors typically learn statistical correlations directly. This method is used to complete classification tasks, but it cannot distinguish between true causal signals and spurious correlations, resulting in performance degradation on the test set after bias removal.

[0036] In some embodiments of the present invention, the true causal effect of M on L is isolated so that it is unaffected by the confounding variable U, which requires blocking the backdoor path. Using operational calculus, the true causal effect can be expressed as: (1) in, This indicates potential bias factors that simultaneously affect both the treatment variable M and the outcome variable L. Let P(u) represent the probability of outcome L given the treatment variable M and the confounding variable u. P(u) represents the marginal distribution of the confounding variable U, i.e., the prior probability of U taking a certain value. It is used for weighted averaging to ensure that the probability of different u values ​​is taken into account.

[0037] Second, causal intervention through front-door adjustment: Since the unobserved confounding variable U absorbs various biases that cannot be fully enumerated and identified, directly using the backdoor adjustment formula (1) is not feasible in practice. In some embodiments of the present invention, a frontdoor adjustment method is used, which can obtain the unbiased causal effect estimate of M on L without accessing U. The key to frontdoor adjustment is to identify a mediator variable R, ensuring that all direct causal paths from the treatment variable M to the outcome variable L are passed through this mediator variable. According to the frontdoor criterion, the true causal effect of M on L can be expressed as: (2) in, Let M represent the inference variable related to the meme M. Therefore, the causal effect of M on L can be decomposed into two stages: : Indicates the causal effect of M on the mediating variable R; This indicates the causal effect of R on the outcome variable L.

[0038] First, it is necessary to estimate Due to the structure It is a collision path that blocks the back door path. Therefore: (3) in, Let r represent the conditional probability of r given M. When the collision path is blocked and mixed, the intervention effect is the same as the observation conditional probability.

[0039] Secondly, it is necessary to estimate When conditional control is applied to M, the path... The connection is blocked, thus satisfying the backdoor criterion. Therefore, the causal effect of R on L can be estimated as:

[0040] Where P(L|r,m) represents the conditional probability of observing L given R=r and M=m, and P(m) represents the marginal distribution of M. Finally, substituting equations (3) and (4) into equation (2), we obtain the overall causal effect:

[0041] Based on the above analysis, some embodiments of this application provide a method for harmful meme detection and debiasing based on front-door adjustment. Overall, the causal explanation model framework proposed in this invention is as follows: Figure 3 As shown, firstly, the probability distribution P(r|do(M)) of the inference sequence is estimated by combining a multimodal language model with diversity bundle search technology; then, the probability P(L|do(r)) is unbiasedly estimated using the normalized weighted geometric mean method, and the label prediction results are obtained; finally, the large language model (LLM) generates explanatory descriptions based on the inference and prediction results.

[0042] Specifically, such as Figure 4 As shown, the method includes the following steps: S101, given a meme, and inputting the prompt text into a multimodal visual language large model to obtain harmful or harmless inference text, use a diversity bundle search to generate a set of heterogeneous inference sequences and sequence scores from the inference text, and obtain the probability distribution of the inference sequences based on the inference sequences and the sequence scores. It should be noted that, as shown in equation (3), the intervention distribution It can be equivalently represented as This allows for direct modeling from empirical data. To address the problem of how to extract the front-door variable R from memes, this invention uses a multimodal large language model as the sampler for the front-door variable. Specifically, given a meme... And construct a prompt template. The system embeds a text component T, which is then input into a visual-language model. Driven by this prompt, the multimodal large model generates a reasoning text r, which elaborates and argues from the perspective of "harmful" or "harmless." For example, the prompt template... The design is as follows: “Given a meme image containing text [T], please reason from a harmful or harmless perspective. This task does not require a final judgment, but rather requires summarizing evidence and constructing logical reasoning. Please analyze how the visual and textual elements relate to broader cultural, social, and psychological frameworks; identify whether the meme relies on stereotypes, involves trending events, or evokes strong emotions; and analyze how these cues affect audience understanding. From your chosen perspective, identify key cues supporting your reasoning.”

[0043] Front-door adjustment requires generating a set of inference sequences that are high in probability but diverse from one another. Existing techniques use standard beam search to sample inference as the front-door variable, but this results in a lack of sufficient diversity in the inference sequences. To address this, this invention employs diversified beam search to generate multiple heterogeneous high-probability inference results. This method explicitly penalizes redundancy, divides candidate sequences into multiple groups at each step, and suppresses semantic similarity within groups, thereby ensuring that the generated inference set has higher heterogeneity. Formally, this invention utilizes a multimodal large model generated by diversified beam search to generate: (i) a set of inference sequences, denoted as The corresponding set of sequence scores is denoted as Where B is the beam width. The scoring function is defined as:

[0044] in, Indicates a fixed parameter Given a hint Generative reasoning under certain conditions The probability of; This represents the sequence length, used to avoid favoring long sequences. To approximate the probability distribution of these inference sequences, softmax normalization is applied to the scores, resulting in:

[0045] S201, a multimodal image-text encoder is used to extract features from the meme to obtain visual embeddings and text embeddings. The visual embeddings and text embeddings are concatenated and fused to obtain a meme representation to eliminate hidden bias. A pre-trained visual language model is used to encode the reasoning sequence to obtain a reasoning representation of the reasoning sentence context embedding. The meme representation and the reasoning representation are converted into an expected representation based on two consecutive cross-attention layers, and the label prediction result is obtained based on the expected representation. It should be noted that, as shown in equation (4), the backdoor adjustment will interfere with the distribution. Transform into To this end, meme representation and inference representation are first obtained separately and used for multimodal meme coding and inference coding, respectively. Then, in the "inference deconfusion" stage, the causal effect is efficiently solved using the NWGM approximation method. Finally, in the "inference classification" stage, the label distribution is calculated based on the deconfusioned inference representation.

[0046] First, multimodal meme encoding: Visual and textual features of memes are jointly extracted using a multimodal image-text encoder.

[0047] Among them, the encoder outputs visual embedding With text embedding Then, the concatenated data is input into a multilayer perceptron to obtain the fused meme representation. .

[0048] Second, inference encoding: The inference sequence r generated by the visual language model is encoded by the pre-trained language model as follows:

[0049] in, The context embedding representation of inference statements.

[0050] Third, reasoning to dissect: given a meme representation and inference representation Intervention distribution It can be transformed into the following expected form:

[0051] Where l represents a specific tag in the tag set L.

[0052] in, Indicates that the classifier The estimated predicted probability of label L, i.e.

[0053] in, This is a fusion layer used for fusion. and Two representations.

[0054] Due to expectations Unable to be solved analytically, in some embodiments, a normalized weighted geometric mean method is used for approximation:

[0055] Then, feature fusion is achieved using trainable neural network layers:

[0056] in, and For learnable weight matrix, Let the intervention weighting coefficients be used. Therefore, their expectation can be written as:

[0057] Due to the high dimensionality of the meme space and the existence of potential confounding factors, obtaining accurate... It is estimated that this invention infers alternative confounding variables. Specifically, it does so by introducing latent variables. Distribution of alternative confounding factors:

[0058]

[0059]

[0060] in, These are learnable parameters, initialized to zero, representing the mean and variance of the confounding distribution. This represents each element of the mean and variance matrix. n represents... The number of tokens in the array, where d is the feature dimension. Represents Gaussian noise. Each element of the latent variable z matrix represents a latent variable. The sampled latent variables can encode feature representations with promiscuous consciousness.

[0061] In order to estimate This invention designs two consecutive cross-attention layers. In the first layer, it serves as the query vector, while the meme feature representation... It can act as both a key and a value. The attention mechanism is defined as follows:

[0062]

[0063]

[0064]

[0065] in, This represents the feature representation of the latent variable z obtained after passing through the MLP layer. Indicates the weight matrix The resulting query vector, key vector, and value vector. This represents the vector representation of the latent variables obtained after the attention mechanism. The vector obtained from equation (21) Contextual signals with confounding factors are incorporated into the meme representation. In the second layer, the original meme representation... As a query vector, and a promiscuous meme representation As keys and values, the attention mechanism is defined as follows:

[0066]

[0067] in, Indicates the weight matrix The resulting query vector, key vector, and value vector. This represents the feature representation of the meme obtained after the attention mechanism.

[0068] Fourth, reasoning and classification: First, use a classifier function. According to reasoning To calculate the probability distribution of the labels. Therefore, It can be formalized as:

[0069]

[0070] Therefore, the intervention distribution can be derived using the NWGM approximation. as follows:

[0071] S301, using a large oracle model, an interpretative description of the harmful meme detection results is generated based on the probability distribution of the inference sequence and the label prediction results. It should be noted that, to improve the interpretability of the model's predictions, this invention utilizes a visual language model based on the inference set R={r1,…,r...} B} and the final predicted label Lpred Generate natural language explanations. Specifically, given a meme. Construct Chinese explanation prompt p e The inference sequence and predicted labels are then filled into the model to guide it in generating explanatory text consistent with the prediction. The prompt template is as follows: Given a meme image containing text [T]. Below are [B] inference fragments from both "harmful / harmless" perspectives: [R]. Your task consists of two parts: (i) selecting from these inferences that support the meme being classified as [L]. pred (i) Provide key information; (ii) Provide a clear and structured explanation based on the selected information to justify the prediction.

[0072] The model thus fuses evidence from multiple reasoning sequences and filters it to match L. pred Consistent reasoning and the generation of readable and causally consistent explanations enhance the credibility of the detection system.

[0073] As one possible implementation, in step S101, a set of heterogeneous inference sequences and sequence scores are generated from the inference text using a diversity beam search, and the probability distribution of the inference sequences is obtained based on the inference sequences and the sequence scores. The method further includes: A multimodal large model using diversified beam search generates a set of inference sequences and corresponding sequence scores from the inference text. Explicit redundancy penalty is used to suppress intra-group semantic similarity of the inference sequences, ensuring high heterogeneity. The probability distribution semantic similarity of the inference sequences is then generated based on the scoring function of the sequence scores and given cue conditions. It should be noted that front-door adjustment requires generating a set of highly probable but diverse inference sequences. Existing technologies use standard beam search to sample inference as the front-door variable, but this results in insufficient diversity in the inference sequences. Therefore, this invention employs diversified beam search to generate multiple heterogeneous high-probability inference results. This method explicitly penalizes redundancy, dividing the candidate sequences into multiple groups at each step and suppressing intra-group semantic similarity, thereby ensuring higher heterogeneity in the generated inference set. Then, the probability distribution semantic similarity of the inference sequences is generated based on the scoring function of the sequence scores (as shown in Equation (6)) and given cue conditions.

[0074] As one possible implementation, step S201, which converts the meme representation and the reasoning representation into a desired representation based on two consecutive cross-attention layers, further includes: An intervention distribution is generated based on the meme representation and the inference representation, and an expected form of the prediction result is generated based on the label prediction probability estimated by the classifier. The expected form of the prediction result is solved using the normalized weighted geometric mean method to obtain the expected representation of the prediction result. It should be noted that this implementation method is specifically constructed and implemented based on the multimodal meme encoding in the first part, the inference encoding in the second part, the inference de-obfuscation in the third part, and the inference classification in the fourth part, which will not be elaborated here.

[0075] As one possible implementation, it also includes: Latent variables are introduced as alternative distributions of confounding factors, which can encode feature representations with confounding consciousness. It should be noted that this implementation method is specifically constructed and implemented based on the deconfounding reasoning and related equations (15)-(17) in the aforementioned third part, which will not be elaborated here.

[0076] As one possible implementation, the two consecutive cross-attention layers specifically include: The first cross-attention layer serves as the query vector, using the meme representation as the key and value, and the output vector incorporates contextual signals with profanity perception into the meme representation; in the second cross-attention layer, the meme representation serves as the query vector, using the profanity-perceived meme representation as the key and value. It should be noted that this implementation is specifically constructed and implemented based on the decontamination reasoning and related equations (18)-(23) in the aforementioned third part, which will not be elaborated here.

[0077] As one possible implementation, step S201, obtaining the label prediction result based on the expected representation, further includes: The label probability distribution of the inference representation is calculated using a classifier, the label probability distribution is normalized, and a label prediction result is generated based on the label probability distribution and the expected representation. It should be noted that this implementation method is specifically constructed and implemented according to the inference classification and related equations (24)-(26) in the fourth part mentioned above, which will not be elaborated here.

[0078] As one possible implementation, step S201 further includes causality loss and classification loss, specifically including: The expected value of the meme representation is estimated using the normalized weighted geometric mean method, and a causal loss function is constructed based on front-door decomposition. The training process uses binary cross-entropy: a classifier based on the meme representation is introduced, and a corresponding binary cross-entropy is constructed to generate the classification loss function; a joint optimization objective is generated based on the binary cross-entropy corresponding to the causal loss function and the binary cross-entropy corresponding to the classification loss function. It should be noted that the construction of the causal loss function includes the following steps: Based on the front-door decomposition and the NWGM approximation, the intervention distribution can be written as:

[0079] in, and For learnable parameters, This represents the expected meme representation using NWGM estimation. Binary cross-entropy is used during training.

[0080] in, This indicates the actual label.

[0081] The construction of the classification loss function includes the following steps: This invention introduces a direct-based Classifier :

[0082] Its corresponding binary cross-entropy is:

[0083] Therefore, a joint optimization objective is generated based on the binary cross-entropy corresponding to the causal loss function and the binary cross-entropy corresponding to the classification loss function. The total loss is...

[0084] in, To balance the hyperparameters of the two loss weights.

[0085] As one possible implementation, step S301 further includes: Given a meme image containing text, and fusing evidence from multiple reasoning sequences, the system filters out reasons consistent with the meme's label to generate an explanation that is both readable and causally consistent. It should be noted that in some embodiments, a visual language model is used based on the reasoning set. With final prediction label Generate natural language explanations to improve the interpretability of model predictions. Specifically, given a meme... Construct Chinese explanation prompts The model then inputs inference sequences and predicted labels into the data, guiding it to generate explanatory text consistent with the predictions. Based on this, the model fuses evidence from multiple inference sequences and filters it to find the most relevant information. Consistent reasoning and the generation of readable and causally consistent explanations enhance the credibility of the detection system.

[0086] To verify the performance of the model of the present invention, the following experiments are provided.

[0087] First, this experiment sets up a dataset and a baseline.

[0088] For the datasets, this invention evaluates unbiased meme detection models on multiple meme benchmarks: HarmC, HarmP, FHM, and ToxicCN-MM. For HarmC and HarmP, they are initially labeled with three tags: very harmful, somewhat harmful, and harmless, and very harmful and somewhat harmful are merged into a single harmful category to conform to the previous binary evaluation. For FHM, the unlabeled test set is manually labeled. For ToxicCN-MM, the first Chinese harmful meme dataset contains 12,000 samples. To preserve the standard training-validation-test split, the training set is divided into 8,400 training instances and 1,200 validation instances, while keeping the original test set unchanged.

[0089] For the baseline, the unbiased meme detection model of the present invention was evaluated against 10 competitors: (1) Text BERT; (2) Image-Region; (3) Late Fusion; (4) MIMBT; (5) VisualBERT COCO; (6) ViLBERT CC; (7) MOMENTA; (8) MaskProp; (9) Pro-Cap; (10) ExplainHM; and accuracy and macro-F1 score were used as evaluation metrics.

[0090] Secondly, the performance of harmful meme detection was evaluated. Table 1 summarizes the harmful meme detection results on four datasets, leading to the following conclusions: (1) The unbiased meme detection model proposed in this invention consistently demonstrates state-of-the-art performance across all metrics and datasets, outperforming the strongest unbiased baseline (ExplainHM) by 2.08%, 0.82%, 2.64%, and 1.81% in Macro-F1 on Harm-C, Harm-P, FHM, and ToxicCN-MM, respectively. This confirms the hypothesis that unbiased methods are severely affected in terms of concealing data bias and demonstrates the effectiveness of the unbiased framework of this invention in mitigating this unobserved bias through front-door adjustment.

[0091] (2) Compared with ExplainHM, the unbiased meme detection model proposed in this invention achieves significantly greater improvements on Harm-C, FHM, and ToxicCN-MM, while achieving relatively small gains on Harm-P. This indicates that Harm-C, FHM, and ToxicCN-MM are more susceptible to hidden data bias, while Harm-P and ExplainHM learn spurious label-specific features during training that do not generalize well to the test set. The comparative model on Harm-P may be attributed to the tendency in the political domain to repeatedly target memes of the same people or policies, thereby introducing spurious relevance in the training and testing splits and correspondingly reducing the obviousness of causal debiasing.

[0092] (3) The multimodal detectors showed superior performance compared to the single-modal counterparts, highlighting the importance of modeling fine-grained cross-modal interactions.

[0093] (4) Among multimodal detectors, those that utilize LLMs to systematically enrich the background context perform better than other baselines, highlighting the potential of LLMs in characterizing potentially harmful users. For example, ExplainHM outperforms MMBT by 19.29%, 9.12%, and 2.75% in Macro-F1 on Harm-C, Harm-P, FHM, and ToxicCN-MM, respectively.

[0094] (5) In the single-modal detector, Image-Region lags behind Text BERT on all metrics and datasets, indicating that textual cues are more important than visual cues in determining the harmfulness of memes. Identifying visual elements in text can carry harmful content that differs from the accompanying text, making plain text methods more prone to bias.

[0095] Table 1: Harmful meme detection results on four datasets, with the best and second-best results highlighted in bold and underline, respectively.

[0096] Furthermore, this experiment included an ablation study. To assess the contribution of the causal intervention module, the front-door adjustment component was removed, i.e., the multimodal meme encoding was directly performed. With reasoning coding After splicing, the data were classified. Table 1 clearly shows that performance decreased significantly after removing the intervention module: Macro-F1 decreased from 88.49% to 83.81% on HarmC, from 91.54% to 84.01% on HarmP, from 75.02% to 68.20% on FHM, and from 81.34% to 77.48% on ToxiCN-MM. These results indicate that front door adjustment plays an irreplaceable role in bias elimination.

[0097] Secondly, a sensitivity analysis was performed in this experiment. Hyperparameters The relative weights of causal loss and classification loss are determined. This invention is tested on four dataset test sets. Perform a grid search. Figure 5 The display shows that when When the value increases, the Macro-F1 initially rises slightly with mild fluctuations, then falls slightly and fluctuates again. This phenomenon reflects the empirical trade-off brought about by front-door adjustment: when... At this time, causal loss dominates the optimization, leading to insufficient learning of discriminative features in the model and making it more prone to overfitting (especially in (extremely small); conversely, when When the value is too large, classification loss dominates, and the model is approximately equivalent to minimizing empirical risk, exposing implicit data bias. Experiments show that on HarmC, HarmP, FHM, and TOXIC-MM, the peak Macro-F1 score is respectively at [insert values ​​here]. Obtained from [location].

[0098] Secondly, interpretability was assessed in this experiment, including both automated and manual evaluations.

[0099] In the automatic evaluation section, traditional metrics are insufficient in assessing the quality of explanations generated by LLM. Previous studies have shown that ChatGPT-based evaluators are highly consistent with expert human evaluators. This invention uses GPT-5-mini to evaluate each explanation across four dimensions: (1) informativeness reflects the breadth of new context or background knowledge introduced; (2) readability represents grammatical correctness and structural clarity; (3) plausibility assesses the logical consistency and validity of the stated arguments; and (4) persuasiveness means the persuasiveness and completeness of the narrative. Quantification was performed on a five-point Likert scale, where 1 represents the lowest and 5 represents the highest achievable quality. Table 2 reports the average scores assigned by GPT-5-mini on the HarmC test set and a portion of the ToxicCN-MM test set (i.e., 1,000 instances were randomly selected for explanations on the CausalHM test set). The results reveal two important findings.

[0100] (1) Consistent with the evaluation of GPT-5-mini, the CausalHM of this invention scores higher than ExplainHM in terms of information content, reasonableness and persuasiveness. This indicates that the method of this invention produces significantly higher quality explanations.

[0101] (2) In terms of readability, CausalHM of this invention performs slightly worse than ExplainHM on both datasets. This gap may be attributed to GPT-5-mini's preference for conciseness. On the English dataset, ExplainHM generates an average of 125.38 words per explanation, while CausalHM generates an average of 253.15 words per explanation. Similarly, on the Chinese dataset, ExplainHM generates an average of 144.31 words per explanation, while CausalHM generates an average of 338.55 words per explanation. These results indicate that the richer detail provided by CausalHM is penalized under consistency-oriented evaluation metrics. Meanwhile, longer explanation length is positively correlated with information content.

[0102]

[0103] Table 2: Automatic evaluation of the interpretation quality of harmful emojis in the HarmC and TOXICN MM datasets using GPT-5-mini.

[0104] In the manual evaluation section, to reduce the burden of manual evaluation, this invention performs manual evaluation on 100 randomly selected samples from each test split (HarmC and ToxicCN-MM). Then, 10 professional language annotators are asked to score the explanations using the metrics used in the automatic evaluation.

[0105] The results of the manual assessment are presented in Table 3, from which two main findings can be drawn: (1) Consistent with the evaluation of GPT-5-mini, the CausalHM of this invention scores higher than ExplainHM in terms of information content, reasonableness and persuasiveness. This indicates that the method of this invention produces significantly higher quality explanations.

[0106] (2) The CausalHM of the present invention is also slightly better than the ExplainHM in terms of readability; its superior logical consistency and persuasiveness make up for the slightly longer explanation length, resulting in an explanation that is easier for commentators to judge.

[0107]

[0108] Table 3: Human assessment results of the interpretation quality of the HarmC and TOXICN-MM datasets.

[0109] Finally, a case study was conducted. Is the CausalHM of this invention effective in mitigating bias? ExplainHM exploits spurious correlations and makes predictions, while the CausalHM of this invention suppresses these shortcuts and makes correct decisions—evidence suggests that front-door adjustment effectively removes embedding bias. Does the inference generated by LLM help identify harmfulness? From the observed interpretations, LLM parametric knowledge accurately explains the multimodal content in the embedding memes. Unlike ExplainHM, CausalHM successfully identified two biased samples in the HarmC dataset. This enables CausalHM to make decisions based on genuine reasons.

[0110] Some embodiments of this application also provide a harmful meme detection and debiasing system based on front-door adjustment, such as... Figure 6 As shown, the system includes: The intervention reasoning module is used to take a meme as a given and input the prompt text into the multimodal visual language large model to obtain harmful or harmless reasoning text. It uses a variety of bundle search to generate a set of heterogeneous reasoning sequences and sequence scores from the reasoning text, and obtains the probability distribution of the reasoning sequence based on the reasoning sequence and the sequence score. An unbiased prediction module is used to extract features from the meme using a multimodal image-text encoder to obtain visual embeddings and text embeddings. The visual embeddings and text embeddings are concatenated and fused to obtain a meme representation to eliminate hidden bias. A pre-trained visual language model is used to encode the inference sequence to obtain an inference representation of the inference sentence context embedding. The meme representation and the inference representation are converted into an expected representation based on two consecutive cross-attention layers, and the label prediction result is obtained based on the expected representation. An explanation generation module is used to generate explanatory descriptions of the harmful meme detection results based on the probability distribution of the inference sequence and the label prediction results using the Big Prophecy model.

[0111] It should be noted that the harmful meme detection and debiasing system based on front-door adjustment of the present invention is implemented in accordance with the steps in the aforementioned harmful meme detection and debiasing method based on front-door adjustment, and will not be described in detail here.

[0112] Some embodiments of this application also provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the methods described above.

[0113] In some embodiments, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the methods described above.

[0114] At the hardware level, the electronic device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it to implement the method described. Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution entity of the following processing flow is not limited to individual logic units, but can also be hardware or logic devices. It is understood that by simply performing some logic programming on the method flow using a hardware description language and programming it into an integrated circuit, the hardware circuit that implements the logical method flow can be obtained.

[0115] The above method can be implemented by a controller in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, microcontrollers. A memory controller can also be implemented as part of the control logic of a memory. It is understood that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, ASICs, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0116] The systems, devices, modules, or units in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, game console, tablet computer, wearable device, or any combination of these devices.

[0117] For ease of description, the above devices are described in terms of function, divided into various modules. Of course, in implementing this specification, the functions of each module can be implemented in one or more software and / or hardware.

[0118] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0119] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0120] In some embodiments, a computer-readable storage medium is also provided, the storage medium storing a computer program that, when executed by a processor, implements the method described in any of the preceding embodiments.

[0121] In some embodiments, these computer program instructions may also be stored in a computer-readable storage medium capable of directing a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means implemented in a process. Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0122] In some embodiments, these computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable apparatus for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0123] In some embodiments, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0124] In some embodiments, memory may include non-persistent memory in a computer-readable medium, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0125] In some embodiments, computer-readable media, including permanent and non-permanent, removable and non-removable media, can be used to store information by any method or technology. The information can be computer-readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0126] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for detecting and removing biased harmful memes based on front-door adjustment, characterized in that, The method includes the following steps: S101, Given a meme, input the prompt text into the multimodal visual language large model to obtain harmful or harmless inference text, use diversified bundle search to generate a set of heterogeneous inference sequences and sequence scores from the inference text, and obtain the probability distribution of the inference sequence based on the inference sequence and the sequence score; S201, a multimodal image-text encoder is used to extract features from the meme to obtain visual embeddings and text embeddings. The visual embeddings and text embeddings are concatenated and fused to obtain a meme representation to eliminate hidden bias. A pre-trained visual language model is used to encode the inference sequence to obtain an inference representation of the inference sentence context embedding. The meme representation and the inference representation are converted into an expected representation based on two consecutive cross-attention layers. The label prediction result is obtained based on the expected representation. S301, using the Big Prophecy model to generate an explanatory description of the harmful meme detection results based on the probability distribution of the inference sequence and the label prediction results.

2. The harmful meme detection and debiasing method based on front-door adjustment according to claim 1, characterized in that, In step S101, a set of heterogeneous inference sequences and sequence scores are generated from the inference text using a diverse beam search. The probability distribution of the inference sequences is obtained based on the inference sequences and the sequence scores. The method further includes: The multimodal large model using diversified beam search generates a set of inference sequences and corresponding sequence scores from the inference text. The intra-group semantic similarity of the inference sequences is suppressed based on explicit penalty redundancy to ensure that the generated inference sequences have high heterogeneity. The probability distribution of the reasoning sequence and its similarity are generated based on the scoring function of the sequence score and the given prompt conditions.

3. The harmful meme detection and debiasing method based on front-door adjustment according to claim 1, in step S201, converting the meme representation and the inference representation into the expected representation based on two consecutive cross-attention layers, further includes: An intervention distribution is generated based on the meme representation and the inference representation, and the expected form of the prediction result is generated based on the label prediction probability estimated by the classifier. The expected form of the prediction result is obtained by solving the normalized weighted geometric mean method.

4. The harmful meme detection and debiasing method based on front-door adjustment according to claim 3 further includes: Latent variables are introduced as alternative distributions of confounding factors, which can encode characteristic representations with confounding awareness.

5. The harmful meme detection and debiasing method based on front-door adjustment according to claim 3, wherein the two consecutive cross-attention layers specifically include: The first cross-attention layer serves as the query vector, using the meme representation as the key and value, and the output vector incorporates contextual signals with promiscuous awareness into the meme representation; In the second cross-attention layer, the meme representation is used as the query vector, and the hybrid perception meme representation is used as the key and value.

6. The harmful meme detection and debiasing method based on front-door adjustment according to claim 3, characterized in that, In step S201, obtaining the label prediction result based on the expected representation further includes: The label probability distribution of the inference representation is calculated using a classifier, the label probability distribution is normalized, and a label prediction result is generated based on the label probability distribution and the expected representation.

7. The harmful meme detection and debiasing method based on front-door adjustment according to claim 3, characterized in that, Step S201 also includes causal loss and classification loss, specifically including: The expected value of meme representation is estimated using the normalized weighted geometric mean method, and a causal loss function is constructed based on the front-door decomposition. Binary cross-entropy is used during training. A meme-based classifier is introduced, and a corresponding binary cross-entropy is constructed to generate a classification loss function; A joint optimization objective is generated based on the binary cross-entropy corresponding to the causal loss function and the binary cross-entropy corresponding to the classification loss function.

8. The harmful meme detection and debiasing method based on front-door adjustment according to claim 1, characterized in that, Step S301 also includes: Given a meme image containing text, and by fusing evidence from multiple reasoning sequences, we can filter out reasons that are consistent with the meme's label to generate an explanation that is both readable and causally consistent.

9. A harmful meme detection and debiasing system based on front-door adjustment, characterized in that, The system includes: The intervention reasoning module is used to take a meme as a given and input the prompt text into the multimodal visual language large model to obtain harmful or harmless reasoning text. It uses a variety of bundle search to generate a set of heterogeneous reasoning sequences and sequence scores from the reasoning text. Based on the reasoning sequences and the sequence scores, it obtains the probability distribution of the reasoning sequences. An unbiased prediction module is used to extract features from the meme using a multimodal image-text encoder to obtain visual embeddings and text embeddings. The visual embeddings and text embeddings are concatenated and fused to obtain a meme representation to eliminate hidden bias. A pre-trained visual language model is used to encode the inference sequence to obtain an inference representation of the inference sentence context embedding. The meme representation and the inference representation are converted into an expected representation based on two consecutive cross-attention layers, and the label prediction result is obtained based on the expected representation. An explanation generation module is used to generate explanatory descriptions of the harmful meme detection results based on the probability distribution of the inference sequence and the label prediction results using the Big Prophecy model.

10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method according to any one of claims 1-8.