v 0.4.1

Sensory 0.4.1

Released August 8, 2026 · Windows x64

Web artifact: dist/Sensory-0.4.1-windows-x64.zip

Sensory 0.4.1 adds GPU-resident mini-batch readout gradients, spatial 3x3 topology, mixed classification/regression heads and an object-detection example. It retains all continual Czech learning and eligibility features from 0.4.0.

CUDA mini-batch readout training

cognia_train model.cognia data.dataset 30000 Network `
  --softmax --batch-size 64 --save networks/model.bin

Every independent example is propagated separately. Softmax-cross-entropy, Smooth-L1 and optional IoU error signals, weight gradients and bias gradients stay in GPU buffers. CUDA kernels apply their average after each complete batch and after the final partial batch. Weights therefore remain fixed inside a batch. This is deferred mini-batch gradient accumulation, not a parallel tensorized forward pass. The default is --batch-size 1.

--batch-size applies to independent cognia-dataset softmax training. It is different from --eligibility-batch, which batches approximate updates to plastic inner/recurrent edges during sequential training; the sequential softmax readout remains online.

Spatial topology

For equal perfect-square source and destination regions, pattern: local creates a clipped 3x3 two-dimensional receptive field. pattern: convolution uses one nine-value stencil across all positions; every connect statement gets its own stencil. Unequal or non-square regions use the previous one-dimensional radius-2 local fallback and convolution emits a topology note.

Runtime edges are stored independently. Use plasticity: none when convolution coefficients must remain tied after topology construction.

connect camera.pixels -> vision.map {
    pattern: convolution;
    weight: random(-0.8, 0.8);
    plasticity: none;
}

Mixed classification and regression

A top/clamp layer can contain multiple non-overlapping classification output regions. Each is normalized as an independent softmax head. Uncovered neurons are trained as continuous outputs with Smooth-L1 (beta=0.1) in the softmax trainer path. A four-neuron xyxy region with loss: smooth_l1_iou also gets a finite-difference IoU-loss gradient.

output classification from detector.category as category {
    vocab: "accessory", "bag", "clothing", "shoe";
    loss: softmax_cross_entropy;
}
output signal from detector.box as box { loss: smooth_l1_iou; }

All output regions must be contiguous and inside the top/clamp layer; box ranges must contain exactly four neurons. A classification output automatically selects the softmax trainer. For regression-only models pass --softmax explicitly. Dense dataset targets use the same positions as the corresponding top outputs.

The REST representation of every signal output now contains values: [...] in addition to aggregate level and active, so clients can read continuous vectors such as bounding boxes.

Object detection example

Example 13 uses two fixed 3x3 feature maps and two Fashionpedia detection slots. Each slot predicts presence, one of four categories and a continuous box. The preparation script performs deterministic horizontal flip, brightness and contrast augmentation; the evaluator reports classification accuracy, L1, mean IoU and IoU@0.5.

On the documented machine, 15,000 training steps with batch 32 took about 16 seconds. The checked 400-image/800-slot run reached 88.4% presence accuracy, 83.4% category accuracy, 0.1955 mean IoU, 7.1% IoU@0.5 and 0.1973 L1. These are example-specific results; localization is still weak and a longer 30k run did not improve it. Downloaded parquet data, generated images/datasets and trained checkpoints are excluded from the ZIP.

See Cognia/examples/13-object-detection/README-en.md or README-cz.md for the complete preparation, training, serving and evaluation commands.

Trainer command reference

cognia_train <file.cognia> <dataset> [iterations|epochs=500] [network]
  [--load FILE] [--save FILE] [--summary] [--eval-only] [--eval-limit N]
  [--batch-size N] [--sequential|--seq] [--softmax]
  [--controller NAME] [--load-controller FILE] [--save-controller FILE]
  [--plan FILE] [--checkpoint-prefix PATH]
  [--learn-dirs] [--contrastive] [--freeze-readout]
  [--eligibility] [--eligibility-eta X] [--eligibility-feedback N]
  [--eligibility-batch N] [--eligibility-every N]
  [--eligibility-contrastive] [--eligibility-neutral-center]
  [--eligibility-covariance] [--eligibility-covariance-normalize]
  [--eligibility-pairwise] [--eligibility-pairwise-mix X]
  [--eligibility-temperature-start X] [--eligibility-temperature-end X]
  [--eligibility-stochastic-competitor]

Dataset headers:

Header Rows
cognia-dataset <inDim> <outDim> Dense input followed by dense target values.
cognia-seq <inDim> <outDim> Dense input followed by one target index; -1 is a state-only step.
cognia-seq-indexed <inDim> <outDim> One input index and one target index; one-hot vectors are created on the GPU.

Blank lines delimit sequences. Dimensions must match the sensory and top/readout sizes. --load continues a dimension-compatible checkpoint; --save writes the result. --checkpoint-prefix PATH writes PATH-epoch-N.bin in sequential mode. --summary suppresses per-example report lines but still trains. --eval-limit limits reporting, not training. --eval-only only disables updates together with --controller in this release.

Eligibility requires --sequential --softmax. --eligibility-every N changes only inner-layer credit cadence, not readout cadence. Covariance and binary contrastive eligibility require --eligibility-batch N with N > 1.

Validation and limits

  • The complete Cognia parser/GPU test suite and release resource checks must pass before publication.
  • Saved networks remain dimension- and version-sensitive.
  • Mini-batching reduces update/synchronization overhead but does not parallelize stateful sequence forward passes.
  • Eligibility remains an approximation rather than exact backpropagation through time.
  • Example 13 is a research demonstration, not a production detector.

Sensory 0.4.1 is experimental research software and is not safety-critical software.

Installation guide · Complete changelog