Mejri-Mehdi/Telecom-XAI-Security-Center
GitHub: Mejri-Mehdi/Telecom-XAI-Security-Center
基于 Isolation Forest 和 SHAP 的电信 Web 日志可解释 AI 威胁检测流水线,将异常检测结果转化为人类可读的安全洞察。
Stars: 1 | Forks: 0
# 🛡️ 企业电信 XAI 安全中心
一个旨在保护电信网络基础设施的可解释人工智能 (XAI) 威胁检测 pipeline。该系统使用无监督 **Isolation Forest** 模型对正常运行进行基线评估以检测复杂的异常情况,然后利用 **SHAP (SHapley Additive exPlanations)** 对其进行数学解码,并将其转化为人类可读的威胁情报。
## 🔗 在线部署
生产环境的应用程序已完全部署,可通过 Streamlit Community Cloud 访问:
👉 **[启动企业电信 XAI 安全中心](https://telecom-xai-security-center-h2nvldw84vyk84kcylnvhk.streamlit.app)**
## 🚀 核心功能
* **无监督异常检测:** 利用 Isolation Forest 引擎检测零日威胁、多向量攻击和基础设施异常,无需预先标记的训练数据。
* **可解释 AI (XAI) 核心:** 通过 SHAP 值将 ML 模型复杂的内部决策过程转换为精确的特征归因图表,向分析人员展示*为什么*特定日志条目会被标记。
* **生产级数据 Pipeline:** 内置多阶段特征工程、自动化标签编码以及使用 Scikit-Learn 进行的稳健数据标准化。
* **交互式分析师仪表板:** 一个可快速浏览的视觉指挥中心,允许实时检查异常的 user agent、格式错误的状态码、响应大小变化和地理遥测数据。
## 🏗️ 系统架构与工作流
1. **摄取与清理:** 摄取网络 Web 流量日志,自动清理高复杂度字段,以保持结构性 schema 的完整性。
2. **动态特征工程:** 提取明确的全天时间动态特征,标记自动化的 API 调用,并标准化连续分布(例如,响应时间、错误率)以稳定方差。
3. **Isolation 建模:** 评估连续特征矩阵,以识别在决策树深层中被快速隔离的数据点。
4. **SHAP 解释转换:** 计算被隔离异常值的 Shapley 值,准确量化每个参数对异常分数的具体贡献程度。
5. **UI 渲染:** 使用 Streamlit 和 Matplotlib 直接在 Web 浏览器中构建动态的、交互式的图表。
## 🛠️ 技术栈
* **语言:** Python 3.10+
* **框架:** Streamlit(前端与应用层)
* **机器学习:** Scikit-Learn(Isolation Forest,预处理)
* **模型可解释性:** SHAP
* **数据工程:** Pandas,NumPy
* **可视化:** Matplotlib
## 📸 仪表板与威胁情报可视化
以下是生产环境仪表板和由 XAI pipeline 生成的可视化威胁情报概览:
### 1. 指挥中心与流量基线
Real-time monitoring of telecom web traffic, tracking response codes, request durations, and API endpoints.
### 2. Isolation Forest 异常分布
Outlier detection scoring. Anomalous sessions are mathematically isolated from normal baseline network traffic.
### 3. SHAP 特征归因 (可解释 AI)
XAI in action. SHAP summary plots detailing exactly which specific features (e.g., unusual user agents, specific endpoints, error rates) triggered the security alert.
### 4. 事件响应与遥测数据
Geographic origin mapping, identity indicators, and specific categorical breakdowns for flagged network interactions.
## 📦 项目结构
```
├── Unsupervised Anomaly Detection.ipynb # Core R&D notebook for model prototyping & validation
├── app.py # Main Streamlit web application & compute pipeline
├── requirements.txt # Python dependencies package manifest
├── telecom_web_logs_dataset.csv # Telecom web log dataset used by the pipeline
└── README.md # System documentation
```
Real-time monitoring of telecom web traffic, tracking response codes, request durations, and API endpoints.
### 2. Isolation Forest 异常分布
Outlier detection scoring. Anomalous sessions are mathematically isolated from normal baseline network traffic.
### 3. SHAP 特征归因 (可解释 AI)
XAI in action. SHAP summary plots detailing exactly which specific features (e.g., unusual user agents, specific endpoints, error rates) triggered the security alert.
### 4. 事件响应与遥测数据
Geographic origin mapping, identity indicators, and specific categorical breakdowns for flagged network interactions.
由 Mejri Mehdi 用 ❤️ 和 XAI 构建
标签:Isolation Forest, Kubernetes, SHAP, Streamlit, 可解释AI, 威胁情报, 开发者工具, 异常检测, 电信网络安全, 访问控制, 逆向工具