SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2401.13298 · 2024

Towards Explainable Harmful Meme Detection through Multimodal Debate between Large Language Models

arXiv · PDF · Open in the Atlas

Code that ran

4 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 3 failures of our instrument; 2 no recorded run), measured 2026-11-23; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2401.13298.json · badge: /api/ran/2401.13298.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
hkbunlp/explainhm-www2024 canonical (classifier label)
classifier basis: census
4 ran · 2 no recorded run
FunctionStatusWhere it lives
all_gather Ran
ran; our contract draft was wrong, not the code
hkbunlp/explainhm-www2024/src/modules/dist_utils.py
code served (permissive licence) · get_code("839a33f049497ac2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.distributed as dist
import functools
import logging
import pickle

torch.manual_seed(0)

# Since distributed training is not initialized in this environment,
# we need to mock the distributed functions or work with what we have.
# The function all_gather will return [data] when world_size == 1,
# so we can safely call it without initializing distributed training.

# Create simple picklable data
data = {
    "tensor": torch.randn(2, 4),
    "list": [1, 2, 3],
    "string": "test"
}

# group parameter - None means it will use _get_global_gloo_group()
# which is designed to handle the case when dist is not initialized
group = None

ARGS = {
    "data": data,
    "group": group,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
check_non_acc_grad Ran
ran, violated the contract we drafted
hkbunlp/explainhm-www2024/src/modules/mm_utils.py
code served (permissive licence) · get_code("92a41a954c7ecb1d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class MockTokenTypeEmbeddings(nn.Module):
    def __init__(self):
        super().__init__()
        self.weight = nn.Parameter(torch.randn(4, 3))

class MockPLModule(nn.Module):
    def __init__(self):
        super().__init__()
        self.token_type_embeddings = MockTokenTypeEmbeddings()

pl_module = MockPLModule()

ARGS = {
    "pl_module": pl_module
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
gather Ran
ran; our contract draft was wrong, not the code
hkbunlp/explainhm-www2024/src/modules/dist_utils.py
code served (permissive licence) · get_code("cc8ab2b168b5373d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.distributed as dist
import logging

torch.manual_seed(0)

# Mock the distributed backend since we're in a single-process environment
# The function checks dist.is_available() and dist.is_initialized()
# We'll set up a minimal mock that returns appropriate values

class MockDistributedBackend:
    def __init__(self):
        self._initialized = False
        self._backend = 'gloo'
        self._world_size = 1
        self._rank = 0
    
    def is_available(self):
        return False
    
    def is_initialized(self):
        return self._initialized
    
    def get_world_size(self, group=None):
        return self._world_size
    
    def get_rank(self, group=None):
        return self._rank
    
    def get_backend(self, group=None):
        return self._backend
    
    def new_group(self, backend=None):
        return None
    
    @property
    def group(self):
        class GroupMock:
            WORLD = None
        return GroupMock()
    
    def all_gather(self, tensor_list, tensor, group=None):
        pass
    
    def gather(self, tensor, tensor_list, dst=0, group=None):
        pass

# Create test data
test_data = {"key": "value", "number": 42, "list": [1, 2, 3]}

# Since the function handles world_size == 1 early return,
# we can pass simple test data without needing actual distributed setup
ARGS = {
    "data": test_data,
    "dst": 0,
    "group": None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
reduce_dict Ran
ran; our contract draft was wrong, not the code
hkbunlp/explainhm-www2024/src/modules/dist_utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from aim-uofa/SINE, is pointer only (licence: NOASSERTION) · get_code("53838c15d969eb79")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from aim-uofa/SINE, and GitHub could not classify the licence of that repository (NOASSERTION). The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

compute_clf Not yet run
unverified (harvested, no recorded run)
hkbunlp/explainhm-www2024/src/modules/objectives.py
code served (permissive licence) · get_code("9472ae65ddd756a4")
How it ran

no invocation recorded.

get_pretrained_tokenizer Not yet run
unverified (harvested, no recorded run)
hkbunlp/explainhm-www2024/src/datamodules/datamodule_base.py
code served (permissive licence) · get_code("fb1f56a05ab8f4eb")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 3 the same month, 3 later) and 3 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
all_gather 16 other papers
13 dated earlier, 1 the same month, 2 later
2108.02833 (2021-08)
Elaborative Rehearsal for Zero-shot Action Recognition
136730727 (2022 (year only))
Self-Supervised Sparse Representation for Video Anomaly Detection
2023.findings-emnlp.644 (2023 (year only))
VIP5: Towards Multimodal Foundation Models for Recommendation
and 13 more not named here
reduce_dict 15 other papers
10 dated earlier, 1 the same month, 4 later
2003.04030 (2020-03)
Learning Delicate Local Representations for Multi-Person Pose Estimation
2004.01946 (2020-04)
Weakly-Supervised Mesh-Convolutional Hand Reconstruction in the Wild
2108.02833 (2021-08)
Elaborative Rehearsal for Zero-shot Action Recognition
and 12 more not named here
gather 14 other papers
11 dated earlier, 1 the same month, 2 later
2108.02833 (2021-08)
Elaborative Rehearsal for Zero-shot Action Recognition
136730727 (2022 (year only))
Self-Supervised Sparse Representation for Video Anomaly Detection
2023.findings-emnlp.644 (2023 (year only))
VIP5: Towards Multimodal Foundation Models for Recommendation
and 11 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

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 age of social media is flooded with Internet memes, necessitating a clear grasp and effective identification of harmful ones. This task presents a significant challenge due to the implicit meaning embedded in memes, which is not explicitly conveyed through the surface text and image. However, existing harmful meme detection methods do not present readable explanations that unveil such implicit meaning to support their detection decisions. In this paper, we propose an explainable approach to detect harmful memes, achieved through reasoning over conflicting rationales from both harmless and harmful positions. Specifically, inspired by the powerful capacity of Large Language Models (LLMs) on text generation and reasoning, we first elicit multimodal debate between LLMs to generate the explanations derived from the contradictory arguments. Then we propose to fine-tune a small language model as the debate judge for harmfulness inference, to facilitate multimodal fusion between the harmfulness rationales and the intrinsic multimodal information within memes. In this way, our model is empowered to perform dialectical reasoning over intricate and implicit harm-indicative patterns, utilizing multimodal explanations originating from both harmless and harmful arguments. Extensive experiments on three public meme datasets demonstrate that our harmful meme detection approach achieves much better performance than state-of-the-art methods and exhibits a superior capacity for explaining the meme harmfulness of the model predictions.

For agents

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

get_harvested_code_for_paper("2401.13298")
get_code_for_paper("2401.13298")
have("2401.13298")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2401.13298.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2401.13298.svg)](https://syntology.ai/paper/2401.13298)

Connect an agent — have() is free.