Skip to main content

Module sensor_graph

Module sensor_graph 

Source
Expand description

Spatio-temporal GNN for distributed sonobuoy / sensor arrays (KG-013 / WEFT-354).

K-STEMIT-style dual-branch architecture adapted from ice-penetrating radar (arXiv:2604.09922) to underwater acoustic sensing:

  • Spatial: GraphSAGE on a buoy-position graph with inverse-distance (and optional propagation-delay) edge weights — learned beamforming over irregular arrays.
  • Temporal: Gated linear unit (GLU) convolution over per-buoy acoustic time series — learned matched filtering for transients.
  • Physics prior: ocean acoustic node features (SSP, thermocline, sea state, current, bottom type) projected into the same hidden space.
  • Adaptive fusion: learnable α ∈ [0,1] balances spatial vs temporal; physics residual is added with a fixed scale (or learnable γ).
  • Classification head: linear → logits for detection / species-style labels.

Pure Rust, no GPU / no ndarray. Behind the sensor feature flag.

Design note: docs/plans/weft-354-k-stemit.md.

Structs§

EvalMetrics
Classification metrics.
ForwardOutput
Outputs of a single-node forward pass.
GraphSageLayer
One GraphSAGE hop: h = σ(W_self x + W_neigh AGG(N(x))).
KstemitConfig
Hyperparameters for KstemitModel.
KstemitModel
K-STEMIT-style spatio-temporal GNN for sonobuoy arrays.
Linear
Dense affine map y = Wx + b with analytical gradients for SGD.
SensorEdge
An edge connecting two buoys.
SensorGraph
Graph-based sensor fusion substrate for distributed buoy arrays.
SensorNode
A buoy node in the sensor graph.
SyntheticConfig
Parameters for generate_synthetic_array.
SyntheticDataset
Full synthetic dataset: shared array graph + per-node labels.
SyntheticSample
One labelled observation: which node, and ground-truth class.
TemporalGlu
Gated linear unit: y = a ⊙ σ(g) where [a;g] = W x + b.
TrainConfig
SGD hyper-parameters.
TrainResult
Result of a training run.

Functions§

class_name
Human-readable class name.
evaluate
Evaluate mean CE and accuracy on all samples.
generate_synthetic_array
Generate a synthetic sonobuoy array with class-conditional temporal events.
train_sgd
Train a new model on a synthetic dataset.