Prismatic Bifurcation

Prismatic Bifurcation

120 files Analytics

Overview

Prismatic Bifurcation provides decision branching and scenario analysis capabilities for strategic intelligence assessment within the Prismatic Platform. The system models multiple possible outcomes from a given entity state, evaluates branching points in behavioral event streams, and supports strategic assessment through "what if" scenario exploration across the intelligence pipeline. Bifurcation integrates with Prismatic Monte Carlo for probabilistic branch evaluation, Prismatic Nabla for confidence propagation through decision trees, and Prismatic Graph for scenario state snapshots.

Intelligence analysis frequently requires evaluating how a situation might evolve under different conditions. When a vulnerability is disclosed affecting a monitored entity, the security outcome depends on whether the entity patches quickly, the vulnerability gets exploited in the wild, or the entity ignores the disclosure entirely. Each scenario leads to different security rating trajectories, compliance implications, and risk assessments. Without systematic scenario analysis, these evaluations remain informal and subjective. Prismatic Bifurcation formalizes scenario analysis by modeling decision trees with probability-weighted branches, enabling quantitative comparison of possible futures.

Each scenario branch is evaluated independently with cascading effect analysis, producing probability-weighted outcome distributions that inform decision recommendations with quantified uncertainty. The design goals encompass branch point identification to detect decision points in event streams where entity behavior could diverge, multi-scenario simulation to model and evaluate multiple outcome scenarios per branch point, probability assignment using Monte Carlo methods, cascading effect analysis to trace how branch outcomes propagate through dependent systems, decision support to produce ranked recommendations with confidence-weighted expected outcomes, and NABLA compliance ensuring all scenario assessments carry provenance and confidence per epistemic axioms.

Architecture

The architecture follows a pipeline pattern from event stream monitoring through scenario evaluation to decision recommendation. Branch detection feeds into parallel scenario evaluation, with results converging in the decision engine.

Event Stream --> Branch Point Detector
       |
  Scenario Generator
  (enumerate possible outcomes)
       |
  +----+----+----+
  |    |    |    |
  Scenario A  Scenario B  Scenario C
  (probability: 0.4) (0.35) (0.25)
       |
  Cascading Effect Analyzer
  (trace impact through dependencies)
       |
  Monte Carlo Evaluation
  (probability-weighted outcomes)
       |
  Decision Recommendation
  (ranked scenarios with confidence)

The process topology uses a one-for-one supervisor strategy with a BranchDetector GenServer monitoring event streams for branch point patterns and a Task.Supervisor for parallel scenario evaluation:

PrismaticBifurcation.Application (Supervisor, :one_for_one)
+-- PrismaticBifurcation.BranchDetector (GenServer)
|     Monitors event streams for branch point patterns
+-- Task.Supervisor
      Parallel scenario evaluation tasks

Event streams are monitored for branch point patterns including vulnerability disclosures, configuration changes, and compliance deadline approaches. When a branch point is detected, the ScenarioGenerator enumerates possible outcomes based on historical patterns and domain rules. Each scenario is evaluated through the CascadeAnalyzer to determine downstream effects, then quantified via Monte Carlo simulation. The DecisionEngine ranks scenarios by expected outcome and produces recommendations.

Key Modules

ModuleResponsibility
PrismaticBifurcationPublic facade: analyze/1, evaluate_scenario/2, recommend/1
PrismaticBifurcation.BranchDetectorIdentify decision points in event streams via pattern matching
PrismaticBifurcation.ScenarioGeneratorEnumerate possible outcomes per branch point using domain rules
PrismaticBifurcation.CascadeAnalyzerTrace impact propagation through dependent systems and entities
PrismaticBifurcation.EvaluatorMonte Carlo-based scenario evaluation with configurable iterations
PrismaticBifurcation.DecisionEngineMulti-criteria decision analysis and ranked recommendation output

Branch points are detected by matching event stream patterns against a rule library. For example, a "vulnerability disclosed" event affecting a monitored entity triggers a branch point with scenarios: patch within SLA, exploit before patch, and ignore. Pattern rules are defined declaratively and can be extended without modifying the detection engine.

defmodule PrismaticBifurcation.Scenario do
  @type t :: %__MODULE__{
    id: String.t(),
    branch_point: BranchPoint.t(),
    name: atom(),
    description: String.t(),
    probability: float(),
    outcomes: %{atom() => term()},
    cascading_effects: [CascadeEffect.t()],
    time_horizon: pos_integer(),
    confidence: float()
  }
end

Configuration

config :prismatic_bifurcation,
  monte_carlo_iterations: 10_000,
  default_time_horizon: :days_30,
  confidence_threshold: 0.6,
  max_scenarios_per_branch: 10,
  cascade_depth_limit: 5,
  branch_detection_rules_path: "priv/rules/branch_patterns.yaml"

Configuration controls the number of Monte Carlo iterations per scenario evaluation (trading accuracy for speed), default time horizon for forward-looking analysis, the minimum confidence threshold for including a scenario in recommendations, maximum branching factor per decision point, and cascade analysis depth limit to prevent infinite propagation chains.

API Reference

# Analyze decision branches for an entity
@spec analyze(keyword()) :: {:ok, [Scenario.t()]}
PrismaticBifurcation.analyze(
  entity: "example.com",
  event: :new_vulnerability_disclosed,
  scenarios: [:patched_quickly, :exploited, :ignored])

# Evaluate a specific scenario with time horizon
@spec evaluate_scenario(atom(), keyword()) :: {:ok, ScenarioOutcome.t()}
PrismaticBifurcation.evaluate_scenario(:exploited, time_horizon: :days_30)

# Get ranked decision recommendation with criteria weights
@spec recommend(keyword()) :: {:ok, Recommendation.t()}
PrismaticBifurcation.recommend(
  entity: "example.com",
  criteria_weights: %{security: 0.4, cost: 0.3, compliance: 0.3})

The DecisionEngine evaluates scenarios across multiple dimensions (security impact, compliance impact, cost, likelihood) and produces a weighted ranking using configurable criteria weights. All recommendations carry confidence scores derived from the underlying Monte Carlo simulations.

Testing

Branch detection tests verify correct identification of known event patterns against a curated set of branch point scenarios. Scenario evaluation tests verify probability calculations against analytical solutions for simple cases where closed-form results are available.

End-to-end integration tests exercise the full analysis pipeline from event through branch detection, scenario generation, evaluation, and recommendation output. Property-based tests use StreamData generators to produce random event sequences and scenario parameters, verifying that probabilities always sum to 1.0 per branch and that recommendations are consistent with scenario evaluations.

Integration Points

ApplicationRelationship
Prismatic Monte CarloProbabilistic scenario evaluation engine
Prismatic NablaConfidence propagation through branching structures
Prismatic GraphScenario state snapshots in knowledge graph
Prismatic PerimeterSecurity rating scenario analysis for EASM
Prismatic ComplianceCompliance impact forecasting across scenarios

Scenario evaluations are dispatched as supervised tasks for parallel processing. Branch detection monitors PubSub event topics for incoming events. All computation is performed locally using platform data with no external service dependencies.

NABLA Compliance

Prismatic Bifurcation enforces NABLA axiom compliance on all scenario assessments and decision recommendations.

NABLA AxiomBifurcation EnforcementImplementation
Signal PluralityMultiple scenario paths provide independent assessment signalsEach branch evaluated independently before aggregation
Contradiction PreservationConflicting scenario outcomes preserved in recommendation outputRecommendation includes both favorable and unfavorable scenarios
Provenance MandatoryEvery recommendation traces to specific branch points and rulesFull derivation chain from event through scenario to recommendation
Time DecayScenario probabilities carry temporal validity windowsTime horizon annotations on all probability estimates
Unknown ValidScenarios with insufficient data explicitly marked as uncertainLow-confidence scenarios included with uncertainty quantification

Scenario manipulation through biased probability inputs could lead to incorrect strategic recommendations. Mitigations include NABLA confidence tracking and mandatory multi-source probability estimation.

Performance

OperationLatencyNotes
Branch point detection< 10msRule matching on event
Scenario generation10-50msPer branch point
Monte Carlo evaluation (10K iterations)100-500msPer scenario
Full analysis (3 scenarios)500ms-2sIncluding cascade analysis

Scenario evaluations parallelize across branches. Monte Carlo iterations are embarrassingly parallel and scale linearly with available CPU cores.

ResourceMinimumRecommended
Memory128 MB512 MB
CPU2 cores4 cores

Telemetry events: [:prismatic, :bifurcation, :analysis_complete], [:prismatic, :bifurcation, :recommendation_generated].


Connect & Contribute

Created by Tomáš Korcak (korczis) | Open Source under GHL