JVP: View how output changes along an input direction

A minor change in the input may only want to know in which direction the forecast will move.

• Step by stepCollate in 2 self-measured2 First-hand sources
Start Body
Learning objectives and first steps2 objectives 2 first fixes

Try to do it after reading

  • Calculate output changes in input direction
  • Objectives of comparison of forward and reverse models

Suggested first

  • Vector and Matrix Operations
  • Counts and chain rules

Only when you're concerned about a disturbing direction

A minor change in the input may only want to know in which direction the forecast will move. For example, two homogenized features are added to a known disturbance to observe the first step of the output. This calculates the reversible gradient of the output group to the input by multiplying the input direction. The two directions are different, and shape is different.

Still f(x₁,x₂) =( x ₁²+ x ₂,3 x ₁− x ₂), x = (2,1) for AOC in [4], [3,−1]. Now enter direction d = (1,2). Volume Jd The first is 4x1+1x2=6 and the second is 3x1−1x2=1, so the first step of the output changes direction [6,1].

An ε perturbation changes input to [2+ε,1+2ε] from output [5,5]. The first output becomes 5+6ε+ε² and the second 5+ε. Ignoring second-order terms gives increment ε[6,1]. At ε=0.001, the first true increment 0.006001 differs from approximation 0.006 by one millionth.

(a) JVP, which drives a whole picture of input direction and is suitable for certain sensitive issues with less direction and more output; VJP reverses an output group to input. The results cannot be considered interchangeable because both examples have exactly 2 dimensions. A non-square function is more exposed to differences: JVP produces a number when you enter a three-dimensional output, and VJP results are usually three-dimensional vectors.

A numerical check is [f(x+εd)−f(x−εd)]/(2ε). Centering cancels some quadratic error here but remains approximate for general nonlinear functions. Large steps leave the local region; tiny steps cause floating-point cancellation. Inspect stability across orders of magnitude rather than assuming smaller is always more accurate.

It is also possible to apply to real input. A category of ID or discrete slots cannot be added to 0.001 at random because of the number stored; The change may not have any legal semantics at all. JVP reflects the current continuous calculation model and is not automatically an operational intervention effect. Characteristic pre-processing, restraint and unit should be recorded with the direction vector. The interface is automatically micro-information, the value is developed as an original calculation, and no framework forward mode is claimed to have been run.

How do you change direction by ten, JVP?

(a) A linear first-order map of a fixed point, with results multiplied by ten; However, when using the limited scale of the physical disturbance test, the high-level error may not still be negligible.

What would this rule be changed to [0,1]?

Obtaining [1,−1] corresponding to the second column of Acomprehensive; It describes only one step of two output changes when the second input is entered.

The direction vector also requires a description of the unit. The same numerical direction is used when a characteristic is scaled 100 times, and the original space disturbance is already different and cannot be directly compared to the sensitivity.

Sources and reconciliations

Definitions, methods and interfaces are available.

  1. PyTorch — The Fundamentals of Autograd
  2. CS231n — Backpropagation, Intuitions

Figures and calculations are reorganized according to this chapter. Mathematical measurements, framework operations and real business effects are described separately in the body of the text.

← Back to the knowledge directory
Ask Max Ask about this site
Ask Max ↗

Opening the assistant…

Paper figure

Photo comments

LEAVE A NOTE

About this photograph

Connecting to the discussion board…

    Comments become public after moderation. You can delete your own comments from this browser.
    No email is required. Clearing cookies prevents this browser from claiming earlier comments.

    MAX WANG / INDEX

    Find something

    Enter a keyword, or explore the directory below.