BlockAlignedGaussianModulationND#

class BlockAlignedGaussianModulationND(
data_dim,
num_channels,
grid_size,
min_attenuation_at_step=0.1,
max_attenuation_at_limit=0.95,
init_extent=1.0,
parametrization='direct',
)#

Bases: GaussianModulationND

Gaussian modulation with channel-reversed std ordering for block-structured SIRENs.

Motivation#

GaussianModulationND initialises std_param so that channel 0 has the narrowest Gaussian (smallest σ, shortest spatial support, broadest spectral support) and the last channel has the widest Gaussian. This ordering is natural when channel index 0 carries high-frequency content, which should be localised in space.

Block-structured SIRENs such as BlockDiagonalMultiOmegaSIRENKernelND with a 'linear' or 'log' frequency schedule assign the lowest \(\omega_0\) (low-frequency content) to the first block. Low frequencies have long spatial support, so the natural alignment is the opposite: widest Gaussian on channel 0 (lowest \(\omega_0\)), narrowest on the last channel (highest \(\omega_0\)).

Implementation#

This subclass reverses std_param along the channel axis (dim=-1) immediately after the parent’s __init__. All other behaviour — forward pass, pre-hook clamping, parametrisation, gradient flow — is inherited unchanged from GaussianModulationND.

The channel ordering after reversal:

  • Channel 0: widest Gaussian (largest σ), longest spatial support, lowest effective frequency → matched to the lowest-\(\omega_0\) block.

  • Channel C-1: narrowest Gaussian (smallest σ), shortest spatial support, highest effective frequency → matched to the highest-\(\omega_0\) block.

param data_dim:

Number of spatial/temporal dimensions.

param num_channels:

Number of feature channels C to modulate.

param grid_size:

Number of grid points per spatial dimension.

param min_attenuation_at_step:

1D mask value at the first grid step (sets min_std clamp bound). Default 0.1.

param max_attenuation_at_limit:

1D mask value at the grid boundary (sets max_std clamp bound). Default 0.95.

param init_extent:

Per-axis bandwidth scale for initialisation (> 0). Default 1.0.

param parametrization:

One of 'direct', 'log', 'softplus'. Default 'direct'.

__init__(
data_dim,
num_channels,
grid_size,
min_attenuation_at_step=0.1,
max_attenuation_at_limit=0.95,
init_extent=1.0,
parametrization='direct',
)#

Initialise the block-aligned Gaussian mask; see the class docstring for argument semantics.

Parameters:
  • data_dim (int)

  • num_channels (int)

  • grid_size (int)

  • min_attenuation_at_step (float)

  • max_attenuation_at_limit (float)

  • init_extent (float)

  • parametrization (str)

Parameters:
  • data_dim (int)

  • num_channels (int)

  • grid_size (int)

  • min_attenuation_at_step (float)

  • max_attenuation_at_limit (float)

  • init_extent (float)

  • parametrization (str)