Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between a greedy decoder RNN and a beam decoder with k=1?

Given a state vector we can recursively decode a sequence in a greedy manner by generating each output successively, where each prediction is conditioned on the previous output. I read a paper recently that described using beam search during decoding with a beam size of 1 (k=1). If we are only retaining the best output at each step, isn't this just the same thing as greedy decoding, and offers none of the benefits typically provided by beam search?

like image 760
jstaker7 Avatar asked Sep 14 '16 20:09

jstaker7


People also ask

What is greedy decoder?

Greedy Search DecoderA simple approximation is to use a greedy search that selects the most likely word at each step in the output sequence. This approach has the benefit that it is very fast, but the quality of the final output sequences may be far from optimal.

What is the tradeoff between the greedy search and beam search algorithms?

Beam Search makes two improvements over Greedy Search. With Greedy Search, we took just the single best word at each position. In contrast, Beam Search expands this and takes the best 'N' words. With Greedy Search, we considered each position in isolation.

Is beam search greedy search?

But in beam search, only a predetermined number of best partial solutions are kept as candidates. It is thus a greedy algorithm.

What is beam size machine learning?

Beam size, or beam width, is a parameter in the beam search algorithm which determines how many of the best partial solutions to evaluate. In an LSTM model of melody generation, for example, beam size limits the number of candidates to take as input for the decoder.


1 Answers

Finally found an answer: beam size of 1 is the same as greedy search.

From "Abstractive Sentence Summarization with Attentive Recurrent Neural Networks":

"k refers to the size of the beam for generation; k = 1 implies greedy generation."
like image 136
jstaker7 Avatar answered Oct 26 '22 00:10

jstaker7