TorchLean API

NN.MLTheory.CROWN.Proofs.DirectedIBPSoftmax

Rounded softmax range transfers #

Softmax probabilities are bounded using the real, max-shifted specifications. Axis permutations preserve these coordinate bounds. The hard-mask transfer additionally detects blocked entries and rows with exactly one allowed entry.

Moving a valid softmax axis to the end preserves its extent as the row width.

Every coordinate of the actual innermost softmax lies in the closed unit interval.

The actual real softmax along any valid axis has probability-valued coordinates.

Softmax on a singleton selected axis is exactly one at every coordinate.

A blocked logit has exactly zero probability in the real hard-mask specification.

Hard-masked probabilities lie in the unit interval, including an entirely blocked row.

theorem NN.MLTheory.CROWN.Graph.DirectedBackward.hardMaskedSoftmaxVecSpec_eq_one {n : ℕ} (x : TorchLean.Tensor ℝ [n]) (allowed : TorchLean.Tensor Bool [n]) (i : Fin n) (hi : allowed.getScalar i = true) (hunique : ∀ (j : Fin n), allowed.getScalar j = true → j = i) :

The only allowed entry in a hard-mask row has probability one.

The executable range box encloses the actual real softmax of any input tensor.