Machine Learning for Physical Systems · Lecture 5

Physics in the loss

Shortcut: P

A network learns how a hot part cools and how a mass swings by checking the law of physics, not by copying answers.

    The network's curve for the cooling law

    Residual r = θ′ + θ of the network: zero where the law holds

    The residual along the time axis
    The cooling law in scaled form: θ′ + θ = 0, with θ = 1 at the start and θ = 0 at room temperature. Collocation points: points where the law is checked; nothing is measured there.
    1. Train with the start value in the loss.
    2. Now choose none: which curve does it find, and why?
    3. Use only 4 collocation points: where does the residual stay large?

    The start value θ(0) = 1

    Points where the law is checked; nothing is measured there.

    Largest error
    θ(0) of the network

    Loss over the training steps (log scale)

    The terms of the loss after every training step

    More options

    These options change all three steps.

    Random start
    Random start 1

    Every random start is repeatable: the same number always gives the same knobs.

    Check the exact derivatives

    Compares the derivatives of the current network, and the gradient of its loss, with finite differences.

    Table: the readings
    The steel part (step 2)
    Time [min]Reading [°C]True law [°C]
    The swinging mass (step 3)
    Time τReading xExact x (ζ = 0.1)
    How it is computed

    The readings are made in this page: the steel part from the true law T = 20 + 180 e−0.25 t °C plus fixed deviations of up to 2.5 °C, as in Lectures 4 and 5; the swinging mass from the exact motion for ζ = 0.1 plus noise.