|
| 1 | +--- |
| 2 | +title: FlowRadar v1 |
| 3 | +--- |
| 4 | + |
| 5 | +# FlowRadar v1 |
| 6 | + |
| 7 | +## Overview |
| 8 | + |
| 9 | +FlowRadar v1 evaluates a miner's ability to detect VPN usage using network flow features. Each request contains a single flow represented as JSON. Your model must return a boolean `is_vpn` value. |
| 10 | + |
| 11 | +For general challenge context, data description, and links, see the [FlowRadar README](./README.md). |
| 12 | + |
| 13 | +--- |
| 14 | + |
| 15 | +## Input/Output Format |
| 16 | + |
| 17 | +### Request |
| 18 | + |
| 19 | +```json |
| 20 | +{ |
| 21 | + "products": { |
| 22 | + "fwd_num_pkts": 120, |
| 23 | + "bwd_num_pkts": 98, |
| 24 | + "fwd_sum_pkt_len": 31400, |
| 25 | + "bwd_sum_pkt_len": 38100, |
| 26 | + "flow_duration": 2500 |
| 27 | + ... |
| 28 | + } |
| 29 | +} |
| 30 | +``` |
| 31 | + |
| 32 | +### Response |
| 33 | + |
| 34 | +```json |
| 35 | +{ |
| 36 | + "is_vpn": true, |
| 37 | + "request_id": "<server-generated>" |
| 38 | +} |
| 39 | +``` |
| 40 | + |
| 41 | +Notes: |
| 42 | + |
| 43 | +- The `products` object is a single CSV row serialized as JSON. |
| 44 | +- Fields and counts can vary by dataset version. |
| 45 | + |
| 46 | +--- |
| 47 | + |
| 48 | +## Scoring |
| 49 | + |
| 50 | +Scoring uses **F1 score** based on true positives, false positives, true negatives, and false negatives. |
| 51 | + |
| 52 | +- Typical scores in early iterations may be 0.7-0.8, but **FlowRadar v1 requires >= 0.9** to be eligible for emissions. |
| 53 | +- F1 is computed across the full scoring dataset. |
| 54 | + |
| 55 | +The dashboard also surfaces a confusion matrix (TP, FP, TN, FN) as JSON for debugging and evaluation. |
| 56 | +See: [Dashboard](../../miner/concepts/dashboard.md) |
| 57 | + |
| 58 | +--- |
| 59 | + |
| 60 | +## Performance Constraints |
| 61 | + |
| 62 | +- **Per-request time limit**: 0.5 seconds |
| 63 | +- Scoring stops early if too many requests fail or time out |
| 64 | + |
| 65 | +--- |
| 66 | + |
| 67 | +## Submission Requirements |
| 68 | + |
| 69 | +- **Single file only**: `submission.py` |
| 70 | +- **Line limit**: 1000 lines max |
| 71 | +- **No external libraries**: only Python built-ins |
| 72 | +- Must expose a VPN detection function that returns a boolean |
| 73 | + |
| 74 | +--- |
| 75 | + |
| 76 | +## Acceptance Criteria |
| 77 | + |
| 78 | +!!! important "Limits and Acceptance Criteria" |
| 79 | + - **F1 score >= 0.9** for eligibility |
| 80 | + - **Request time <= 0.5 seconds** |
| 81 | + - **One file only**: `submission.py` |
| 82 | + - **Maximum 1000 lines** |
| 83 | + - **No additional libraries** (Python built-ins only) |
| 84 | + |
| 85 | +--- |
| 86 | + |
| 87 | +## Example Logic (Simplified) |
| 88 | + |
| 89 | +```python |
| 90 | +def detect_vpn(features: dict) -> bool: |
| 91 | + # Example heuristic only |
| 92 | + fwd = features.get("fwd_sum_pkt_len", 0) |
| 93 | + bwd = features.get("bwd_sum_pkt_len", 0) |
| 94 | + if fwd > 0 and (bwd / fwd) > 1.2: |
| 95 | + return True |
| 96 | + return False |
| 97 | +``` |
| 98 | + |
| 99 | +This illustrates the expected shape and return type. Production submissions should use more robust logic to reach the required F1 threshold. |
0 commit comments