|
|
--- |
|
|
license: mit |
|
|
task_categories: |
|
|
- image-classification |
|
|
- text-classification |
|
|
- fill-mask |
|
|
- image-text-to-text |
|
|
tags: |
|
|
- ocr |
|
|
- homoglyphs |
|
|
- emnist |
|
|
- security |
|
|
- adversarial-defense |
|
|
pretty_name: HEMNIST (Homoglyphed-EMNIST) |
|
|
size_categories: |
|
|
- 10K<n<100K |
|
|
--- |
|
|
|
|
|
# HEMNIST: Lightweight Language Agnostic Data Sanitization Pipeline |
|
|
|
|
|
This repository contains the dataset and documentation for the paper **"Lightweight Language Agnostic Data Sanitization Pipeline for Dealing with Homoglyphs in Code-Mixed Languages"**. |
|
|
|
|
|
It introduces **HEMNIST**, an extended version of the EMNIST dataset designed to train models to recognize and sanitize homoglyph attacks (characters that look identical but have different encodings) often used to evade hate speech detection. |
|
|
|
|
|
## 📝 Table of Contents |
|
|
- [Dataset Description](#dataset-description) |
|
|
- [The Pipeline](#the-pipeline) |
|
|
- [Performance Metrics](#performance-metrics) |
|
|
- [Visual Examples](#visual-examples) |
|
|
- [External Resources](#external-resources) |
|
|
- [Citation](#citation) |
|
|
|
|
|
--- |
|
|
|
|
|
## 📊 Dataset Description |
|
|
|
|
|
With the rise in hate speech on social media, numerous NLP techniques have been employed to detect toxicity. However, malicious actors have started employing **homoglyphs**—characters that look identical to standard characters but possess different Unicode encodings or structures—to evade detection. Most NLP models, trained on commonly recognized Unicode characters, fail to detect these adversarial perturbations. |
|
|
|
|
|
**HEMNIST (Homoglyphed-EMNIST)** is an image dataset created to address this. It extends the classic EMNIST dataset by including images of homoglyphs, enabling the training of Optical Character Recognition (OCR) models capable of distinguishing between standard characters and their homoglyph equivalents. |
|
|
|
|
|
* **Original Paper:** [Springer Link](https://link.springer.com/chapter/10.1007/978-3-031-58495-4_11) |
|
|
* **Authors:** Mohammad Yusuf Jamal Aziz Azmi, Subalalitha Chinnaudayar Navaneethakrishnan |
|
|
* **Publisher:** Springer Nature Switzerland |
|
|
|
|
|
--- |
|
|
|
|
|
## 🛠 The Pipeline |
|
|
|
|
|
The paper proposes a novel lightweight, language-agnostic data sanitization pipeline aimed at retrieving de-homoglyphed sentences from attacked text. The pipeline consists of three stages: |
|
|
|
|
|
1. **CNN (Character Level OCR):** Trained on HEMNIST to identify characters visually. |
|
|
2. **Symspell Algorithm:** Used for candidate word generation. |
|
|
3. **N-grams:** Used for word retrieval to reconstruct the sanitized sentence. |
|
|
|
|
|
 |
|
|
|
|
|
--- |
|
|
|
|
|
## 📈 Performance Metrics |
|
|
|
|
|
The proposed pipeline achieves high similarity between the original text and the retrieved (sanitized) text across various levels of masking (homoglyph injection). |
|
|
|
|
|
| Masking Percentage | Cosine Similarity | |
|
|
| :--- | :--- | |
|
|
| **5%** | 0.922 | |
|
|
| **10%** | 0.845 | |
|
|
| **20%** | 0.671 | |
|
|
| **30%** | 0.508 | |
|
|
| **50%** | 0.231 | |
|
|
|
|
|
--- |
|
|
|
|
|
## 🖼 Visual Examples |
|
|
|
|
|
Below is a grid view of the **HEMNIST** dataset, showing the visual similarities between standard characters and the homoglyphs included in the training set. |
|
|
|
|
|
 |
|
|
|
|
|
--- |
|
|
|
|
|
## 🔗 External Resources |
|
|
|
|
|
* **Code Repository:** [GitHub - SPELLL 2023](https://github.com/ya0002/SPELLL_2023_Light_weight_data_sanitization_homoglyphs) |
|
|
|
|
|
|
|
|
--- |
|
|
|
|
|
## 📚 Citation |
|
|
|
|
|
If you use this dataset or pipeline in your research, please cite the following publication: |
|
|
|
|
|
```bibtex |
|
|
@inproceedings{azmi2024lightweight, |
|
|
title={Lightweight Language Agnostic Data Sanitization Pipeline for Dealing with Homoglyphs in Code-Mixed Languages}, |
|
|
author={Azmi, Mohammad Yusuf Jamal Aziz and Navaneethakrishnan, Subalalitha Chinnaudayar}, |
|
|
booktitle={Speech and Language Technologies for Low-Resource Languages}, |
|
|
publisher={Springer Nature Switzerland}, |
|
|
year={2024}, |
|
|
url={[https://link.springer.com/chapter/10.1007/978-3-031-58495-4_11](https://link.springer.com/chapter/10.1007/978-3-031-58495-4_11)} |
|
|
} |
|
|
|
|
|
|
|
|
|