PageRank-Based Flow Trust Scoring
Why PageRank?
In dynamic home networks, not all flows are equally trustworthy. Traditional rule-based systems don’t adapt to context. Inspired by the algorithm used by Google Search, we apply PageRank to assign a **trust score** to each flow or host, based on its observed behavior and communication patterns.
Graph Construction
A directed graph is built where:
- Nodes represent devices or flow IDs
- Edges represent communication between them (frequency, byte volume)
This graph is continuously updated as flows are established.
Trust Score Computation
Using Python's networkx.pagerank()
, we compute a normalized trust score for each node. High PageRank indicates:
- Frequent, consistent, or central communication
- Low anomaly risk
- New or infrequent participants
- Actively communicating with suspicious or isolated hosts
How It Affects Flow Decisions
Trust scores influence:
- Priority: Higher-trust flows may be given lower-latency paths
- Rate Limiting: Suspicious flows may be throttled or logged more aggressively
- Path Selection (Optional): Scores may be used in multipath routing decisions
Visualization
PageRank scores are logged in real-time and can be visualized using CLI output or JSON dumps. Below is a sample snapshot of trust scores for several devices:
{ "10.0.0.2": 0.304, "10.0.0.3": 0.215, "10.0.1.2": 0.184, "10.2.0.2": 0.103, "10.3.1.2": 0.038 }