Equal-share tie rules #
For attained-value reducers such as minimum and maximum, this module specifies and proves an explicit convention that distributes cotangents equally among tied coordinates.
The equal-share weight assigned to one coordinate tied at a reducer's output.
All coordinates in the fiber whose primal value equals the reduced value receive the reciprocal of their count; every other coordinate receives zero. The reducer is kept as an ordinary function, so the same convention can be used for minimum, maximum, or a custom attained-value reducer.
Instances For
The equal-sharing linearization of a nonempty reduction at a fixed primal tensor.
When several coordinates attain the reduced value, their input tangents are averaged. For minimum and maximum this is an explicit tie convention, not a claim that the classical derivative is unique at a tie.
Instances For
The reverse map adjoint to equalShareTieDifferential.
Each selected input receives the same fraction of its fiber's output cotangent; nonselected inputs receive zero.
Instances For
If a reducer returns one of its input values, the equal-share weights in every nonempty fiber sum to one.
Reduction.min_mem and Reduction.max_mem provide the premise for minimum
and maximum. Thus a tie among n extrema contributes exactly 1 / n at each
selected coordinate and contributes total weight one.
The equal-sharing differential and VJP are adjoint under the finite tensor pairing.
This is an algebraic identity for the named tie policy. At a minimum or maximum tie it describes one symmetric generalized derivative; it does not assert that the ordinary derivative exists there.