Skip to content

Main content

Softmax One Logit Coordinate Derivative Tool

Return one softmax Jacobian entry from a validated probability vector and explicit positive temperature.

Loading tool…

Description

Return p[row]*(indicator(row=column)-p[column])/temperature.

Softmax normalizes exponentiated logits into probabilities. At temperature T it applies logits/T, so Jacobian entries contain a 1/T factor. Log-softmax derivatives and pairwise log probability ratios differ from the softmax derivative and from ordinary odds.

Return p[row]*(indicator(row=column)-p[column])/temperature.

When to use this tool

Use Softmax One Logit Coordinate Derivative when checking the stated softmax/log-softmax coordinate or log-ratio convention.

How to use the tool and how it works

  1. Enter probabilities, row, column, temperature. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read derivative. Use the output convention below.

Require a probability vector in [0,1] summing to one within absolute tolerance 10^-12, positive temperature and in-range whole row/column indices. Return p[row]*(indicator(row=column)-p[column])/temperature.1

Input fieldMeaning and unitsAccepted input
probabilitiesSupplied probability vector with absolute sum tolerance 10^-12; no renormalization.Required. Array of finite number; maximum items 256.
rowRowRequired. Safe integer; minimum 0.
columnColumnRequired. Safe integer; minimum 0.
temperaturePositive dimensionless logit/input temperature multiplier under the stated convention.Required. Finite number; strictly above 0.
Output fieldInterpretationReturned shape
derivativeOne softmax Jacobian entry dp[row]/dlogit[column] with logits scaled by 1/temperature.Required. Finite number.
json
{
  "input": {
    "probabilities": [
      0.25,
      0.75
    ],
    "row": 0,
    "column": 1,
    "temperature": 1
  },
  "output": {
    "derivative": -0.1875
  }
}

Limitations and assumptions

  • This is one softmax Jacobian entry under logit/temperature scaling; supplied probabilities are not generated from logits or renormalized.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Use the complete explicit function and the intended parameter, branch and numerical conventions for symbolic, tensor or model-level differentiation; assess training behavior independently.

References

  1. Calculation and input contract: activation/softmax-one-logit-coordinate-derivative — tool.io

Similar or alternative tools