Skip to content

Main content

LogSoftmax One Logit Coordinate Derivative Tool

Return one log-softmax logit derivative at fixed positive temperature from supplied probabilities.

Loading tool…

Description

Return (indicator(row=column)-p[column])/temperature, the log-softmax coordinate derivative.

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 (indicator(row=column)-p[column])/temperature, the log-softmax coordinate derivative.

When to use this tool

Use LogSoftmax 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 probabilities in [0,1] summing to one within 10^-12, temperature>0 and in-range whole row/column indices. Return (indicator(row=column)-p[column])/temperature, the log-softmax coordinate derivative.1

Input fieldMeaning and unitsAccepted input
probabilitiesProbabilitiesRequired. 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 log-softmax Jacobian entry dlog(p[row])/dlogit[column], evaluated algebraically from supplied probabilities.Required. Finite number.
json
{
  "input": {
    "probabilities": [
      0.25,
      0.75
    ],
    "row": 0,
    "column": 1,
    "temperature": 1
  },
  "output": {
    "derivative": -0.75
  }
}

Limitations and assumptions

  • This uses supplied probabilities without renormalization or computing their logarithms; endpoint probabilities are accepted even when log probabilities would be nonfinite.
  • 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/logsoftmax-one-logit-coordinate-derivative — tool.io

Similar or alternative tools