Hate postings, cyberbullying, and other forms of online attack hit younger people hardest. Studies from Germany and Austria show the 12-to-19 age group is frequently the target of malicious, insulting, demeaning comments — or at least a witness to them. Traditional moderation — deleting comments, blocking users — often falls short: it acts too late or curbs free expression.
That's why the project CounterSpeech – Young People Against Online Hate takes a different route: citizen-generated counter-speech. The idea is to encourage internet users, especially young people, to actively respond to hate. The goal is to increase the visibility and effectiveness of those responses, identify recurring patterns, and even generate context-specific suggestions — on a multimodal level that includes text, images, symbols, and memes.
Project content and method
The interdisciplinary team brings together young people from the target group and experts in computer science, data analysis, and social science. Together we develop data-driven methods to detect and classify successful counter-speech automatically, resting on two methodological pillars:
• Social-science approaches: qualitative content analysis, quantitative statistics, and field research in a purpose-built web environment help identify behavioral patterns, influencing factors (such as education level or gender), and the typical structures of successful counter-speech.
• Machine learning: deep-learning models and multimodal data analysis model language, imagery, and other visual elements, complemented by recommender-system techniques to generate context-specific counter-speech suggestions.
Technical implementation
As in my work on the AniVision project, I developed the core technical infrastructure for CounterSpeech — database, frontend, and backend.
Database and backend
The backend runs on FastAPI, a modern, performant Python framework well suited to RESTful APIs. The central challenge was modeling the deeply hierarchical structure of a social-media platform in a performant MySQL database, with millions of comments stored and queried efficiently in a complex, chained structure.
• Hierarchical data structure: the database had to capture the nested relationships between comments, replies, and threads — at high access volume and minimal latency.
• Performance optimization: through targeted caching, optimized query strategies, and a type-safe TypeORM binding, queries stayed fast even across millions of records.
• User management: a newly focused area was implementing robust user management for a social platform's needs — from registration through to roles and permissions.
Frontend
I built the frontend with Svelte and Tailwind CSS, creating a modern, responsive, user-friendly interface that lets users search, filter, and analyze the database intuitively.
Data acquisition
One particular learning was integrating and continuously acquiring the data. Fetching, processing, and serving it reliably — especially regarding real-time availability and consistent quality — turned out to be enormously challenging.
Challenges and learnings
The build was full of challenges that brought valuable learnings:
• Hierarchical data modeling: mapping the complex, chained structure of a social platform into a relational MySQL database required a thoughtful design balancing flexibility and performance.
• Performance optimization: optimizing queries and efficient caching were decisive for smooth data delivery despite millions of comments.
• User management: building a robust system for managing users was a new challenge requiring deep knowledge of planning and implementing security-critical systems.
• Data acquisition and pipeline: continuously integrating and processing large volumes of data meant building a powerful pipeline — now mature enough that almost the entire team works exclusively through the platform, with real time savings and far less redundant work.
Outlook
CounterSpeech shows how modern technology and interdisciplinary approaches can combine to counter online hate effectively. The platform makes it possible to detect, analyze, and deliberately foster successful counter-speech. With this technical infrastructure, the team has laid a solid foundation for advancing digital humanism and giving young people a voice against online hate. I'm proud to have contributed the database, frontend, and backend — and I'm looking forward to the challenges and developments still to come in this exciting field.