Finally we construct an answer span prediction matrix O = uptri(o s o e ) ∈ R n×n , where uptri(X) represents the upper triangular matrix of a matrix X.
for the training, we minimize −log(O as,ae ) on each training example whose labeled answer span is [a s , a e ]; for the inference, we separately take the row index and column index of the maximum element in O as a s and a e .