API reference

Block-forecast models

Signatures, parameters, return contracts, and source for block-forecast models.

Overview

CausalBlockForecastModel predicts native outputs through causal block forecasting. The top-level AxoSimGRU alias points to this implementation. Its backbone and BlockForecastConfig constructor contract differs from the named GRU-profile factory.

Source revision: caef7be03abd. Public export index.

BlockForecastConfig

axosim.block_forecast.BlockForecastConfig(core_kind: BlockForecastCore, patch_size: int, max_patch_rank: int = 8, max_trajectory_rank: int = 8, keep_local_tcn: bool = False, gru_hidden_units: int | None = None, residual_scale_init: float = 0.1, voltage_anchor_count: int | None = None, event_template: tuple[float, ...] | None = None, event_template_center_init: float = 0.9208316802978516, event_template_temperature: float = 0.25, event_template_hard: bool = False, behavior_adaptation: bool = False)

Source

Configuration for causal next-block trajectory prediction.

Parameters

core_kind BlockForecastCore
required.
patch_size int
required. Native timesteps represented by one block.
max_patch_rank int
default=8.
max_trajectory_rank int
default=8.
keep_local_tcn bool
default=False.
gru_hidden_units int | None
default=None.
residual_scale_init float
default=0.1. Initial learned multiplier on the residual update.
voltage_anchor_count int | None
default=None.
event_template tuple[float, ...] | None
default=None.
event_template_center_init float
default=0.9208316802978516.
event_template_temperature float
default=0.25.
event_template_hard bool
default=False.
behavior_adaptation bool
default=False. Enable the learned behavior adaptation bank.

Attributes

Constructor fields are retained as read-only attributes.

CausalBlockForecastModel

axosim.block_forecast.CausalBlockForecastModel(source: nn.Module, forecast_config: BlockForecastConfig)

Source

Predict each native-resolution output block from prior input blocks.

Bases: nn.Module.

Parameters

source nn.Module
required.
forecast_config BlockForecastConfig
required. Block forecasting configuration, including core and cadence.

Read-only attributes

CausalBlockForecastModel.config
Configuration retained by the model or its shared backbone. Source
CausalBlockForecastModel.num_input: int
Native input-channel count. Source
CausalBlockForecastModel.num_output: int
Readout-channel count. Source
CausalBlockForecastModel.num_branch: int
Branched input-feature count. Source
CausalBlockForecastModel.patch_size: int
Native timesteps represented by one forecast block. Source
CausalBlockForecastModel.sparse_voltage_output: bool
Source
CausalBlockForecastModel.behavior_parameter_count: int
Source

Methods

CausalBlockForecastModel.block_state_sequence

axosim.block_forecast.CausalBlockForecastModel.block_state_sequence(x: torch.Tensor, *, morphology_indices: torch.Tensor | None=None, behavior_parameters: torch.Tensor | None=None) -> torch.Tensor

Source

Encode a native sequence and return each causal macro state.

Parameters

x torch.Tensor
required. Input tensor for the full-sequence or streaming operation.
morphology_indices torch.Tensor | None
keyword-only, default=None. Integer class assignments into the model's ordered morphology vocabulary; one per batch item or persistent neuron.
behavior_parameters torch.Tensor | None
keyword-only, default=None. Logical behavior coefficients to compile into the model's deployed coefficient width.

Returns

torch.Tensor

CausalBlockForecastModel.decode_block_state_sequence

axosim.block_forecast.CausalBlockForecastModel.decode_block_state_sequence(block_state: torch.Tensor, *, behavior_parameters: torch.Tensor | None=None) -> torch.Tensor

Source

Decode dense native-rate trajectories from causal macro states.

Parameters

block_state torch.Tensor
required. Persistent state of the block-forecast recurrence.
behavior_parameters torch.Tensor | None
keyword-only, default=None. Logical behavior coefficients to compile into the model's deployed coefficient width.

Returns

torch.Tensor

CausalBlockForecastModel.forward

axosim.block_forecast.CausalBlockForecastModel.forward(x: torch.Tensor, *, morphology_indices: torch.Tensor | None=None, behavior_parameters: torch.Tensor | None=None) -> torch.Tensor

Source

Predict native spike and soma outputs for the supplied sequence.

Parameters

x torch.Tensor
required. Input tensor for the full-sequence or streaming operation.
morphology_indices torch.Tensor | None
keyword-only, default=None. Integer class assignments into the model's ordered morphology vocabulary; one per batch item or persistent neuron.
behavior_parameters torch.Tensor | None
keyword-only, default=None. Logical behavior coefficients to compile into the model's deployed coefficient width.

Returns

torch.Tensor

CausalBlockForecastModel.component_manifest

axosim.block_forecast.CausalBlockForecastModel.component_manifest() -> dict[str, object]

Source

Describe the model’s temporal and readout components.

Returns

dict[str, object]

Search guides, examples, and API signatures.