A Computation Graph is directed acyclic graph (DAG) used to represent and compute mathematical functions.
- Nodes Represent variables (inputs/ outputs) or intermediate results which are functions of their predecessors.
- Edges: Indicate the direction of computation

Example


Chain Rule
To handle networks with millions or billions of parameters, calculating derivatives by hand is impossible; the Chain Rule allows for efficient algorithmic computation.
Single Path Chain Rule
If is a function of , and is a function of , then:
Multivariate Chain Rule
When an output is influenced by multiple paths (multiple successors), the derivatives must be summed:
- For two paths:
- General Case: , where are successors of .

