MineTechnology - Isotipo

Education and research · La Rioja

UNIR

Cyberbullying detection in student texts with NLP

The client

UNIR – Universidad Internacional de La Rioja is an online university with its own research activity. We worked with their research team on the engineering side: turning a research hypothesis into language models that are trained, evaluated and reproducible. They brought the theoretical framework on cyberbullying and the text corpus; we made the models work and the results hold up.

The challenge

The research team wanted to know whether, from texts written in Spanish by students, it is possible to predict their involvement in cyberbullying situations and the role each one plays. The problem is delicate on two counts: the texts come from minors, so data handling has to be impeccable, and the classes are heavily imbalanced — there are far more texts without signal than with it — which makes it easy to build a model that looks accurate while actually distinguishing nothing. There is also the subtlety of the signal: cyberbullying rarely appears explicitly in the text, and a student may write about what is happening to them without ever naming it.

What we did

We fine-tuned language models on the Spanish-language text corpus and, on top of their outputs, added a classic classification layer with voting (ensemble) to predict involvement and role: cyberbully, cybervictim or cyberbystander. The combination is deliberate: the language model brings the understanding of the text, while the voting layer stabilises the final decision, which is where class imbalance does the most damage. We paid particular attention to methodology — train/test separation, validation and metrics suited to that imbalance — so the results would hold up in an academic setting and not just look good on paper.

Technologies

Python · PyTorch · Transformers · Fine-tuning · Spanish-language NLP · Ensemble · Cross-validation

Result

UNIR has a classifier that assigns the role in cyberbullying situations from the text, with evaluated and reproducible results. It supports their research and opens the door to early detection in educational settings — always as an aid to a professional's decision, never as an automatic verdict: what it offers is a flag on a text, not a label on a person.