Hate speech detection in low-resource, code- mixed languages is a challenging task as people often switch between scripts and languages in a single post. Code-Mixed scripts can take the form of explicit slurs, subtle insults, or frag- mented abuse, and is often hidden by spelling variants and Romanized script.
# FLAICOL: Flip-Point-Led Augmentation for Imbalanced Code-Mixed Offensive Language Detection
This repository contains the implementation of **FLAICOL**, a flip-point-led augmentation framework for low-resource, code-mixed offensive language detection, as described in the accompanying anonymous ACL submission.
FLAICOL addresses severe class imbalance in code-mixed hate speech datasets by generating minimal boundary-crossing examples in embedding space and using them to augment the minority class.
---
## 1. Overview
Hate speech detection in code-mixed Indian languages (Tamil–English, Malayalam–English, Kannada–English) presents three key challenges:
* Script mixing (native + Romanized)
* Orthographic variation
* Severe minority-class imbalance
FLAICOL introduces a flip-point-based augmentation framework that:
1. Fine-tunes a Transformer classifier.
2. Identifies near-boundary examples.
3. Performs embedding-space search under a bias-homotopy continuation strategy.
4. Maps continuous embedding perturbations back to discrete tokens.
5. Validates flips under the original classifier.
6. Augments minority-class samples.
7. Retrains the classifier and evaluates performance gains.
---
## 2. Method Summary
FLAICOL adapts the flip-point and homotopy framework introduced by Yousefzadeh & O’Leary to pretrained Transformer classifiers.
For an input predicted as class *i*:
* A target class *j* is selected (typically highest competing logit).
* A minimal bias perturbation is solved via constrained optimization.
* Bias is interpolated back toward original parameters.
* At each step, embedding-space search identifies small semantic perturbations.
* The resulting embedding is mapped to discrete tokens via nearest-neighbor lookup.
* Only validated boundary-crossing flips are retained.
The final augmented examples are appended to the training set.
---
## 3. Models Used
Two encoder backbones were evaluated:
* **XLM-RoBERTa-base**
* **MuRIL-base**
Both were fine …