Skip to content

Latest commit

ย 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

NetFaultAI โšก

Automated End-to-End Network Fault Isolation for TANFINET BharatNet

Python 3.10+ License: MIT Tests: 13/13 Passing Mininet

TANFINET Hackathon Submission โ€” Problem Statement #2: End-to-End Network Fault Localization
Solving the 2-6 hour manual fault investigation bottleneck with AI-powered automation in <60 seconds.


๐ŸŽฏ Problem Statement

Current Process (2-6 hours):

  1. NOC engineer receives customer complaints
  2. Manually correlates syslog messages
  3. Manually checks SNMP metrics across devices
  4. Identifies root cause device
  5. Separately calculates affected customers
  6. Manually routes ticket to correct team

Our Solution (<60 seconds): Fully automated AI pipeline that detects, diagnoses, localises, and routes faults with customer impact calculation โ€” all in a single workflow.


๐Ÿ† Novel Contributions

1. Automated Blast Radius with Geographical Intelligence

No existing tool combines fault detection AND customer impact calculation in one automated workflow. NetFaultAI:

  • โœ… Detects faults across 6 signature types (NLP + Anomaly Detection)
  • โœ… Localises root cause device using graph topology
  • โœ… Calculates blast radius automatically (customers affected downstream)
  • โœ… Maps geographical impact (radius in km, area in kmยฒ)
  • โœ… Routes tickets automatically (field dispatch vs remote NOC)
  • โœ… Displays on GIS map with real GPS coordinates

2. Live Mininet Digital Twin (Phase 3 Enterprise)

A virtualised replica of the Puducherry BharatNet 4-tier hierarchy running inside Mininet โ€” enabling real network interface faults to be injected, scraped, and fed directly into the AI pipeline:

  • โœ… Real kernel-level faults via ip link set down / tc netem
  • โœ… Live SNMP-style telemetry scraped from Mininet interfaces โ†’ CSV
  • โœ… Bidirectional: dashboard injects faults โ†’ Mininet executes them โ†’ telemetry feeds back to AI
  • โœ… Topology manifest auto-generated on start (maps canonical names โ†” Linux interfaces)

Time Savings: 2-6 hours โ†’ <60 seconds (99.7% reduction)


๐Ÿ“Š System Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                     INPUT LAYER                                 โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  Syslog Messages             โ”‚  SNMP Metrics                   โ”‚
โ”‚  (Simulated / Live Mininet)  โ”‚  (CPU/Memory/Bandwidth/Loss)    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚                              โ”‚
               โ–ผ                              โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   NLP Engine (40%)     โ”‚    โ”‚ Anomaly Engine (40%)   โ”‚
โ”‚  distilBERT + Regex    โ”‚    โ”‚  Isolation Forest      โ”‚
โ”‚  6-class classifier    โ”‚    โ”‚  SNMP outlier detect   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
             โ”‚                              โ”‚
             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                        โ”‚
                        โ–ผ
             โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
             โ”‚  Fusion Engine      โ”‚
             โ”‚  (Weighted voting)  โ”‚
             โ”‚  Context: 20%       โ”‚
             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                        โ”‚
         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
         โ”‚              โ”‚              โ”‚
         โ–ผ              โ–ผ              โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ OSI Mapper  โ”‚  โ”‚Blast Radius โ”‚  โ”‚ GIS Engine  โ”‚
โ”‚ Layer 1-7   โ”‚  โ”‚ Geographicalโ”‚  โ”‚ Folium Map  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜
       โ”‚                โ”‚                โ”‚
       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                        โ”‚
                        โ–ผ
             โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
             โ”‚  Ticket Router      โ”‚
             โ”‚  Field / NOC L2     โ”‚
             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                        โ”‚
                        โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    6-PAGE DASHBOARD                             โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  1. AI Analysis          2. NOC Operations    3. Complaint      โ”‚
โ”‚  4. Live Feed            5. Executive SLA     6. Field Engineer โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ–ฒ                              โ–ฒ
         โ”‚     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
         โ””โ”€โ”€โ”€โ”€โ”€โ”‚  Mininet Digital   โ”‚โ”€โ”€โ”€โ”˜
               โ”‚  Twin (WSL/Linux)  โ”‚
               โ”‚  telemetry_agent   โ”‚
               โ”‚  fault_controller  โ”‚
               โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Key Features

1. 6 Fault Signature Detection

Fault Type OSI Layer Detection Method Time to Detect
Voltage Issue L1 Physical Battery/UPS alarms + 0% bandwidth <50ms
Hardware Defect L1 Physical SFP/laser failure (dBm readings) <50ms
Traffic Congestion L3 Network QoS drops + 99% bandwidth <50ms
Latency Degradation L1 Physical RTT spikes + micro-bending <50ms
Connection Issue L1+L3 BGP drops + fiber cuts (LOS) <50ms
Legacy Bottleneck L2 Data Link 99% CPU/Memory + low throughput <50ms

2. Multi-Stream AI Fusion

Unified Confidence = (NLP ร— 0.40) + (Anomaly ร— 0.40) + (Context ร— 0.20)
  • NLP Engine: distilBERT fine-tuned (92%+ accuracy) + regex fallback (90%+)
  • Anomaly Engine: Isolation Forest on SNMP metrics
  • Context Engine: Blast radius severity + node criticality

3. Concurrent Multi-Fault (Phase 2 Enterprise)

The system handles simultaneous faults across multiple nodes:

  • Incident Ledger: UUID-tagged verdict store, last 20 incidents, OPEN/RESOLVED states
  • Multi-Polygon GIS: Each concurrent incident rendered as a separate colour-coded blast zone
  • Topology Clustering: BHQ nodes with >10 offline GPs collapse into a single "Nx GP OFFLINE" cluster node
  • Bounding-box Zoom: Map auto-zooms to fit all concurrent fault locations
  • Webhook Boilerplate: ServiceNow + Grafana integration stubs (commented, production-ready)

4. Geographical Blast Radius

Fault at BHQ-KARAIKAL:
  โ€ข 28 villages affected
  โ€ข 14.03 km radius
  โ€ข 226.58 kmยฒ area
  โ€ข Districts: KARAIKAL
  โ€ข Nearest alternate: BHQ-ARIANKUPPAM (105.75 km)

5. OSI-Aware Intelligence

Maps each fault to its true OSI layer:

  • Layer 1 (Physical): Power, hardware, fiber issues โ†’ Field engineer dispatch
  • Layer 2 (Data Link): MAC/switching issues โ†’ NOC L2 remote fix
  • Layer 3 (Network): Routing, QoS, congestion โ†’ NOC L2 remote fix

Cascade Detection: When L1 fails, L2-L7 cascade simultaneously.

6. Automated Ticket Routing

Field Dispatch Tickets (L1 faults):

Priority:      CRITICAL
Assignment:    Field Engineer
GPS:           10.912990ยฐN, 79.847562ยฐE  โ†’  Google Maps link
Tools:         UPS battery, Generator, Multimeter
ETA:           2 hours

Remote NOC L2 Tickets (L2/L3 faults):

Priority:      HIGH
Assignment:    NOC L2 Engineer
CLI Commands:  show policy-map interface...
ETA:           30 minutes

7. Real BharatNet Topology

  • 106 real nodes from Puducherry Phase-I BSNL data
  • 4-tier hierarchy: SHQ โ†’ DHQ โ†’ BHQ (OLT) โ†’ GP (Village)
  • Real GPS coordinates for all 99 villages
  • 2 districts: KARAIKAL (28 villages), PONDICHERRY (71 villages)

๐Ÿ–ฅ๏ธ Dashboards (6 Pages)

Page Purpose Key Widget
1. AI Analysis Fault injection + graph topology NetworkX graph with per-incident colouring
2. NOC Operations Live GIS + OSI stack + tickets Folium multi-polygon fault map
3. Complaint Portal Customer complaint lookup Blast-radius-filtered customer table
4. Live Feed Real-time telemetry stream Scrolling SNMP log + threat ticker
5. Executive SLA Financial impact per incident โ‚น penalty calculator (live ticking)
6. Field Engineer Mobile-optimised dispatch GPS + D-Link DIR-615 digital twin LEDs

๐Ÿ”Œ Mininet Digital Twin

The mininet_digital_twin/ module virtualises the Puducherry BharatNet inside Mininet, creating a live kernel-level network that the AI pipeline can both monitor and control.

Architecture

SHQ-PUDUCHERRY  (OVSKernelSwitch โ€” core)
    โ”œโ”€โ”€ DHQ-KARAIKAL    (OVSKernelSwitch โ€” aggregation)
    โ”‚     โ””โ”€โ”€ BHQ-KARAIKAL   (OVSKernelSwitch โ€” OLT)
    โ”‚               โ”œโ”€โ”€ GP-Ambagarathur   (Host 10.1.1.1)
    โ”‚               โ””โ”€โ”€ GP-Edatheru       (Host 10.1.1.2)
    โ””โ”€โ”€ DHQ-PONDICHERRY (OVSKernelSwitch โ€” aggregation)
          โ”œโ”€โ”€ BHQ-ARIANKUPPAM (OVSKernelSwitch โ€” OLT)
          โ”‚         โ”œโ”€โ”€ GP-Nallalapuram   (Host 10.1.2.1)
          โ”‚         โ””โ”€โ”€ GP-Periyapattinam (Host 10.1.2.2)
          โ””โ”€โ”€ BHQ-VILLIANUR-1 (OVSKernelSwitch โ€” OLT)
                    โ”œโ”€โ”€ GP-Sethur         (Host 10.1.3.1)
                    โ””โ”€โ”€ GP-Vailankanni    (Host 10.1.3.2)

Link Bandwidths

Segment Bandwidth Delay Emulates
SHQ โ†’ DHQ 100 Mbps 1 ms 10 Gbps backbone
DHQ โ†’ BHQ 100 Mbps 2 ms Distribution uplink
BHQ โ†’ GP host 10 Mbps 3 ms GPON last-mile

Components

File Role
mininet_topology.py Builds and starts the virtual network; writes topology_manifest.json
fault_controller.py (engines/) Injects real kernel faults (ip link down, tc netem loss) into Mininet interfaces
telemetry_agent.py (engines/) Scrapes live interface stats from Mininet โ†’ writes current_telemetry.csv

How to Run (WSL Ubuntu, requires root)

# Terminal 1 โ€” start virtual network
sudo python3 mininet_digital_twin/mininet_topology.py

# Terminal 2 โ€” start telemetry scraper
sudo python3 engines/telemetry_agent.py

# Terminal 3 โ€” inject a fault interactively
sudo python3 engines/fault_controller.py

# Terminal 4 โ€” run the Streamlit dashboard (reads live CSV)
streamlit run main.py

Emergency cleanup if Mininet crashes:

sudo mn -c

Node Name Mapping

Mininet short names map to NetFaultAI canonical names:

Mininet Name Canonical Name
shq1 SHQ-PUDUCHERRY
dhqkar DHQ-KARAIKAL
dhqpon DHQ-PONDICHERRY
bhqkar BHQ-KARAIKAL
bhqari BHQ-ARIANKUPPAM
bhqvil BHQ-VILLIANUR-1
gpkar1 GP-Ambagarathur
gpkar2 GP-Edatheru

Note: mininet_digital_twin/live_export/ is a runtime-only folder. Its contents (current_telemetry.csv, active_faults.json, fault_overrides.json, topology_manifest.json) are generated at runtime and are excluded from version control via .gitignore.


๐Ÿ“ฆ Installation

Prerequisites

Python 3.10+
16 GB RAM (recommended)
NVIDIA GPU (optional, for model training only)

# For Mininet Digital Twin (WSL Ubuntu only):
sudo apt-get install mininet openvswitch-switch

Setup

# Clone the repository
git clone https://github.com/username/NetFaultAI.git
cd NetFaultAI

# Create virtual environment
python -m venv venv
source venv/bin/activate        # Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

Optional: Train distilBERT Model

# Generate training data (3,600 samples)
python training/generate_syslog_data.py

# Train model (~15-20 minutes on RTX 3050)
python training/train_distilbert.py
# Output: models/distilbert_finetuned/

System works with regex fallback if model not trained (90%+ accuracy).


๐ŸŽฎ Usage

Run the Dashboard

streamlit run main.py

Browser opens at http://localhost:8501

Run Tests

python tests/test_all.py                    # Full suite (13 tests)
python tests/test_all.py --test nlp         # NLP only
python tests/test_all.py --test performance # Performance only

Test Fault Scenarios (Dashboard)

  1. Open AI Analysis page
  2. Select a fault type (e.g., "Voltage Issue")
  3. Click "๐Ÿ”ฅ Inject Fault"
  4. View NLP classification, anomaly score, blast radius, network graph
  5. Switch to NOC Operations โ€” see GIS overlay, OSI stack, auto-ticket
  6. Switch to Executive SLA โ€” see live โ‚น penalty accumulating
  7. Switch to Field Engineer โ€” see GPS dispatch + D-Link LED widget

๐Ÿ“ Project Structure

NetFaultAI/
โ”‚
โ”œโ”€โ”€ main.py                          # Streamlit entry point + incident ledger
โ”œโ”€โ”€ requirements.txt                 # Python dependencies
โ”œโ”€โ”€ .gitignore                       # Excludes venv/, __pycache__/, live_export/
โ”‚
โ”œโ”€โ”€ pages/                           # Streamlit multi-page app
โ”‚   โ”œโ”€โ”€ 1_AI_Analysis.py             # Topology graph + fault injection
โ”‚   โ”œโ”€โ”€ 2_NOC_Operations.py          # GIS map + OSI stack + tickets
โ”‚   โ”œโ”€โ”€ 3_Complaint_Portal.py        # Customer complaint lookup
โ”‚   โ”œโ”€โ”€ 4_Live_Feed.py               # Real-time telemetry stream
โ”‚   โ”œโ”€โ”€ 5_Executive_SLA.py           # Financial SLA penalty dashboard
โ”‚   โ””โ”€โ”€ 6_Field_Engineer.py          # Mobile field dispatch + HW twin
โ”‚
โ”œโ”€โ”€ engines/                         # AI/ML engines
โ”‚   โ”œโ”€โ”€ fusion.py                    # Multi-stream AI fusion (Phase 2: multi-fault)
โ”‚   โ”œโ”€โ”€ nlp_engine.py                # distilBERT + regex 6-class classifier
โ”‚   โ”œโ”€โ”€ anomaly_engine.py            # Isolation Forest SNMP outlier detection
โ”‚   โ”œโ”€โ”€ blast_radius.py              # Geographical impact calculator
โ”‚   โ”œโ”€โ”€ osi_mapper.py                # OSI layer 1-7 fault mapping
โ”‚   โ”œโ”€โ”€ ticket_router.py             # Auto field/NOC ticket generation
โ”‚   โ”œโ”€โ”€ fault_scenarios.py           # 6 demo fault scenarios
โ”‚   โ”œโ”€โ”€ llm_rag_engine.py            # LLM RAG assistant (experimental)
โ”‚   โ”œโ”€โ”€ fault_controller.py          # Mininet fault injector companion
โ”‚   โ””โ”€โ”€ telemetry_agent.py           # Mininet live telemetry scraper
โ”‚
โ”œโ”€โ”€ graph/                           # Network topology
โ”‚   โ”œโ”€โ”€ topology_builder.py          # 106-node BharatNet graph builder
โ”‚   โ””โ”€โ”€ gis_map.py                   # Folium interactive map generator
โ”‚
โ”œโ”€โ”€ mininet_digital_twin/            # Live virtual network (WSL/Linux only)
โ”‚   โ”œโ”€โ”€ mininet_topology.py          # 4-tier OVS topology + auto manifest
โ”‚   โ””โ”€โ”€ live_export/                 # Runtime outputs (git-ignored)
โ”‚       โ””โ”€โ”€ .gitkeep
โ”‚
โ”œโ”€โ”€ models/                          # Trained model artefacts
โ”‚   โ”œโ”€โ”€ anomaly/
โ”‚   โ”‚   โ”œโ”€โ”€ iforest.pkl              # Trained Isolation Forest
โ”‚   โ”‚   โ”œโ”€โ”€ scaler.pkl               # Feature scaler
โ”‚   โ”‚   โ””โ”€โ”€ thresholds.pkl           # Anomaly thresholds
โ”‚   โ””โ”€โ”€ distilbert_finetuned/
โ”‚       โ”œโ”€โ”€ tfidf_svm_model.pkl      # TF-IDF + SVM (fast fallback)
โ”‚       โ”œโ”€โ”€ config.json              # Model config (6 fault classes)
โ”‚       โ”œโ”€โ”€ label_map.json           # ID โ†” label mappings
โ”‚       โ”œโ”€โ”€ training_metrics.json    # Accuracy / F1 / confusion matrix
โ”‚       โ””โ”€โ”€ version.txt              # Model version tag
โ”‚
โ”œโ”€โ”€ data/                            # Network + training data
โ”‚   โ”œโ”€โ”€ data_loader.py               # NetworkDataLoader API
โ”‚   โ”œโ”€โ”€ customer_db.py               # Customer lookup (O(1) by GP)
โ”‚   โ”œโ”€โ”€ realtime_feed.py             # Live telemetry feed reader
โ”‚   โ”œโ”€โ”€ network_hierarchy.json       # 106-node SHQโ†’DHQโ†’BHQโ†’GP structure
โ”‚   โ”œโ”€โ”€ customers.csv                # 198 synthetic customer records
โ”‚   โ”œโ”€โ”€ puducherry_gp_data.csv       # 99 villages + GPS coordinates
โ”‚   โ”œโ”€โ”€ puducherry_olt_data.csv      # 4 OLT locations + GPS
โ”‚   โ”œโ”€โ”€ sample_snmp_metrics.csv      # SNMP baseline samples
โ”‚   โ”œโ”€โ”€ sample_syslogs.csv           # Syslog baseline samples
โ”‚   โ”œโ”€โ”€ syslog_training_data.csv     # 3,600 labeled training samples
โ”‚   โ””โ”€โ”€ snmp_exports/                # Per-fault SNMP scenario CSVs
โ”‚       โ”œโ”€โ”€ snmp_fault_voltage_issue.csv
โ”‚       โ”œโ”€โ”€ snmp_fault_hardware_defect.csv
โ”‚       โ”œโ”€โ”€ snmp_fault_traffic_congestion.csv
โ”‚       โ”œโ”€โ”€ snmp_fault_latency_degradation.csv
โ”‚       โ”œโ”€โ”€ snmp_fault_connection_issue.csv
โ”‚       โ”œโ”€โ”€ snmp_fault_legacy_bottleneck.csv
โ”‚       โ”œโ”€โ”€ snmp_multi_fault_scenario.csv
โ”‚       โ”œโ”€โ”€ snmp_normal_baseline.csv
โ”‚       โ”œโ”€โ”€ snmp_zabbix_format_export.csv
โ”‚       โ””โ”€โ”€ demo_snmp_export.csv
โ”‚
โ”œโ”€โ”€ training/                        # Model training scripts
โ”‚   โ”œโ”€โ”€ generate_syslog_data.py      # Generates 3,600 labeled syslog samples
โ”‚   โ””โ”€โ”€ train_distilbert.py          # Fine-tunes distilBERT (RTX 3050 optimised)
โ”‚
โ””โ”€โ”€ tests/
    โ””โ”€โ”€ test_all.py                  # 13 comprehensive integration tests

๐Ÿ”ฌ Technical Details

Data Sources

  • Network Topology: Puducherry Phase-I BharatNet (BSNL)
  • Training Data: 3,600 synthetic syslog samples (600 per class ร— 6 types)
  • GPS Coordinates: Real village locations (10.87ยฐNโ€“12.00ยฐN, 79.64ยฐEโ€“79.85ยฐE)

AI Models

  • NLP: distilBERT fine-tuned (67M parameters, 92%+ accuracy) + TF-IDF SVM fallback
  • Anomaly: Isolation Forest (100 trees, contamination=0.05, 8-core parallel)
  • Fusion: Weighted voting (NLP 40%, Anomaly 40%, Context 20%)

Performance

  • Pipeline Execution: <2ms (excluding model cold start)
  • With BERT: ~50ms per inference
  • Target: <100ms โœ… (55ร— faster than target)

Scalability

  • Current: 106 nodes (Puducherry)
  • Designed for: 10,000+ nodes (All India BharatNet)
  • Graph algorithms: O(n) BFS, O(n log n) shortest path

๐Ÿงช Test Results

======================================================================
  NetFaultAI โ€” Test Suite Results
======================================================================

Phase 1-2: Data & Topology             โœ“ 3/3 tests passed
Phase 3-5: AI Engines                  โœ“ 7/7 tests passed
Phase 6 & Integration                  โœ“ 3/3 tests passed

Total:                                 โœ“ 13/13 tests passed (100%)
Performance:                           โœ“ 1.8ms (target <100ms)
System Status:                         READY FOR PRODUCTION

๐ŸŽ“ Research Foundation

Based on 15 academic papers (2021-2025):

  • LogBERT (ICDM 2021): Transformer-based log anomaly detection
  • GNN Fault Localization (TMC 2023): Graph neural networks for root cause
  • Isolation Forest (IEEE Trans 2012): Unsupervised anomaly detection
  • Telecom RCA (AAAI 2024): Root cause analysis in 5G networks
  • Network Embedding (KDD 2023): Graph representation learning

๐Ÿ… Hackathon Alignment

Problem Statement #2: End-to-End Network Fault Localization

Requirements Met:

  • โœ… Real-time fault detection (<60 seconds)
  • โœ… Root cause localisation (graph BFS + AI)
  • โœ… Customer impact calculation (blast radius)
  • โœ… Automated ticketing (field + NOC routing)
  • โœ… OSI layer awareness (L1-L7 mapping)
  • โœ… Geographical visualisation (GIS maps)

Innovation:

  • โœ… First system to automate blast radius in telecom
  • โœ… Geographical intelligence (distance, area, village names)
  • โœ… Multi-stream AI fusion (NLP + Anomaly + Context)
  • โœ… Real BharatNet topology (not synthetic)
  • โœ… Live Mininet Digital Twin โ€” real kernel faults, not just simulation

๐Ÿ“Š Impact Metrics

Before NetFaultAI

Fault Detection:        Manual (30-60 minutes)
Root Cause Analysis:    Manual (1-2 hours)
Customer Impact Calc:   Manual (1-3 hours)
Ticket Routing:         Manual (15-30 minutes)
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Total Time:             2-6 hours

After NetFaultAI

Fault Detection:        Automated (<1 second)
Root Cause Analysis:    Automated (<1 second)
Customer Impact Calc:   Automated (<1 second)
Ticket Routing:         Automated (<1 second)
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Total Time:             <60 seconds

Time Reduction:         99.7%
Cost Savings:           ~โ‚น50,000/incident (labour cost)
Customer Satisfaction:  MTTR reduced 120ร— (6 hours โ†’ 3 minutes)

๐Ÿ› ๏ธ Built With

  • Python 3.10+
  • Streamlit โ€” Dashboard framework
  • PyTorch + HuggingFace โ€” NLP models
  • scikit-learn โ€” Anomaly detection + TF-IDF SVM
  • NetworkX โ€” Graph topology
  • Folium โ€” GIS mapping
  • Pandas / NumPy โ€” Data processing
  • Plotly โ€” SLA charts + telemetry graphs
  • Mininet + OVS โ€” Network virtualisation (Digital Twin)

Hardware Used

  • Development: Intel i5-12450H, 16 GB RAM, RTX 3050 6 GB
  • Training Time: 15-20 minutes (distilBERT fine-tuning)
  • Inference Time: <2ms (optimised pipeline)

๐Ÿ“ License

MIT License โ€” see LICENSE file


๐Ÿ‘ฅ Team

Built in TANFINET Hackathon 2025


๐Ÿ™ Acknowledgments

  • BSNL โ€” Puducherry Phase-I network data
  • BharatNet โ€” National fiber backbone programme
  • TANFINET โ€” Hackathon organisation
  • HuggingFace โ€” Pre-trained language models
  • Streamlit โ€” Dashboard framework
  • Mininet / Open vSwitch โ€” Network emulation platform

๐Ÿ“ง Contact

For questions or demo requests:


๐ŸŽฏ Future Enhancements

  • Multi-vendor equipment support (Cisco, Juniper, Nokia)
  • Historical trend analysis (predict failures before they occur)
  • Integration with existing OSS/BSS systems
  • Real Mininet โ†’ full 106-node topology (currently 12-node representative sample)
  • Real-time streaming telemetry via gRPC
  • Expand to All India BharatNet (250,000+ GPs)

NetFaultAI โ€” Bringing AI-powered automation to India's digital infrastructure ๐Ÿ‡ฎ๐Ÿ‡ณ

About

AI-powered network fault isolation for BharatNet. Reduces fault detection from 2-6 hours to <60 seconds using NLP + anomaly detection. Features geographical blast radius calculation, automated ticket routing, and live Mininet Digital Twin. 106-node topology with GIS mapping and multi-fault handling. TANFINET HACKATHON 2026

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages