Topics
A heuristic search algorithm used in sequence generation tasks, such as machine translation or text generation. It provides a trade-off between accuracy and computational cost via the flexible choice of the beam size. E.g. with , we only keep the first and the second probable sequence at each step and finally pick the sequence that maximizes:
Beam search will always find an output sequence with higher probability than greedy search, but is not guaranteed to find the most likely output.