Composition

Level FundamentalDifficulty ★★★★★Concept⌖ Open in the map

What is it?

Applying one function after another: (g∘f)(x)=g(f(x))(g \circ f)(x) = g(f(x)). Deep networks, compilers and data pipelines are long compositions, and the chain rule tells how to differentiate them.

Formulas

(g∘f)(x)=g(f(x)),fL∘⋯∘f2∘f1(g \circ f)(x) = g(f(x)), \qquad f_L \circ \cdots \circ f_2 \circ f_1

Where it shows up in AI

  • Neural networks★★★★★fundamentalAI and machine learning

    A deep network is the composition of its layers, fL∘⋯∘f1f_L \circ \dots \circ f_1.

  • Automatic differentiation★★★★★fundamentalAI and machine learning

    AD sees a program as a composition of primitive operations and differentiates each one.

Where is it used?

Computing topics reachable from here, through the chain of ideas that leads to them:

What depends on it

This page has the essentials. A fuller treatment (intuition, formal definition, worked example) is on the way.

↑ ↓ to navigate · ↵ · Esc