The paper multiplies each upsampled vector by its confidence, but with a straight-through estimator: the forward value of the factor is exactly 1, while the gradient is that of .
ste_one(c)
c is a float tensor of any shape with values in [0, 1]. Return a tensor of the same shape and dtype whose values are exactly 1.0 (compare with ==, no rounding error allowed) and whose gradient with respect to c is the identity.ste_upsample(z_tilde, p, b)
z_tilde float (B, L, D), p float (B, L), b bool (B, L).p where b is True, else 1 - p) and return ste_one(c)[..., None] * z_tilde.z_tilde, and gradients must flow to both z_tilde and p.