Spaces:
Running
A newer version of the Streamlit SDK is available: 1.57.0
title: LSR Dashboard
emoji: π‘οΈ
colorFrom: red
colorTo: yellow
sdk: streamlit
sdk_version: 1.39.0
app_file: app.py
pinned: false
LSR Dashboard: Linguistic Safety & Robustness Workbench
Author: Godwin Faruna Abuh
Role: AI Safety Researcher | Senior Applied AI Safety Engineer
π‘οΈ Overview
The LSR Dashboard is a workbench for evaluating Linguistic Safety Decay in Large Language Models. While frontier models exhibit strong safety alignment in English, this robustness often deteriorates in mid/low-resource languages.
This tool provides:
- Cross-lingual red-teaming across Igala, Yoruba, Hausa, and English
- Mechanistic visualization of activation drift
- Empirical loophole detection with session statistics
- Translation verification via Google Translate
π Languages Covered
- Yoruba π³π¬ (5 attack probes)
- Hausa π³π¬ (5 attack probes)
- Igbo π³π¬ (4 attack probes)
- Igala π³π¬ (3 attack probes)
- English π¬π§ (baseline)
Model: Gemini 2.5 Flash (GPT-4 & Claude support planned)
π Key Features
1. Red-Teaming Lab
Side-by-side comparison of English baseline vs target language responses. Automatic loophole detection when English refuses but target language complies.
2. Mechanistic Visualizer
Activation heatmaps and safety centroid drift plots showing how refusal circuits struggle with low-resource syntax.
3. Vulnerability Gallery
Archive of confirmed HIGH/CRITICAL safety failures with empirical findings.
4. Session Analytics
Live tracking with exportable JSON logs for offline analysis.
π Use Case
Demonstrates that frontier models show 2-4x higher bypass rates in mid-low resource languages (Yoruba/Hausa/Igala/Igbo) compared to English.
π Technical Stack
- Python 3.10+ | Streamlit
- Plotly visualizations
- Google Gemini 2.5 Flash API
βοΈ Local Setup
If you want to run this locally instead of using the Hugging Face Space:
# Clone or download this repository
# Install dependencies
pip install streamlit pandas numpy plotly google-generativeai python-dotenv
# Create a .env file and add:
# GEMINI_API_KEY=your_key_here
# Run
streamlit run app.py