โ๏ธWarning: this document contains content that may be offensive or upsetting.
KOTOX, the first Korean dataset for deobfuscation and detoxification, was built using linguistically grounded transformation rules to handle obfuscated toxic expressions.
KOTOX is the first Korean dataset designed for deobfuscation and detoxification of toxic language. Built from linguistically grounded transformation rules, it introduces obfuscated instances to model how users disguise offensive expressions in Korean.
Unlike previous datasets that focus mainly on English or clean toxic text, KOTOX captures diverse obfuscation patterns specific to Hangul and Korean phonology, such as phonological, iconological, transliteration-based, syntactic, and pragmatic variations.
It supports three complementary tasksโobfuscated toxic text classification, neutral text deobfuscation, and toxic text sanitizationโproviding a unified benchmark to evaluate the robustness of language models against obfuscated toxic content and to advance safer language technologies for low-resource languages.
The dataset enables three complementary tasks:
- ๐ง Obfuscated Toxic Text Classification
- Classify whether an obfuscated sentence is toxic or neutral.
- ๐ค Neutral Text Deobfuscation
- Restore an obfuscated neutral sentence to its original, clean form.
- ๐งผ Obfuscated Toxic Text Sanitization
- Rewrite obfuscated toxic text into a deobfuscated, neutral sentence while preserving meaning.
KOTOX defines 17 transformation rules across 5 linguistic approaches, based on Korean linguistic properties.
| Approach | Transformation rule | Example |
|---|---|---|
| Phonological | Initial consonant repacement | ํ๊ตญ์ธ โ ํ๊พน์ธ |
| Medial vowel replacement | ํด์์์ฅ โ ํค์์์ฅ | |
| Final consonant replacement | ํ๊ตญ์ธ โ ํ๊ตฎ์น | |
| Ortographic reyllabification | ํ๊ตญ์ธ โ ํ๊ตฌ๊ธด | |
| Initial consonant insertion | ํ๊ตญ์ธ โ ํ๊ตญ๊ธด | |
| Medial vowel insertion | ํ๊ตญ์ธ โ ํ๊ถ์ | |
| Final consonant insertion | ๋ฐ๊นฅ โ ๋ฐ๊นฅ | |
| Liaison | ํ ์ง์ด๊ฐ โ ํ ์ฐ์๊ฐ | |
| Iconological | Hangeul look-alike | ๊ท์ฝ๋ค โ ์ปค์ฝ๋ค |
| Cross-script substitution | ์ญ๊พธ๋ฏธ โ ๅ๊พธๅฃI | |
| Rotation-based variation | ๋ ผ๋ฌธ โ ๊ณฐ๊ตญ | |
| Transliteration | Phonetic substitution (Latin) | ๋งํ์ด โ mangํ์ด |
| Phonetic substitution (CJK) | ์์ํด โ ๆฐด์ํด | |
| Semantic substitution | ๊ฐ์ง๋ง์ธ์ โ ๋ํธ๊ณ ์ฟ ๋ค์ฌ์ด | |
| Syntactic | Spacing perturbation | ํ์ฅ์ค ๋๋ฝ๊ณ ๋ณ๋ก โ ํ์ฅ ์ค๋๋ฝ ๊ณ ๋ณ๋ก |
| Syllable anagram | ์ค๋๋ง์ ์ธ๊ตญ์ฌํ์ โ ์ค๋ง๋์ ์ธ์ฌ๊ตญํ์ | |
| Pragmatic | Symbol/emoji insertion | ๋์ ์ฐ๋ ํธ๊ฐฑ โ ๋์ยฐโก ์ฐ๋ใํธ..๊ฐฑใโฅใ โค |
- Started from K/DA - 7.5k Korean neutral-toxic sentence pairs
- After manual filtering by annotators โ 2,294 high-quality pairs selected as source data
- Applied transformation rules to both neutral and toxic sides of each pair
- Used an alogorithm to sample and apply 2-4 rules per text, depending on difficulty
Easy: 2 rules
Normal: 3 rules
Hard: 4 rules
- Final dataset: 6.9k neutral-toxic-pairs + corresponding obfuscated counterparts
- Split into train/validation/test = 8:1:1 ratio for each difficulty level
| Dataset | train | valid | test | sum |
|---|---|---|---|---|
| easy | 1,835 | 229 | 230 | 2,294 |
| normal | 1,835 | 229 | 230 | 2,294 |
| hard | 1,835 | 229 | 230 | 2,294 |
| total | 5,505 | 687 | 690 | 6,882 |
โโโ data
โโโ KOTOX
โ โโโ easy
โ โโโ normal
โ โโโ hard
โ โโโ total
โโโ KOTOX_classification
โโโ easy
โโโ normal
โโโ hard
โโโ totalKOTOX: for obfuscation and detoxification, ๐ค huggingface-KOTOX
KOTOX_classification: for toxic hate speech detection, ๐ค huggingface-KOTOX-classification
Install the necessary dependencises using the provided requirements
$ pip install -r requirements.txtAdd .env file for using OpenAI API
OPENAI_API_KEY= <Your OpenAPI Key>Git colne G2P
$ git clone https://github.com/seongmin-mun/KoG2Padvanced.git$ python augmentation.pyModify the classification/train_config.py file.
$ cd classification
$ python train.pyModify the classification/eval_config.py file.
$ cd classification
$ python eval.pyModify the finetuning/train_examples.sh file.
$ chmod+x finetuning/train_examples.sh
$ ./train_examples.sh@misc{lee2025kotoxkoreantoxicdataset,
title={KOTOX: A Korean Toxic Dataset for Deobfuscation and Detoxification},
author={Yejin Lee and Su-Hyeon Kim and Hyundong Jin and Dayoung Kim and Yeonsoo Kim and Yo-Sub Han},
year={2025},
eprint={2510.10961},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2510.10961},
}