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
- Enter probabilities, row, column, temperature. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| probabilities | Probabilities | Required. Array of finite number; maximum items 256. |
| row | Row | Required. Safe integer; minimum 0. |
| column | Column | Required. Safe integer; minimum 0. |
| temperature | Positive dimensionless logit/input temperature multiplier under the stated convention. | Required. Finite number; strictly above 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| derivative | One log-softmax Jacobian entry dlog(p[row])/dlogit[column], evaluated algebraically from supplied probabilities. | Required. Finite number. |
{
"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
Similar or alternative tools
- Softmax One Logit Coordinate Derivative
Return p[row]*(indicator(row=column)-p[column])/temperature.
- Activation: Softmax Pairwise Logit Odds
Return (firstLogit-secondLogit)/temperature as the natural-log ratio of their softmax probabilities.