This repository was archived by the owner on Jun 18, 2026. It is now read-only.
Commit 3d6772f
Zalenix
feat(adversary): GraphAdversaryForecaster — agentic adversarial-intent modeler
Given an original graph snapshot and an ordered attack trace (the node IDs removed in chronological order), this engine: (1) infers the attacker's strategy by replaying the trace against the residual graph and scoring six candidate strategies (RANDOM, DEGREE_TARGETING, BETWEENNESS_TARGETING via Brandes, BRIDGE_TARGETING via iterative Tarjan, COMMUNITY_CUT via label propagation, PERIPHERAL) with a tie-aware mid-rank quality metric, (2) forecasts the top-K next likely targets on the residual graph using a softmax-blended primary+secondary strategy with configurable temperature, and (3) recommends prioritized defenses (HARDEN / ADD_REDUNDANT_EDGE with a concrete suggested edge / MONITOR / DECOY) tagged P0/P1/P2 by the expected drop in largest-connected-component size. Exports to plain text, Markdown, and handwritten JSON. Includes 13 JUnit 4 tests covering input validation, hub/path/dumbbell trace inference, empty-trace fallback, probability normalization, topK clamping, ignored-entry counting, and JSON well-formedness. Pure JUNG + JDK, no new dependencies.1 parent d9ef33e commit 3d6772f
3 files changed
Lines changed: 1071 additions & 0 deletions
File tree
- Gvisual/src
- gvisual
- test/gvisual
0 commit comments