Adding Gradient Contributions Along Two Paths
When an intermediate quantity contributes to a result through several paths, its derivative includes a contribution from each path.
- Source
- Anbloq
- Language
- English
- Created
- Updated
- Chapters
- 2
- Reading time
- 1 min
In this article2 chapters
Trace a small graph
Let \(L=w^2+3w\). At w=2 the square contributes four and the linear term contributes three, giving derivative seven. Dropping either path changes the update. Task graphs help visualize shared dependencies.
Connect to automatic differentiation
Reverse traversal can accumulate both contributions at the shared node before continuing. See reverse-mode differentiation for the general rule.[1]