Mask language model: restoring missing position is different from predicting the future

The mask language model covers part of the input and restores them using the visible context.

Thematic shorts • IntroductionCollate in 2 self-measured2 First-hand sources
Start Body
Learning objectives and first steps2 objectives . 1 first fix

Try to do it after reading

  • Explain mask language models: mechanisms and prerequisites for restoring missing positions and predicting the future
  • Positioning the mechanism ' s fault limits with fixed examples

Suggested first

  • Classification of cross entropy and two-way context

Issues and mechanisms

The mask language model covers part of the input and restores them using the visible context. Unlike the projection of the future from the left to the right, the target position can draw on both sides of the message and thus the indications obtained are appropriate for a variety of understanding tasks. The data found in the training target, mask sampling and replacement strategy jointly determine the model cannot be assumed to be free to generate text in the same way simply because of the use of Transformer on the web.

The location selected for supervision was assembled at M, the loss was calculated only for the actual token in M, and the remaining positions, while participating in the calculation, did not normally assume direct responsibility for the restoration supervision. (b) The selection of the location to be replaced is a specific formulation, some using a special mask, some retaining the original word or randomly used word; Location selection is not the same variable as input replacement, and the record should be separated.

A concrete example

The synthetic sentence, “It's raining in Beijing today”, covers a teaching of “Beijing” from token. Models can read “Today” and “rain” to help recover. If there is only this part of the monitoring collection and the correct entry is likely to be 0.25, the sample will recover the loss of approximately 1.386294; The remaining four unselected positions could not be erroneously classified as zero losses divided by five. The real tokenizer may cut several names and re-label them to their physical location.

Borders and checks

Too high a masking ratio may result in inadequate context, too low targets are scarce and the effect depends on data and mandate. There is also a need to identify pool and downstream training when used for sentence expression. (a) It is unfair to compare the two-way recovery score directly to the standard self-return confusion, as the information available and the object of the standardization are different; Cross-target assessments should adopt common downstream agreements.

A method of verification

(a) Construct a teaching sentence that can only be restored by right-hand threads, which can test whether the two-way visual range is actually effective; The right-hand thread will then be blocked to see if the mission becomes as difficult as expected. The original word for the target position, if it is to remain unchanged at some point, must be determined by the damage strategy rather than by pre-processing errors. The recording of three lists of selected locations, actual replacements and true labels allows for the separation of sampling errors, input errors and attribution errors, and avoids using only the overall recovery rate for diagnosis.

Check understanding

Are the untargeted locations completely absent from training?

No, it's not. They can still influence the location of the target through context and receive the parameter gradient along the network; Only the labels that do not directly account for the current recovery losses.

Why can't this recovery loss be compared directly to self-return confusion?

One can read the context of the future, the other can read the prefix, with different predictions. Even when cross-enthon is used, the information on the condition of the values varies.

Sources and reconciliations

Definitions, methods and interfaces are available.

  1. BERT — Pre-training of Deep Bidirectional Transformers
  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.