← all notes

Shortcut Models

concept

Builds on top of Flow Matching.

The network still predicts velocity but it takes in one additional input
𝑑
or the distance to jump towards the input data from the current
π‘₯
𝜏
.

The improvement here is that since the model is now parameterized on
𝑑
as well, we don’t need to take fixed jumps anymore.

How is it trained?

We have:

𝑑
min
, which is the same step size as normal flow-matching. For
𝑑
in
𝑑
π‘š
𝑖
𝑛
<
𝑑
<
1
, we have a bootstrap loss:

𝐿
(
πœƒ
)
=
β€–
𝑓
πœƒ
(
π‘₯
𝜏
,
𝜏
,
𝑑
)
βˆ’
𝑣
𝑑
π‘Ž
π‘Ÿ
𝑔
𝑒
𝑑
β€–
2

where,

𝑣
target
=
{
π‘₯
1
βˆ’
π‘₯
0
if
𝑑
=
𝑑
π‘š
𝑖
𝑛
𝑠
𝑔
(
𝑏
β€²
+
𝑏
β€³
)
2
,
for
𝑑
∈
𝑑
π‘š
𝑖
𝑛
<
𝑑
≀
1

where,

𝑏
β€²
=
𝑓
πœƒ
(
π‘₯
𝜏
,
𝜏
,
𝑑
2
)
,
π‘₯
β€²
=
π‘₯
𝜏
+
𝑑
2
𝑏
β€²
𝑏
β€³
=
𝑓
πœƒ
(
π‘₯
β€²
,
𝜏
+
𝑑
2
,
𝑑
2
)

The intuition here is, learn how to jump
𝑑
by learning how to jump
𝑑
2
twice. You can do this recursively until you hit the base case
𝑑
π‘š
𝑖
𝑛
, which is just regular Flow Matching

To choose the distances that we sample from, we take a
𝐾
π‘š
π‘Ž
π‘₯
which is a power of two and sample like so:

𝑑
∼
1
π‘ˆ
(
1
,
2
,
4
,
8
,
…
,
𝐾
π‘š
π‘Ž
π‘₯
)

This means the smallest time step we can take is
1
𝐾
π‘š
π‘Ž
π‘₯
.

The shortcut model is more expensive to train than flow matching, but far cheaper for inference.