In BERT, multiple words in a single sentence can be masked at once. Does the model infer all of those words at once or iterate over them in either left to right or some other order?

For example:

The dog walked in the park.

Can be masked as

The [mask] walked in [mask] park.

In what order (if any) are these tokens predicted?

If you have any further reading on the topic, I'd appreciate it as well.


All the tokens are inferred at once, independently from one another.

  • $\begingroup$ Interesting... Thank you for the quick answer! $\endgroup$ Dec 31 '20 at 21:00
  • $\begingroup$ Please consider upvoting the answer and marking it as correct. $\endgroup$
    – noe
    Dec 31 '20 at 22:38
  • $\begingroup$ By the way, a nice read on BERT is this post. $\endgroup$
    – noe
    Jan 1 at 23:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.