Bayesian Networks¶
The TSST BN component enables probabilistic reasoning over interconnected business variables. It models conditional dependencies between variables and computes posterior distributions and actionable probabilities from heterogeneous evidence (streaming events, batch features, and user inputs). The component supports both static and dynamic inference, integrates with the TSST feature store, and exposes outputs as governed features for downstream analytics, rules, and decisioning services.
Core Capabilities¶
- Declarative BN specification (nodes, states, edges, and CPT/CPD definitions)
- Hybrid evidence ingestion (point observations, distributions, soft evidence)
- Exact and approximate inference (variable elimination and sampling-based methods)
- Dynamic/time-sliced models with inter-slice temporal dependencies
- Integration with the TSST feature store for both input sourcing and publishing posterior features
Primary Use Cases¶
- Risk scoring: infer probability of anomalous behavior from transaction patterns, device signals, and historical cohorts
- Root-cause analysis and explainability: surface contributing factors via posterior sensitivities and inspection of a node’s Markov blanket
- Real-time decision support: update beliefs as fresh signals arrive, enabling low-latency decision policies
Architecture¶
The BN component follows a modular architecture: specification parsing, graph construction, inference engine binding, evidence adapters, and feature-store publishers. The data model defines nodes, state spaces, edges, and conditional probability tables/distributions with versioned schemas for governance.
Component Modules¶
- Spec Loader: Validates and loads BN schema from registry or storage (YAML/JSON model files). \[Add Data Engineer]
- Graph Builder: Constructs DAG, checks acyclicity, and maps CPDs to nodes.
- Inference Engine: Provides exact/approximate inference, sensitivity analysis, and evidence management.
- Evidence Adapters: Bind feature values, events, and user inputs to node evidence (hard/soft).
- Publishers: Emit posterior marginals and diagnostics to the TSST feature store and logs/metrics.
Inference Capabilities¶
Evidence Handling¶
- Hard evidence: observed state assignment to a node (categorical) or value (continuous).
- Soft evidence: likelihood weighting or virtual evidence for partial beliefs.
- Streaming updates: incremental evidence application and selective recomputation on affected subgraphs.
Integration with the State Store¶
The BN component both consumes features as inputs and publishes posterior features for reuse. Integration points are standardized to ensure governance, lineage, and consistent serving.
Inputs and Evidence Preparation¶
Input sourcing: mappable feature keys → BN nodes via adapters (categorical mapping, discretization for continuous).
Evidence preparation workflow:
- Prepare evidence from raw inputs → validate types/ranges → map to node states.
- Run inference → extract marginals/posteriors and diagnostics (for example, normalization checks).
- Serialize outputs → publish to feature store with strong keys and model lineage.