Skip to content
heliaEDGE
Reference
HELIA

gumbel_softmax_bottleneck

Machine-readable model

  • GumbelSoftmaxBottleneckclassDiscrete bottleneck via Gumbel-Softmax (Concrete) with optional straight-through hard one-hot.
class

Discrete bottleneck via Gumbel-Softmax (Concrete) with optional straight-through hard one-hot.

helia_edge/layers/gumbel_softmax_bottleneck.py:6

GumbelSoftmaxBottleneck(
num_embeddings: int,
embedding_dim: int,
temperature: float = 1.0,
hard: bool = True,
input_is_logits: bool = False,
use_bias: bool = True,
kl_weight: float = 1.0,
**kwargs={},
)

Discrete bottleneck via Gumbel-Softmax (Concrete) with optional straight-through hard one-hot.

Tracks metrics (logged via metrics):

  • gs_bits_per_index (lower bound, bits/index)
  • gs_perplexity (empirical perplexity from hard argmax histogram)
  • gs_usage (fraction of codes used at least once in the batch)
  • gs_temperature (current τ; useful when annealing)