Examples¶
Every example in the examples/ directory is a single, runnable script that
trains/evaluates on synthetic data and saves a publication-grade, magma-themed
figure. Run any of them with:
uv run python examples/<name>.py
Example |
What it shows |
|---|---|
Compact support ( |
|
Recovers a hidden generating |
|
An animated |
|
Bounded Tsallis cross-entropy ( |
|
A GCN with learnable Tsallis |
|
A |
|
Attention pooling with |
|
Animated: watch the attention |
The recurring theme: q as a learnable parameter¶
Five of the seven examples make q itself trainable, and the headline result is
consistent: gradient descent reliably discovers a useful entropic index, with
no grid search.
Classification — the learned loss
qsettles in the robust regime (q ≈ 0.3) and matches the best hand-tuned fixedqat every noise level.Node classification — on a graph, the learned GCN loss
qsettles in the robust regime and stays accurate as label noise the Shannon baseline amplifies grows.Attention — the learned attention
qconverges near sparsemax (q ≈ 2.0), zeroing out distractor tokens.Reinforcement learning — the learned policy
qrises over training, annealing exploration into exploitation.