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)
Configuration for causal next-block trajectory prediction.
Parameters
core_kindBlockForecastCore- required.
patch_sizeint- required. Native timesteps represented by one block.
max_patch_rankint- default=8.
max_trajectory_rankint- default=8.
keep_local_tcnbool- default=False.
gru_hidden_unitsint | None- default=None.
residual_scale_initfloat- default=0.1. Initial learned multiplier on the residual update.
voltage_anchor_countint | None- default=None.
event_templatetuple[float, ...] | None- default=None.
event_template_center_initfloat- default=0.9208316802978516.
event_template_temperaturefloat- default=0.25.
event_template_hardbool- default=False.
behavior_adaptationbool- 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)
Predict each native-resolution output block from prior input blocks.
Bases: nn.Module.
Parameters
sourcenn.Module- required.
forecast_configBlockForecastConfig- 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()CausalBlockForecastModel.decode_block_state_sequence()CausalBlockForecastModel.forward()CausalBlockForecastModel.component_manifest()
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
Encode a native sequence and return each causal macro state.
Parameters
xtorch.Tensor- required. Input tensor for the full-sequence or streaming operation.
morphology_indicestorch.Tensor | None- keyword-only, default=None. Integer class assignments into the model's ordered morphology vocabulary; one per batch item or persistent neuron.
behavior_parameterstorch.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
Decode dense native-rate trajectories from causal macro states.
Parameters
block_statetorch.Tensor- required. Persistent state of the block-forecast recurrence.
behavior_parameterstorch.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
Predict native spike and soma outputs for the supplied sequence.
Parameters
xtorch.Tensor- required. Input tensor for the full-sequence or streaming operation.
morphology_indicestorch.Tensor | None- keyword-only, default=None. Integer class assignments into the model's ordered morphology vocabulary; one per batch item or persistent neuron.
behavior_parameterstorch.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]
Describe the model’s temporal and readout components.
Returns
dict[str, object]