Recherche par faisceau Décodage is a recherche heuristique algorithm commonly used in traitement du langage naturel (NLP) and traduction automatique to generate sequences of outputs, such as sentences or translations. Unlike exhaustive search methods that explore all possible sequences, beam search balances efficiency and accuracy by maintaining a fixed number of the best candidates at each step, known as the ‘beam width’.
L'algorithme commence avec un état initial and iteratively expands candidates by considering possible next steps. At each iteration, it evaluates all potential continuations of the current sequences and keeps only the top ‘k’ sequences based on their likelihood scores, where ‘k’ is the beam width. This process continues until a stopping criterion is met, such as generating a specific token denoting the end of the sequence.
L'avantage principal de la recherche par faisceau est qu'elle réduit la charge computationnelle par rapport aux méthodes de recherche exhaustive tout en fournissant des séquences de sortie robustes et pertinentes. Cependant, elle présente aussi certaines limites : si la largeur du faisceau est trop étroite, elle peut manquer la séquence optimale ; inversement, si la largeur du faisceau est trop large, cela peut entraîner une augmentation du calcul sans gains significatifs en qualité de sortie. Ainsi, choisir une largeur du faisceau appropriée est crucial pour équilibrer performance et efficacité.
La recherche par faisceau est largement utilisée dans diverses applications d'IA, y compris reconnaissance vocale, text generation, and machine translation, where generating coherent and contextually relevant sequences is critical.