Skip to main content

LUP Student Papers

LUND UNIVERSITY LIBRARIES

Content Moderation of Surveillance Search Queries Using Fine-Tuned Generative LLMs

Bakly, Ali LU and Than, Davy (2025) In Master's Theses in Mathematical Sciences FMSM01 20251
Mathematical Statistics
Abstract (Swedish)
We study how small, fine-tuned generative large language models (LLMs) can moderate free-text search queries for surveillance video systems. Four open models, Llama 3.2 1B, Llama 3.2 3B, Qwen 2.5 0.5B, and 1.5 B, are trained on six subtasks: safety judgement, problem detection, target detection, span detection, safety explanation, and rephrase. The training combines a public toxicity set with about 785 000 synthetic examples that cover EU AI Act problem classes.

On a balanced synthetic test set, the generative models match or beat a RoBERTa-Base classifier in safety judgement and show significant gains in the harder problem- and target-detection subtasks; Llama 3.2 1 B lifts macro F1 from 0.56 to 0.72 on target detection. They also show... (More)
We study how small, fine-tuned generative large language models (LLMs) can moderate free-text search queries for surveillance video systems. Four open models, Llama 3.2 1B, Llama 3.2 3B, Qwen 2.5 0.5B, and 1.5 B, are trained on six subtasks: safety judgement, problem detection, target detection, span detection, safety explanation, and rephrase. The training combines a public toxicity set with about 785 000 synthetic examples that cover EU AI Act problem classes.

On a balanced synthetic test set, the generative models match or beat a RoBERTa-Base classifier in safety judgement and show significant gains in the harder problem- and target-detection subtasks; Llama 3.2 1 B lifts macro F1 from 0.56 to 0.72 on target detection. They also show improved performance on span detection and produce short reasons and rephrases, features the classifier cannot offer. On real-world, publicly available, albeit imbalanced data, the results were mixed but still favored the generative LLMs for the more nuanced tasks.

Although the generative models need more memory and inference time, their high performance, richer output, and simple prompt interface make them a promising core for an open, transparent moderation pipeline in video search. Key open issues are speed, subtask consistency, and resistance to adversarial text. (Less)
Please use this url to cite or link to this publication:
author
Bakly, Ali LU and Than, Davy
supervisor
organization
course
FMSM01 20251
year
type
H2 - Master's Degree (Two Years)
subject
publication/series
Master's Theses in Mathematical Sciences
report number
LUTFMS-3528-2025
ISSN
1404-6342
other publication id
2025:E71
language
English
id
9200534
date added to LUP
2025-06-18 12:55:10
date last changed
2025-06-26 14:38:04
@misc{9200534,
  abstract     = {{We study how small, fine-tuned generative large language models (LLMs) can moderate free-text search queries for surveillance video systems. Four open models, Llama 3.2 1B, Llama 3.2 3B, Qwen 2.5 0.5B, and 1.5 B, are trained on six subtasks: safety judgement, problem detection, target detection, span detection, safety explanation, and rephrase. The training combines a public toxicity set with about 785 000 synthetic examples that cover EU AI Act problem classes.

On a balanced synthetic test set, the generative models match or beat a RoBERTa-Base classifier in safety judgement and show significant gains in the harder problem- and target-detection subtasks; Llama 3.2 1 B lifts macro F1 from 0.56 to 0.72 on target detection. They also show improved performance on span detection and produce short reasons and rephrases, features the classifier cannot offer. On real-world, publicly available, albeit imbalanced data, the results were mixed but still favored the generative LLMs for the more nuanced tasks.

Although the generative models need more memory and inference time, their high performance, richer output, and simple prompt interface make them a promising core for an open, transparent moderation pipeline in video search. Key open issues are speed, subtask consistency, and resistance to adversarial text.}},
  author       = {{Bakly, Ali and Than, Davy}},
  issn         = {{1404-6342}},
  language     = {{eng}},
  note         = {{Student Paper}},
  series       = {{Master's Theses in Mathematical Sciences}},
  title        = {{Content Moderation of Surveillance Search Queries Using Fine-Tuned Generative LLMs}},
  year         = {{2025}},
}