Explainability Engine¶
Phase 11 adds a deterministic explanation layer for AI1SAD warning, surveillance, replay, and alert outputs.
The explanation layer does not predict attacks. It explains why environmental, biological, human-exposure, activity, and regional signals produced a warning or surveillance-priority output.
Kelp forest factors may appear when static/offline kelp habitat signals are active. Explanation text treats kelp as bounded habitat and observation-planning context, especially where kelp edge, pinniped prey context, and human activity overlap.
Outputs¶
Each explanation includes:
factor_contributions: normalized factor points and contribution sharesconfidence_breakdown: coverage, freshness, completeness, and overall confidencedata_freshness: provider/source statusmissing_data_sources: unavailable inputs that limit interpretationmissing_signal_impact: plain-language impact of missing inputsregional_pack_influence: active pack, available pack, and features usedregional_rules_triggered: rule keys from active contributing factorssuppression_reasons: why weak alerts or high warning claims are suppressedoperational_interpretation: concise field-facing explanationrecommended_action: operational recommendation textmetadata: model, scoring, provider stack, and generation version fields
Kelp explanations can include:
kelp_forest_habitat_contextin warning factors with small bounded pointskelp_forest_surveillance_contextin surveillance factors when habitat stacks with prey, activity, or white shark regional context- stale/static freshness in
data_freshness - confidence reduction when dense kelp affects open-water visibility
Hawaii habitat explanations can include:
reef_channel_contextreef_edge_contextshallow_reef_contexthardbottom_contextbaseline_habitat_freshnesshabitat_visibility_context
These factors are bounded baseline-structure context and must not be described as live habitat-state observation.
Hawaii tide/current explanations can include:
tide_window_contextnearshore_current_contextchannel_flow_contextcurrent_speed_contextcurrent_convergence_contextnearshore_model_resolutionforecast_freshnessstation_coverage_gapregional_fallback_usedtidal_exchange_contextbaseline_tide_current_freshnesshawaii_tide_current_baseline_context
These factors are bounded water-movement context and must not be described as live PacIOOS, ROMS, or NOAA CO-OPS observations unless a future adapter ingests source-timestamped live or pre-fetched records.
Hawaii water clarity explanations can include:
water_clarity_contextturbidity_contextsediment_runoff_visibility_contextsurf_zone_visibility_contextvisibility_activity_stack_contextvisibility_signal_stack_contextbaseline_visibility_freshnesshawaii_water_clarity_baseline_context
These factors are bounded visibility context and must not be described as live NOAA CoastWatch, PacIOOS, camera, beach, or water-quality observations unless a future adapter ingests source-timestamped records.
Drone observation explanations can include:
review_statussource_typeprobable_specieswith explicit assessment source- no-sighting patrol caveats
- human-approved recommended surveillance pattern
Drone explanations must treat recommended patterns as human-reviewed planning labels, not flight-control commands.
API Routes¶
GET /api/v1/explain/locationGET /api/v1/explain/surveillanceGET /api/v1/explain/replayGET /api/v1/explain/alert/{alert_id}
These routes compose existing model outputs. They do not rerank locations with a new model, add live providers, scrape data, or call ML/LLM prediction logic.
Metadata¶
Explanation payloads include:
model_versionscoring_revisionprovider_stack_versiongenerated_atreplay_asset_versionfor replay explanations
Safety Boundary¶
Explanation text must never claim individual attack prediction, shark intent, guaranteed safety, or provocation. Spearfishing, fishing, diving, and swimming context are treated as operational activity context.