beam search: why do cumulative probabilities favour short sequences

The beam search retains a number of high-point prefixes at each step, is extended and re-screened to try to find high-probability output in a huge sequence space.

• Step by stepCollate in 2 self-measured2 First-hand sources
Start Body
Learning objectives and first steps2 objectives . 1 first fix

Try to do it after reading

  • Explains the mechanism and premise for beam searches: why the cumulative probability favours short sequences
  • Positioning the mechanism ' s fault limits with fixed examples

Suggested first

  • logarithmic probability and sequence ender

Issues and mechanisms

The beam search retains a number of high-point prefixes at each step, is extended and re-screened to try to find high-probability output in a huge sequence space. It is not an independent sample of multiple answers at the same time, nor is it a guarantee that the best is found under limited beams. The sequence score how to handle length and end is a significant change in the output, and cannot claim to restore the decoding condition by recording just one beam-wide parameter.

The probability of a self-regression sequence is the probability of a condition multiplier, and the logarithmic scores continue to decrease with the new entries. Short sequences may be superior when candidates of different lengths directly compare accumulated logarithms; The length is normalized or penalized to change preferences, but at the same time to change the target of the search. The objectives token should be clearly included, whether the end date should be counted and how the closing assumptions should be retained.

A concrete example

(a) Two composite candidates with a probability of 0.7 per correct path, a total probability of 0.49, or a negative logarithmic of 0.71335; Candidates are three-long, 0.8 each, with a total probability of 0.512, a logarithmic of about 0.66943 and a slightly higher probability of total B. If the other candidate is also 0.8 per person, the overall probability is 0.4096, which is lower than A. The average logarithm favours the path of 0.8 per person, indicating that the total probability differs from the average definition of length.

Borders and checks

High probability does not equal the best of the mission and models may prefer to be empty, repetitive or prematurely terminated. The size of the beam does not guarantee an increase in the one-size-fits-all quality of the facts. Open dialogue, translation and structure generate different objectives, and selection rules should be determined by task evaluation; The approximate quality of the search cannot be confused with the probabilities of the language model itself.

A method of verification

A path with a low initial probability but a high follow-up can be constructed to check whether the small beam width is cut in advance. This makes a distinction between model fractions and errors caused by a search approximation. Length penalties should also provide a consistent definition of closed and uncompleted candidates to prevent over-counting or missing end entries on a particular path. The end quality of the report should be reported with a cut-off rate and an average length, as the seemingly higher matching score may come from shorter, more conservative outputs rather than from more accurate probabilities.

Check understanding

Is it possible to find the highest probability series in the world?

The limited beam width may still cut later better paths in advance, and maximum length and stop rule limit search. Only a complete search under clear conditions would be more secure.

Can the average logarithmic and total logarithm be compared to the same indicator?

Can't. They differ in their preferences for length; The choice of one rule and the targeting of the other would result in an inconsistent interpretation.

Sources and reconciliations

Definitions, methods and interfaces are available.

  1. Hugging Face Transformers — Generation
  2. Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer

Figures and calculations are reorganized according to this chapter. Mathematical measurements, framework operations and real business effects are described separately in the body of the text.

← Back to the knowledge directory
Ask Max Ask about this site
Ask Max ↗

Opening the assistant…

Paper figure

Photo comments

LEAVE A NOTE

About this photograph

Connecting to the discussion board…

    Comments become public after moderation. You can delete your own comments from this browser.
    No email is required. Clearing cookies prevents this browser from claiming earlier comments.

    MAX WANG / INDEX

    Find something

    Enter a keyword, or explore the directory below.