lsr-dashboard / README.md
Faruna01's picture
new README update
48bf33a verified

A newer version of the Streamlit SDK is available: 1.57.0

Upgrade
metadata
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