Real-Time Toxicity Filtering for Open-Source Code Reviews
- URL: http://arxiv.org/abs/2604.08886v1
- Date: Fri, 10 Apr 2026 02:49:09 GMT
- Title: Real-Time Toxicity Filtering for Open-Source Code Reviews
- Abstract summary: ToxiShield is a realtime browser extension that identifies and detoxifies toxic code reviews.<n>The framework comprises three modules: toxicity identification, reasoned multiclass classification, and code review detoxification.
- Score: 1.9500886760872191
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Toxic interactions in open-source software development harm community collaboration. To combat this, we propose ToxiShield, a realtime browser extension that identifies and detoxifies toxic code reviews. The framework comprises three modules: toxicity identification, reasoned multiclass classification, and code review detoxification. Our fine-tuned BERT-based binary classifier achieved a 97% F1-score on 38,761 code review texts. For multiclass classification, Claude 3.5 Sonnet with prompt engineering achieved a 39% MCC and 42% F1 on 1,200 samples. Finally, our fine-tuned Llama 3.2 detoxification model reached 95.27% style transfer accuracy, 97.03% fluency, 67.07% content preservation, and an 84% J-score. Validation with 10 software developers suggests ToxiShield effectively fosters a more inclusive open-source environment.
Related papers
- CodePoisonRAG: Knowledge Poisoning Attacks on Retrieval-Augmented Code Generation [47.354635260745134]
We introduce CodePoisonRAG, a targeted upstream knowledge-poisoning framework that transforms benign fixed-code entries into poisoned artifacts.<n>We construct 85 poisoned artifacts covering ten CWE classes across Java and C, yielding an aggregate corpus-poisoning ratio of 0.7%.
arXiv Detail & Related papers (2026-09-02T16:11:01Z) - A Principled Framework for Safe Algorithm Updates in Automated Insulin Delivery Systems [0.1915630210833957]
Our framework classifies bugs and evaluates the clinical equivalence of AID system software updates.<n>It is system-agnostic and applicable to all widely used OS-AID systems.
arXiv Detail & Related papers (2026-06-11T20:18:13Z) - Separating Secrets from Placeholders: A Hybrid CNN-CodeBERT Framework for Three-Class Credential Leakage Detection [3.853925623717688]
Credential leakage in public source code repositories poses a critical security threat.<n>We propose a three-class classification framework that explicitly models placeholder or weak credentials as a distinct class.<n>We evaluate our approach on a newly constructed dataset of 9,426 samples spanning 10 programming languages.
arXiv Detail & Related papers (2026-05-29T16:36:20Z) - How Far Is Document Parsing from Solved? PureDocBench: A Source-TraceableBenchmark across Clean, Degraded, and Real-World Settings [56.70440596502351]
The past year has seen over 20 open document parsing models, yet benchmarks almost exclusively on OmniDocBench.<n>We present PureDocBench, a benchmark thatrenders document images from HTML/CSS, covering 10 domains, 66 pages, and 1,475 pages.
arXiv Detail & Related papers (2026-05-08T09:30:31Z) - Detoxification for LLM: From Dataset Itself [69.09071947137926]
Existing detoxification methods for large language models mainly focus on post-training stage or inference time, while few tackle the source of toxicity, namely, the dataset itself.<n>We attempt to detoxify directly on raw corpora with SoCD (Soft Contrastive Decoding), which guides an LLM to localize and rewrite toxic spans in raw data while preserving semantics.<n>On GPT2-XL, HSPD attains state-of-the-art detoxification, reducing Toxicity Probability (TP) from 0.42 to 0.18 and Maximum Expected Toxicity (EMT) from 0.43 to 0.20.
arXiv Detail & Related papers (2026-04-21T06:12:29Z) - ToxiShield: Promoting Inclusive Developer Communication through Real-Time Toxicity Filtering [1.9500886760872191]
ToxiShield is a browser extension for GitHub pull requests built using three modules.<n>Toxicity Filter -- to identify whether a text is toxic, Communication coach -- to facilitate just-in-time fine-grained toxicity categorization, and The Reframer -- that generates a revised, constructive alternative.<n>We trained and evaluated multiple deep learning and Large Language Models to identify the best choice for each module.
arXiv Detail & Related papers (2026-04-15T20:46:40Z) - Credential Leakage in LLM Agent Skills: A Large-Scale Empirical Study [51.717224133855886]
Third-party skills extend LLM agents with powerful capabilities but often handle sensitive credentials in privileged environments.<n>We analyze 17,022 skills (sampled from 170,226 on SkillsMP) using static analysis, sandbox testing, and manual inspection.<n>We identify 520 vulnerable skills with 1,708 issues and derive a taxonomy of 10 leakage patterns (4 accidental and 6 adversarial)
arXiv Detail & Related papers (2026-04-03T14:50:16Z) - CVE-Factory: Scaling Expert-Level Agentic Tasks for Code Security Vulnerability [50.57373283154859]
We present CVE-Factory, the first multiagent framework to achieve expert-level quality in automatically transforming vulnerability tasks.<n>It is also evaluated on the latest realistic vulnerabilities and achieves a 66.2% verified success.<n>We synthesize over 1,000 executable training environments, the first large-scale scaling of agentic tasks in code security.
arXiv Detail & Related papers (2026-02-03T02:27:16Z) - Projecting Out the Malice: A Global Subspace Approach to LLM Detoxification [73.77171973106567]
Large language models (LLMs) exhibit exceptional performance but pose inherent risks of generating toxic content.<n>Traditional methods fail to eliminate underlying toxic regions in parameters, leaving models vulnerable to adversarial attacks.<n>We propose GLOSS, a lightweight method that mitigates toxicity by identifying and eliminating this global subspace from FFN parameters.
arXiv Detail & Related papers (2026-01-09T09:34:53Z) - Adaptive Detoxification: Safeguarding General Capabilities of LLMs through Toxicity-Aware Knowledge Editing [49.85884082568318]
ToxEdit is a toxicity-aware knowledge editing approach.<n>It dynamically detects toxic activation patterns during forward propagation.<n>It then routes computations through adaptive inter-layer pathways to mitigate toxicity effectively.
arXiv Detail & Related papers (2025-05-28T12:37:06Z) - BountyBench: Dollar Impact of AI Agent Attackers and Defenders on Real-World Cybersecurity Systems [62.17474934536671]
We introduce the first framework to capture offensive and defensive cyber-capabilities in evolving real-world systems.<n>To capture the vulnerability lifecycle, we define three task types: Detect (detecting a new vulnerability), Exploit (exploiting a specific vulnerability), and Patch (patching a specific vulnerability)<n>We evaluate 8 agents: Claude Code, OpenAI Codex CLI with o3-high and o4-mini, and custom agents with o3-high, GPT-4.1, Gemini 2.5 Pro Preview, Claude 3.7 Sonnet Thinking, and DeepSeek-R1.
arXiv Detail & Related papers (2025-05-21T07:44:52Z) - The Landscape of Toxicity: An Empirical Investigation of Toxicity on GitHub [3.0586855806896054]
profanity is the most frequent toxicity on GitHub, followed by trolling and insults.<n>Corporate-sponsored projects are less toxic, but gaming projects are seven times more toxic than non-gaming ones.<n> OSS contributors who have authored toxic comments in the past are significantly more likely to repeat such behavior.
arXiv Detail & Related papers (2025-02-12T09:24:59Z) - Unveiling the Implicit Toxicity in Large Language Models [77.90933074675543]
The open-endedness of large language models (LLMs) combined with their impressive capabilities may lead to new safety issues when being exploited for malicious use.
We show that LLMs can generate diverse implicit toxic outputs that are exceptionally difficult to detect via simply zero-shot prompting.
We propose a reinforcement learning (RL) based attacking method to further induce the implicit toxicity in LLMs.
arXiv Detail & Related papers (2023-11-29T06:42:36Z) - ToxiSpanSE: An Explainable Toxicity Detection in Code Review Comments [4.949881799107062]
ToxiSpanSE is the first tool to detect toxic spans in the Software Engineering (SE) domain.
Our model achieved the best score with 0.88 $F1$, 0.87 precision, and 0.93 recall for toxic class tokens.
arXiv Detail & Related papers (2023-07-07T04:55:11Z) - Interpretable Multi Labeled Bengali Toxic Comments Classification using
Deep Learning [0.0]
We have prepared a manually labeled dataset consisting of 16,073 instances among which 8,488 are Toxic.
Any toxic comment may correspond to one or more of the six toxic categories - vulgar, hate, religious, threat, troll, and insult simultaneously.
To explain the predictions and interpret the word feature importance during classification by the proposed models, we utilized Local Interpretable Model-Agnostic Explanations (LIME) framework.
arXiv Detail & Related papers (2023-04-08T19:28:26Z) - Automated Identification of Toxic Code Reviews: How Far Can We Go? [7.655225472610752]
ToxiCR is a supervised learning-based toxicity identification tool for code review interactions.
ToxiCR significantly outperforms existing toxicity detectors on our dataset.
arXiv Detail & Related papers (2022-02-26T04:27:39Z) - Lone Pine at SemEval-2021 Task 5: Fine-Grained Detection of Hate Speech
Using BERToxic [2.4815579733050153]
This paper describes our approach to the Toxic Spans Detection problem.
We propose BERToxic, a system that fine-tunes a pre-trained BERT model to locate toxic text spans in a given text.
Our system significantly outperformed the provided baseline and achieved an F1-score of 0.683, placing Lone Pine in the 17th place out of 91 teams in the competition.
arXiv Detail & Related papers (2021-04-08T04:46:14Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.