We lifted 9 functions out of this paper's own repositories and ran 7 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.
| Repository | Role | Ran |
|---|---|---|
| social-ai-studio/mod_hate | canonical | 7 of 9 |
| Function | Status | Where it lives |
|---|---|---|
| load_json | Ran | social-ai-studio/mod_hate/src/few_hm_dataset.py pointer only (licence: NONE) · get_code("c210122e3d082656") |
| load_json | Ran | social-ai-studio/mod_hate/src/hfm_gen_eval.py pointer only (licence: NONE) · get_code("818b40c2877e8a52") |
| load_pkl | Ran | social-ai-studio/mod_hate/src/few_hm_dataset.py pointer only (licence: NONE) · get_code("8324318c7428d828") |
| process_data | Ran | social-ai-studio/mod_hate/src/few_hm_dataset.py pointer only (licence: NONE) · get_code("e345317f9c11363f") |
| process_data | Ran | social-ai-studio/mod_hate/src/hm_dataset.py pointer only (licence: NONE) · get_code("004ad8da346b2949") |
| read_json | Ran | social-ai-studio/mod_hate/src/gen_dataset.py pointer only (licence: NONE) · get_code("e08fac5d795bf1c2") |
| read_jsonl | Ran | social-ai-studio/mod_hate/src/gen_dataset.py pointer only (licence: NONE) · get_code("93b9095b31acfe8e") |
| compute_auc_score | Not yet run | social-ai-studio/mod_hate/src/hfm_gen_eval.py pointer only (licence: NONE) · get_code("1119482833222df5") |
| evaluate | Not yet run | social-ai-studio/mod_hate/src/interp_gen_eval.py pointer only (licence: NONE) · get_code("5d4ee8f67012b321") |
Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.
In this paper, we address the challenge of detecting hateful memes in the low-resource setting where only a few labeled examples are available. Our approach leverages the compositionality of Low-rank adaptation (LoRA), a widely used parameter-efficient tuning technique. We commence by fine-tuning large language models (LLMs) with LoRA on selected tasks pertinent to hateful meme detection, thereby generating a suite of LoRA modules. These modules are capable of essential reasoning skills for hateful meme detection. We then use the few available annotated samples to train a module composer, which assigns weights to the LoRA modules based on their relevance. The model's learnable parameters are directly proportional to the number of LoRA modules. This modularized network, underpinned by LLMs and augmented with LoRA modules, exhibits enhanced generalization in the context of hateful meme detection. Our evaluation spans three datasets designed for hateful meme detection in a few-shot learning context. The proposed method demonstrates superior performance to traditional in-context learning, which is also more computationally intensive during inference.We then use the few available annotated samples to train a module composer, which assigns weights to the LoRA modules based on their relevance. The model's learnable parameters are directly proportional to the number of LoRA modules. This modularized network, underpinned by LLMs and augmented with LoRA modules, exhibits enhanced generalization in the context of hateful meme detection. Our evaluation spans three datasets designed for hateful meme detection in a few-shot learning context. The proposed method demonstrates superior performance to traditional in-context learning, which is also more computationally intensive during inference.
The same record, over MCP at https://syntology.ai/mcp:
get_harvested_code_for_paper("2402.11845")
get_code_for_paper("2402.11845")
have("2402.11845")
Connect an agent — have() is free.