Formula

Computational Cost of Greedy Search in Sequence-to-Sequence Models

In contrast to exhaustive search, the computational cost of greedy search in sequence-to-sequence generation is linearly proportional to the sequence length, given by O(∣Y∣T′)\mathcal{O}(|\mathcal{Y}|T'), where ∣Y∣|\mathcal{Y}| is the vocabulary size and T′T' is the sequence length. This makes it miraculously cheap, although far from optimal. For example, with a vocabulary of ∣Y∣=10000|\mathcal{Y}|=10000 and a sequence length of T′=10T'=10, greedy search only requires evaluating 10000imes10=10510000 imes 10 = 10^5 sequences.

0

1

Updated 2026-05-14

Contributors are:

Who are from:

Tags

D2L

Dive into Deep Learning @ D2L