utkarsh-goel-21/misinfo-containment-env
SENTINEL-9: Misinformation Containment Benchmark
  ![Tests]()
An adversarial POMDP benchmark where AI agents must detect, trace, and contain misinformation spreading through simulated social networks. Built for the OpenEnv Global Hackathon.
Why This Environment?
Misinformation containment is a real-world, high-stakes problem faced by platforms, governments, and civil society. This environment simulates the core challenge: an agent operates under partial observability, limited budget, and adversarial pressure from reactive bot networks that evolve in response to the agent's actions.
What makes SENTINEL-9 genuinely hard:
- π Fog-of-war POMDP β Agent only sees nodes it has inspected
- π 5-tier deceptive content β From blatant ALL CAPS to nearly undetectable stealth posts
- π― Brier calibration scoring β Overconfidence on wrong actions = catastrophic quadratic penalty
- π€ Adversarial bot network β Bots evade detection when public outrage rises
- π° Resource management β Limited budget forces strategic action prioritization
- π SIR dynamics β Nodes recover, creating temporal reasoning challenges
- π Dynamic topology β Network structure shifts as users migrate from quarantined nodes
Three Tasks (Easy β Medium β Hard)
Task 1 β Detection (Easy)
Grading: Score = (TPR Γ 0.50) β (FPR Γ 0.20) β (Brier Γ 0.15) + (Efficiency Γ 0.15)
Task 2 β Tracing (Medium)
Grading: Score = (Origin Γ 0.30) + (ChainF1 Γ 0.30) + (Containment Γ 0.20) + (Efficiency Γ 0.10) β (Brier Γ 0.10)
Task 3 β Containment (Hard)
Grading: Score = (Containment Γ 0.25) + (CIB_F1 Γ 0.20) + (Chain Γ 0.15) + (Timing Γ 0.15) + (Budget Γ 0.10) + (Precision Γ 0.05) β (Brier Γ 0.10)
Observation Space (POMDP)
Action Space
Action format:
{
"action_type": "inspect",
"target_node_id": "node_7",
"confidence": 0.75,
"reasoning": "High centrality + infected neighbors suggest early infection"
}Quick Start
# Install
pip install -r requirements.txt
# Run tests
pytest -q
# Start server
uvicorn server.app:app --port 7860
# Run baseline inference
export API_KEY=your_proxy_key
export API_BASE_URL=https://router.huggingface.co/v1
export MODEL_NAME=your_injected_model
python inference.pyPython API
from environment.env import MisinfoEnv
from environment.models import Action, ActionType
env = MisinfoEnv(task_id="task1_detection", seed=42)
obs = env.reset()
# Inspect a flagged node
action = Action(
action_type=ActionType.inspect,
target_node_id=obs.stream_reports[0],
confidence=0.6,
reasoning="Checking flagged node"
)
obs, reward, done, info = env.step(action)
print(f"Brier: {info['brier_this_step']:.3f}")HTTP API
curl -X POST http://localhost:7860/reset \
-H "Content-Type: application/json" \
-d '{"task_id": "task1_detection", "seed": 42}'
curl -X POST http://localhost:7860/step \
-H "Content-Type: application/json" \
-d '{"action_type": "inspect", "target_node_id": "node_0", "confidence": 0.6}'WebSocket
const ws = new WebSocket("ws://localhost:7860/ws");
ws.send(JSON.stringify({command: "reset", task_id: "task1_detection", seed: 42}));
ws.send(JSON.stringify({command: "step", action_type: "inspect", target_node_id: "node_0", confidence: 0.6}));Docker
docker build -t sentinel-9 .
docker run -p 7860:7860 \
-e API_KEY=proxy_key \
-e API_BASE_URL=https://router.huggingface.co/v1 \
-e MODEL_NAME=model_name \
sentinel-9Project Structure
misinfo-env/
βββ openenv.yaml # OpenEnv specification
βββ Dockerfile # Multi-stage Docker build
βββ requirements.txt # Python dependencies
βββ pyproject.toml # Project metadata
βββ inference.py # Baseline LLM agent
βββ baseline_policy.py # Heuristic + proxy-reviewed baseline policy
βββ .env # Environment variables
β
βββ server/
β βββ __main__.py # python -m server
β βββ app.py # FastAPI server (HTTP + WebSocket)
β
βββ environment/
β βββ __init__.py
β βββ env.py # Core environment (POMDP + Brier)
β βββ models.py # Pydantic data models
β βββ scoring.py # Strict (0, 1) score helpers
β βββ graph.py # Social network engine
β βββ spread.py # SIR + LTM spread engine
β βββ tasks/
β β βββ task1_detection.py # Easy: frozen detection
β β βββ task2_tracing.py # Medium: active tracing
β β βββ task3_containment.py # Hard: adversarial containment
β βββ graders/
β βββ grader1.py # Multi-metric detection grader
β βββ grader2.py # GED-based tracing grader
β βββ grader3.py # 7-dimensional containment grader
β
βββ tests/
βββ test_env.py # Environment and grader behavior
βββ test_inference.py # Inference stdout + proxy behavior
βββ test_baseline_policy.py # Baseline policy heuristicsLicense
MIT License
