Beam Search

Intermediate

Search algorithm for generation that keeps top-k partial sequences; can improve likelihood but reduce diversity.

AdvertisementAd space — term-top

Why It Matters

Beam search is essential in applications like machine translation and text generation, where generating coherent and contextually relevant sequences is critical. By balancing the trade-off between quality and diversity, beam search enhances the performance of AI models, making them more effective in real-world tasks.

Beam search is a heuristic search algorithm used in sequence generation tasks, such as natural language processing and machine translation. It maintains a fixed number of the most promising partial sequences, known as beams, at each step of the decoding process. The algorithm expands these beams by generating possible next tokens and selecting the top-k sequences based on their cumulative probabilities, thus balancing exploration and exploitation. Mathematically, beam search can be described as maintaining a set of sequences S_t at time t, where |S_t| = k, and updating S_{t+1} by evaluating the likelihood of extending each sequence in S_t. While beam search improves the likelihood of generated sequences, it can lead to reduced diversity, as it may favor more probable sequences at the expense of exploring less likely but potentially more creative outputs. This technique is closely related to other decoding strategies, such as greedy search and sampling methods.

Keywords

Domains

Related Terms

Welcome to AI Glossary

The free, self-building AI dictionary. Help us keep it free—click an ad once in a while!

Search

Type any question or keyword into the search bar at the top.

Browse

Tap a letter in the A–Z bar to browse terms alphabetically, or filter by domain, industry, or difficulty level.

3D WordGraph

Fly around the interactive 3D graph to explore how AI concepts connect. Click any word to read its full definition.