However, it is not satisfying since texts and images are forced to be in one-to-one correspondence.
following (Karpathy and Li, 2015;Carvalho et al., 2018), we use a max-margin ranking loss to ensure the gap between both terms is higher than a fixed margin γ (cf.