Multimodal pre-training has propelled great advancement in vision-and-language research. These large-scale pre-trained models, although successful, fatefully suffer from slow inference speed due to enormous computation cost mainly from cross-modal attention in Transformer architecture. When applied to real-life applications, such latency and computation demand severely deter the practical use of pre-trained models. In this paper, we study Image-text retrieval (ITR), the most mature scenario of V+L application, which has been widely studied even prior to the emergence of recent pre-trained models. We propose a simple yet highly effective approach, LightningDOT that accelerates the inference time of ITR by thousands of times, without sacrificing accuracy. LightningDOT removes the time-consuming cross-modal attention by pre-training on three novel learning objectives, extracting feature indexes offline, and employing instant dot-product matching with further re-ranking, which significantly speeds up retrieval process. In fact, LightningDOT achieves new state of the art across multiple ITR benchmarks such as Flickr30k, COCO and Multi30K, outperforming existing pre-trained models that consume 1000  magnitude of computational hours. 1 1 Introduction Image-text retrieval (ITR) has been widely studied as a staple benchmark task in both NLP and computer vision communities. Traditional ITR search engines typically deploy ranking-based models built upon visual-semantic embedding matching (Faghri et al., 2017; Huang et al., 2018) or deep cross-modal fusion with attention mechanism (Lee et al., 2018; Li et al., 2020a,b). Earliest works (Kiros et al., 2014; Faghri et al., 2017;  Equal Contribution. 1 Code and pre-training checkpoints are available at https://github.com/intersun/LightningDOT . Wang et al., 2018) employ separate image encoder ( e.g., CNN) and text encoder ( e.g., RNN), the embeddings from which are then measured by doc product for similarity matching (Figure 1(a)). Later studies (Lee et al., 2018, 2019; Wang et al., 2019; Zhang et al., 2020) improve this paradigm by employing advanced region-level visual encoder ( e.g., Faster-RCNN) and applying cross-attention between word features and region features for multimodal fusion (Figure 1(b)). With the advent of Transformer (Vaswani et al., 2017) and BERT (Devlin et al., 2019), cross-modal retrieval tasks are more recently dominated by vision-and-language (V+L) pre-trained models, such as ViLBERT (Lu et al., 2019), UNITER (Chen et al., 2020), OSCAR (Li et al., 2020b), and VILLA (Gan et al., 2020). Large-scale pre-trained models learned from massive corpus of image-text pairs can power heterogeneous downstream tasks that take diverse modalities as inputs ( e.g., text, image, video, audio). These models benefit from the self-attention mechanism in Transformer architecture, learning joint image+text embeddings through pre-training objectives such as masked language modeling (MLM) and masked region modeling (MRM) (Figure 1(c)). However, the very ingredient that engenders the success of these pre-trained models, cross-modal attention between two modalities (through self-attention), also destines the inevitable latency and huge computation cost in training and deploying such massive-scale models. For example, UNITER (Chen et al., 2020) builds upon 12/24 Transformer layers, and trains over 10 million image+text pairs. The inference time of such large models with 110 million parameters is 48 seconds on average for text query from COCO dataset (Chen et al., 2015), not scalable in real-life applications serving millions of queries per second. To make real-time ITR possible with low latency, we ask a bold question: can we go back to the beginning, reverting to simple dot product for efficient cross-modal retrieval? To make this retro experiment feasible, we rely on Transformer to pre-train high-quality image and text encoders, but use efficient dot product for multimodal fusion instead of computationally heavy self-attention. To still facilitate effective cross-modal embedding learning, we use a special [CLS] token on both encoders, which transfers the learned embedding from the other modality (Figure 1(d)). We name this new paradigm LightningDOT , for its lightening speed benefiting from dot product computation. By removing the time-consuming cross-attention between modalities, the model can learn visual-semantic embeddings without extensive matching between each image-text pair during inference, as used in existing pre-trained models (Chen et al., 2020; Li et al., 2020b; Lu et al., 2019). Further, by eliminating the dependency on real-time computation over image-text pairs, we can compute all image and text embeddings independently offline just for once, and reuse these embeddings as cached indexes for new queries on the fly (Figure 2). For model training, we propose three learning objectives to jointly train two Transformer blocks: Image Encoder and Language Encoder. Specifically, Visual-embedding fused MLM (namely VMLM ) and Semantic-embedding fused MRM (namely SMRM ) ensure cross-modal information is harnessed even without cross-modality self-attention. A cross-modal retrieval objective (namely CMR ) encourages the model to learn multimodal fusion through pre-training. To maintain competitive model performance, we further introduce a re-ranking mechanism to bring back the benefit of cross-attention methods. In summary, LightningDOT is designed with late fusion to learn visual-semantic embeddings. Experiments on popular ITR benchmarks show that LightningDOT is 600/1900 times faster than existing pre-trained models on Flickr30k/COCO, while achieving new state-of-the-art results. When retrieving from larger candidate pool (>120K im-ages), LightningDOT is 23,000 times faster. To the best of our knowledge, this is the first known effort on improving V+L model efficiency. V+L Pre-training Inspired by the success of Transformer-based (Vaswani et al., 2017) language model pre-training (Devlin et al., 2019; Liu et al., 2019; Yang et al., 2019; Raffel et al., 2020; Lan et al., 2020; Clark et al., 2020), vision-and-language pre-training (Huang et al., 2020b; Su et al., 2020; Li et al., 2020b, 2019a) has become the prevailing paradigm in learning multimodal representations, with strong results on tasks such as image-text retrieval (Kiros et al., 2014), visual question answering (Antol et al., 2015) and referring expression comprehension (Yu et al., 2016). Exemplary works include two-stream (Tan and Bansal, 2019; Lu et al., 2019) and single-stream models (Chen et al., 2020; Li et al., 2020a; Zhou et al., 2020). Multi-task learning (Lu et al., 2020) and adversarial training (Gan et al., 2020) are also explored. This family of pre-training methods aims for general-purpose V+L without computation cost consideration. To the best of our knowledge, our work is the first known effort on pre-training visual-semantic embedding that enables low-latency real-time cross-modal retrieval. Ours is concurrent work with CLIP (Radford et al., 2021). Image-Text Retrieval Early cross-modal embedding works (Kiros et al., 2014; Wang et al., 2018; Faghri et al., 2017) focus on using a two-stream model to learn a unified visual-semantic embedding, with progressive improvement on two popular benchmarks: Flickr30K (Plummer et al., 2015) and COCO (Chen et al., 2015). Later methods with cross-attention (Lee et al., 2018, 2019; Wang et al., 2019; Zhang et al., 2020) become more popular, with significant performance gain. Pre-trained V+L models also fall into this category. By exploiting large-scale image-text datasets, pretrained V+L models further push the performance on Flickr30K and COCO. Although achieving high recall, cross-attention requires excessive computation cost during inference that cannot be overlooked. 2 In this work, inspired by dense retrieval in text retrieval domain (Guu et al., 2020; Karpukhin et al., 2020; Xiong et al., 2020; Mao et al., 2020; Lewis et al., 2020), we propose a more efficient attention-less framework. With pre-training, our model achieves better performance while being significantly faster than cross-modal attention methods. Note that the proposed approach is orthogonal to model compression techniques that reduce the number of layers/parameters (Sun et al., 2019; Jiao et al., 2020), since we do not reduce the number of parameters from the UNITER baseline. These two approaches can be combined to further boost the speed, which is an interesting future work direction. In this section, we present the proposed LightningDOT framework, which consists of two deep Transformers as image and language encoders. We first introduce three tasks designed to pre-train the model, then present our inference pipeline from offline feature extraction to online instant retrieval. f  V and f  L , respectively (  V ,  L are learnable parameters). Given a dataset of paired image and text { ( i, t ) } , we first extract region features v = { v 0 , v 1 , . . . , v N } ( v j  R d v , N is the number of regions) for image i , along with bounding box positions of regions via a pre-trained Faster-RCNN (Ren et al., 2015; Anderson et al., 2018). 3 The image encoder f  V encodes this sequence of image regions into a d -dimensional space f  V ( v ) = h = { h 0 , . . . , h N } ( h j  R d ) . The corresponding text t is tokenized into sub-word units and projected into high-dimensional feature vectors w = { w 0 , w 1 , ..., w T } ( w j  R d w , T is the number of tokens) following Devlin et al. (2019). 4 Similarly, the text encoding process can be written as f  L ( w ) = z = { z 0 , . . . , z T } ( z j  R d ) . We regard the output [CLS] embedding h 0 as global image representation, and z 0 as global text representation. Following sections discuss how to jointly train these two encoders to learn strong visual-semantic embeddings, through three pre-training objectives. Visual-embedding Fused Masked Language Modeling (VMLM) Masked Language Modeling (MLM) pre-training is first proposed by Devlin et al. (2019), where 15% of the words are masked 5 and the model is trained to reconstruct the masked words. Formally, we denote w m = { w m 1 , . . . , w m M } as masked tokens, where m  NM is the set of masked indices of size M , randomly sampled from a natural number N . w \ m are 3 v 0 is a special [CLS] embedding. 4 A 30k BPE (Sennrich et al., 2016) vocabulary (bert-basecased) is used to tokenize the text. LMLM ( t ) =  log P  L ( w m | w \ m ) =  1 MM (cid:88) k =1 log P  mlm ( w m k | z m k ) , (1) where  mlm is the additional parameters introduced to map hidden states z to word probabilities. Under the V+L setting, the textual input is usually highly correlated with the image. To leverage this cross-modal relation, we propose visual-embedding fused MLM (VMLM), in which the paired image i is considered as additional input when training the model to reconstruct masked tokens in sentence t . The loss function of VMLM can be formulated as: LVMLM ( t, i ) =  log P  ( w m | w \ m , i ) =  1 MM (cid:88) k =1 log P  mlm ( w m k | z m k + h 0 ) , (2) where  = {  V ,  L } and the word probabilities P  are conditioned on the corresponding image i via the global image representation h 0 . Although VMLM takes a similar mathematical form to the MLM task proposed in UNITER, they differ in two main aspects: 1) LightningDOT uses two separate encoders ( h 0 is computed by f  V ); and 2) visual dependency is explicitly injected to text representations ( z m k + h 0 ), instead of implicitly learned through cross-modal attention. Semantic-embedding Fused Masked Region Modeling (SMRM) Recent works on V+L pretraining (Lu et al., 2019; Tan and Bansal, 2019) have shown that mask-then-reconstruct pre-training on image regions also helps image+text embedding learning. Similar to MLM, Masked Region Modeling (MRM) is supervised by: LMRM ( i ) = D  mrm ( v m , f  V ( v \ m )) = 1 MM (cid:88) k =1 D  mrm ( v m k , h m k ) , (3) where D can be any differentiable distance function. Among the variants of MRM, we consider Masked Region Feature Regression (MRFR) with L2 distance and Masked Region Classification with KL-Divergence (MRC-kl), due to their proven success in learning V+L representations (Chen et al., 2020). 6 In MRFR, the L 2 distance between two feature vectors x and y is defined as: D  fr ( x , y ) = (cid:88) k (cid:107) x k  g  fr ( y k ) (cid:107) 22 , where (cid:107)  (cid:107) 2 denotes L 2 -norm, and g  fr (  ) is a learnable Multi-layer Perceptron (MLP) with parameters  fr . The KL-divergence DKL in MRC-kl measures distance between two probability distributions: D  mrc ( x , y ) = (cid:88) k DKL ( c ( x k ) || g  mrc ( y k )) , where  mrc is the parameters of a trainable MLP that maps feature vector x k to the object class distribution c ( x k ) predicted by Faster R-CNN. To incorporate language information encoded in the paired text, we extend MRM to Semantic-embedding fused MRM (SMRM), where the global text representation z 0 is exploited when reconstructing masked regions. LSMRM ( i, t ) = D  mrm ( v m , f  V ( v \ m ) , t ) = 1 MM (cid:88) k =1 D  mrm ( v m k , h m k + z 0 ) . (4) The specific variants SMRFR and SMRC-kl can be derived using the corresponding distance function, which is omitted for simplicity. Note that both the cross-modal fusion introduced in Eqn. (2) and Eqn. (4) uses simple addition without introducing extra parameters from their uni-modal counterpart. Moreover, the extra parameters  mlm and  mrm is not needed at downstream inference so will not slow down the retrieval. Cross-modal Retrieval Objective (CMR) Beyond image or text focused reconstructive objectives, we also propose a new pre-training task, Cross-modal Retrieval (CMR), to leverage the paired information between image and text. With this learning objective, the model is optimized to promote high similarity score for a matched image-sentence pair ( i, t ) and vice versa. The similarity score between query t and image i is defined as: S ( t, i ) = (cid:104) z 0 , h 0 (cid:105) , (5) where (cid:104) , (cid:105) denotes the inner product between two vectors, and h 0 and z 0 are the output [CLS] embeddings from image encoder f  V and language encoder f  L , respectively. 6 In our implementation, no textual inputs are directly concatenated with image regions due to separate encoding of image and text. In order to capture both image-retrieval and text-retrieval supervision signals in a single forward-backward pass, we propose a bi-directional variant of contrastive loss. Given any matched image-text pair ( i, t ) , we treat text t as the query, sample n  1 negative images { i 2 , i 3 , . . . , i n } , and then compute the objective function as: L ( t ) IR =  log e S ( t,i 1 ) (cid:80) nk =1 e S ( t,i k ) , where t 1 := t . Similarly, we take image i as query ( i 1 := i ), sample n  1 negative text, and compute: L ( i ) TR =  log e S ( i,t 1 ) (cid:80) nk =1 e S ( i,t k ) to optimize for text retrieval. Following Henderson et al. (2017); Gillick et al. (2019); Karpukhin et al. (2020), we use in-batch negatives to avoid the actual sampling of a negative image or text: given a batch of n positive image-text pairs B = { ( i 1 , t 1 ) , . . . , ( i n , t n ) } , we use all other images from within the batch as negatives ( { i j } , where j  { 1 , 2 , . . . , n } and j (cid:54) = k ) for every positive pair ( i k , t k ) , and vice versa for negative text. The final CMR loss for batch B is: LCMR ( B ) = 1 2 n n (cid:88) k =1 L ( i k ) TR + L ( t k ) IR . An illustration of LCMR is presented in Figure 3. 7 Through joint pre-training with CMR, VMLM and SMRM, the visual-semantic embeddings learned from image encoder and language encoder can be readily applied to downstream tasks. During finetuning stage, we directly adopt CMR loss to supervise the training process. 7 The whole similarity matrix can be computed efficiently with one batched matrix multiplication call. This operation can take advantage of GPU hardware with Tensor Cores for faster training. For simplicity, we take text-to-image retrieval as an example to introduce the real-time inference pipeline (Figure 2(b)): ( i ) Offline image feature extraction and encoding; ( ii ) Online retrieval with text query; and ( iii ) Online re-ranking with top-retrieved images. Text retrieval is conducted in a symmetric manner. Offline Feature Extraction Image retrieval task requires the model to rank every image i in an image database I based on its similarity to a text query t . In LightningDOT, we first apply the image encoder f  V to all images in I , and cache the resulting global image representations { h ( i ) 0  R d | i  I } into an index (Johnson et al., 2019) in memory for later use. Note that the entire image-to-index process, including Faster-RCNN feature extraction and Transformer encoding, can all be conducted offline. Therefore, for every new query t at real time, the cached index can be reused for maximum inference time saving. Online Retrieval During inference, given a text query t , we encode it with the language encoder  L , and then compute its similarity score to the embedding of every image in I (stored in memory index) via Eqn (5). Finally, the images will be ranked by their similarity scores, from the highest to lowest. In practice, people are more interested in topK retrieval, with a list of K images I t satisfying: I t := { i m k } Kk =1 , where S ( t, i m 1 )  S ( t, i m 2 )      S ( t, i m K ) and S ( t, i m K )  S ( t, i )  i  ( I \ I t ) . This optimization problem has been well studied, and we use FAISS (Johnson et al., 2019) to solve it in our implementation. It is worth noting that in order to apply fast search, the similarity function has to be decomposable . Therefore, we choose the simple dot product as S instead of a more complicated neural network function. Similarly, for text retrieval, the same architecture can be applied by simply pre-computing the embedding for all sentences and using an image as query instead. Re-ranking To further improve retrieval accuracy, we propose a two-stage approach by adopting an optional re-ranking model. In the first stage, we use LightningDOT to retrieve topM images (or texts), where M is an integer much smaller Model COCO Test (5k images) Flickr30K Test (1k images) Text Retrieval Image Retrieval Text Retrieval Image Retrieval R@1 R@5 R@10 R@1 R@5 R@10 AR R@1 R@5 R@10 R@1 R@5 R@10 AR VSE++  41.3 69.2 81.2 30.3 59.1 72.4 58.9 52.9 80.5 87.2 39.6 70.1 79.5 68.3 SCO  42.8 72.3 83.0 33.1 62.9 75.5 61.6 55.5 82.0 89.3 41.1 70.5 81.1 69.9 GXN 42.0 -84.7 31.7 -74.6 -56.8 -89.6 41.5 -80.0 SCAN-single 46.4 77.4 87.2 34.4 63.7 75.7 64.1 67.9 89.0 94.4 43.9 74.2 82.8 75.4 R-SCAN 45.4 77.9 87.9 36.2 65.6 76.7 65.0 66.3 90.6 96.0 51.4 77.8 84.9 77.8 CAMP 50.1 82.1 89.7 39.0 68.9 80.2 68.3 68.1 89.7 95.2 51.5 77.1 85.3 77.8 CAAN 52.5 83.3 90.9 41.2 70.3 82.9 70.2 70.1 91.6 97.2 52.8 79.0 87.9 79.8 ViLBERT -----58.2 84.9 72.8 Unicoder-VL 62.3 87.1 92.8 46.7 76.0 85.3 75.0 86.2 86.3 99.0 71.5 90.9 94.9 88.1 UNITER-base 64.4 87.4 93.1 50.3 78.5 87.2 76.8 85.9 97.1 98.8 72.5 92.3 95.9 90.4 UNITER-large 65.7 88.6 93.8 52.9 79.9 88.0 78.1 86.9 98.1 99.2 75.5 94.0 96.6 91.7 OSCAR 73.5 92.2 96.0 57.5 82.8 89.8 82.0 ---LightningDOT  60.1 85.1 91.8 45.8 74.6 83.8 73.5 83.9 97.2 98.6 69.9 91.1 95.2 89.3 +UNITERbase Re-Ranker 64.6 87.6 93.5 50.3 78.7 87.5 77.0 86.5 97.5 98.9 72.6 93.1 96.1 90.8 +UNITERlarge Re-Ranker 65.7 89.0 93.7 53.0 80.1 88.0 78.2 87.2 98.3 99.0 75.6 94.0 96.5 91.8 +OSCAR Re-Ranker 74.2 92.4 96.0 57.4 82.7 89.9 82.1 ---Table 1: Evaluation results on image-to-text and text-to-image retrieval over Flickr30k and COCO test sets. than the database (index) size. Next, we apply a stronger retrieval model (usually slower due to the use of cross-attention) to re-rank the retrieved topM pairs from the first stage. The final M similarity scores obtained from the second stage will be used to re-compute the desired topK retrieval ( K  M ) in Eqn. (7). Please refer to figure 2 for a more detailed visualization. Our experiments show that this two-stage approach can benefit from the best of both worlds: maintaining a constant fast speed per query 8 while achieving state-of-the-art accuracy. Another advantage of this pipeline is that it can readily incorporate any advanced model as the re-ranker, thus future stronger image-text retrieval models can take advantage of LightningDOT for better efficiency. For pre-training, we use pre-processed data provided by Chen et al. (2020), including 4.2 million 8 The computation time of LightningDOT is negligible compared to that of UNITER. Therefore, the empirical speed is proportional to the number of pairs UNITER has to rank: constant M for LightningDOT + UNITER vs. the whole database (index) size for UNITER only. images with 9.5 million associated captions from COCO (Chen et al., 2015), VG (Krishna et al., 2017), Conceptual Captions (Sharma et al., 2018), and SBU captions (Ordonez et al., 2011). For evaluation, we use Flickr30k (Plummer et al., 2015) and COCO (Lin et al., 2014) datasets, which include 31K/123K images, respectively, each associated with 5 human-written captions. Following (Faghri et al., 2017), we split COCO into 114K/5K/5K and Flickr30K into 29K/1k/1k images for train, validation and test. Downstream performance is measured by recall at K (R@K) for both image and text retrieval tasks. We also use an additional metric AR, the average of R@K for all K across both image and sentence retrieval tasks. We compare the proposed approach with state-of-the-art methods (with and without pre-training) and report the results in Table 1. Without cross-attention, our method outperforms non-pre-training approaches by large margins on all metrics. Specifically, our model improves over CAAN (Zhang et al., 2020) (SOTA method with cross-attention) by 3.3% (73.5 vs. 70.2) on COCO and 9.5% (89.3 vs. 79.8) on Flickr30K in terms of AR. When compared with methods without cross-attention (VSE++ (Faghri et al., 2017) and SCO (Huang et al., 2018)), LightningDOT achieves nearly Model COCO Full (123K Images) Flickr30K Full (31K Images) Text Retrieval Image Retrieval Text Retrieval Image Retrieval R@5 R@10 R@20 R@5 R@10 R@20 AR R@5 R@10 R@20 R@5 R@10 R@20 AR LightningDOT 40.1 51.0 62.0 28.2 37.4 47.8 44.4 69.6 78.9 86.1 51.8 62.3 72.3 70.2 + Re-Ranker-base 47.9 58.5 67.8 35.7 45.2 55.2 51.7 74.2 81.7 88.2 56.9 66.7 75.6 73.9 + Re-Ranker-large 48.0 59.0 68.9 37.3 46.8 56.4 52.7 75.1 83.9 90.5 60.1 69.5 78.3 76.2 Table 2: Results on the extreme retrieval setting of full Flickr30k and full COCO datasets. 20-point gain on AR. Although LightningDOT achieves slightly lower AR than UNITER (pre-training method with cross-attention), with 3.5/1.1 points drop on Flickr30K/COCO, it is 600/1900  faster than UNITER during inference time. We further apply second-stage re-ranking, and use UNITER to score topM retrieved image-text pairs from LightningDOT to obtain the final top-K ranked lists. With re-ranking, LightningDOT achieves an instant performance lift, surpassing UNITER on both benchmarks, while still 46-95 times faster than UNITER. With an even stronger re-ranker OSCAR, LightningDOT achieves similar results to the state-of-the-art performance on COCO. To demonstrate the efficiency of LightningDOT, we use UNITER-base as baseline to compare inference speed. We also compare with a more lightweight cross-attention method SCAN (Lee et al., 2018), which uses GRU (Chung et al., 2014) instead of a 12-layer Transformer. All methods are tested on a single TITAN RTX GPU, with batch size of 400. As shown in Table 3, SCAN is  1.9  faster than UNITER-base across both benchmarks, as the computational cost of GRU is much cheaper than that of Transformer (performance drop is significant though). However, the speedup from SCAN is limited, as it computes cross-attention between each query and all images. On the other hand, LightningDOT is 639  faster than UNITER on Flickr30K. When tested with 5 times more images in COCO, the speedup from LightningDOT is 1927  . Even with re-ranking, LightningDOT is still much more efficient than UNITER-base (46  faster on Flickr30K and 95  faster on COCO). To mimic a real-life scenario for image retrieval, where the candidate pool contains hundreds of thousands of images, we combine all images from training, validation and test set to form a larger candidate pool. Note that models are still trained on the training set. Although the number of text queries remain the same, the number of candidate images scales up by >20  , where cross-attention methods immediately become impractical. We refer this setting on both benchmarks as Flickr30k-full (31k) and COCO-full (123k). Our algorithm is 6,591  faster on Flickr30k-full and 23,869  faster on COCO-full, which clearly shows the advantage of LightningDOT and its potential in real-world applications. With re-ranking, LightningDOT is still more than 1,000  and 2,000  faster on Flickr30k-full and COCO-full, respectively. In general, for other re-rankers such as OSCAR, our algorithm can approximately speed up inference by N images /M times, where N images is the number of candidate images, and M is number of re-ranked images from topM retrieved results by LightningDOT. Similarly, we construct a full setting for text retrieval by combining all text queries from training, validation and test set. Results are summarized in Table 2. Considering the size of candidate pool has become more than 20  larger, we adopt recall at top 5, 10, 50 as evaluation metrics. Our method achieves reasonably good performance, with AR of 44.4 on COCO and 70.2 on Flickr30K. Re-ranking further lifts AR to 56.4 and 76.2. Results from UNITER or SCAN are not included as the computation of pairwise scores is extremely expensive, given the excessive amount of retrieval candidates. While LightningDOT only takes minutes to evaluate, UNITER-base is estimated to take about 28 days 9 to evaluate under the full setting for both 9 This estimation is based on the inference time taken by Text Retrieval Image Retrieval Method R@1 R@5 R@10 R@1 R@5 R@10 AR R-CNN only 62.2 85.9 91.1 42.0 70.9 80.3 72.1 +Image Encoder 73.4 92.5 95.6 59.5 84.5 90.3 82.6 +PT  83.5 96.4 98.7 68.6 90.5 94.8 88.8 LightningDOT 85.2 96.4 98.7 69.9 90.4 94.5 89.2 Table 4: Ablation studies on model design over Flickr30K validation set. In addition, We compare all models with the same setting: cache as much as possible for fastest speed, where our model outperforms others in both speed and space on image retrieval. The proposed algorithm maps each image to a 768-dimensional vector, which only consumes about 300Mb storage space for the whole COCO dataset. For cross-attention models such as SCAN, UNITER or OSCAR, they also need to cache image features, which typically requires to save a 36 x 2048 dimensional vector per image, and it consumes about 28GB storage space for COCO dataset. We conduct ablation studies on Flickr30K (Table 4) and compare LightningDOT (L4) against 3 ablated instances: ( i )R-CNN only (L1): image representations are extracted from Faster R-CNN directly, with no image encoder applied; ( ii ) +Im-age Encoder (L2): regional features are encoded with a 12-layer Transformer as the image encoder; ( iii ) +PT   (L3): our model is pre-trained with MLM+MRM+CMR, then finetuned on Flickr30K. Note that the difference between MLM vs. VMLM and MRM vs. SMRM is whether the predictions of masked tokens (regions) rely on infused embeddings from the other modality. UNITER-base on a smaller dataset. Results show that R-CNN only is not suffi-cient in learning good image representations for ITR task, while image encoder with Transformer architecture can effectively learn contextualized image representations, hence achieving better performance. Pre-trained models (L3-4) generally achieve better performance, compared to non-pretrained models (L1-2). Comparing +PT   to the full instance of LightningDOT, dependency on the other modality in VMLM and SMRM brings universal performance lift across all metrics. This indicates that these cross-modal dependencies introduced by VMLM and SMRM are effective in learning the association between image and text inputs. In addition, we investigate the effectiveness of each pre-training task in Table 5. Comparing to baseline without pre-training, pre-training with CMR alone lifts +1 . 4 on AR. Pre-training with all three tasks achieves the best performance, indicating that the learning of contextualized word and region representations promotes better global alignment between image and text, and these three pre-training tasks work collaboratively to yield better visual-semantic embeddings. We further report results on multilingual image-text retrieval tasks. Specially, we evaluate LightningDOT under the translate-test setting, which is to translate the test captions in other languages to English by leveraging Machine Translation (MT) tool. 10 Note that our method is only trained on English captions, without exploiting the original or translated captions from multilingual benchmarks. We consider two benchmarks: Multi30K (Elliott et al., 2016, 2017; Barrault et al., 2018) with captions in German, French and Czech; and COCO Japanese (Yoshikawa et al., 2017) and Chinese (Li et al., 2019b). Average Recall (AR) is used as the evaluation metric. Meta-Ave, the average of AR over different languages across two benchmarks, is used as a global metric. More details on multilingual ITR benchmarks are included in Appendix. We compare LightningDOT against 3 task-specific methods: S-LIWE (Wehrmann et al., 2019), MULE (Kim et al., 2020) and SMALR (Burns et al., 2020), which all exploit captions in different languages to learn multilingual or language-agnostic word embeddings. We also compare with a pre-trained model M 3 P (Huang et al., 2020a), which is alternatively pre-trained with image-caption pairs labeled in English and cross-lingual corpus in 100 different languages. Note that all methods discussed above are trained/finetuned on captions in different languages. For fair comparison, we report performance of UNITER under the same translate-test setting, which is finetuned with English captions only and tested on translated captions. Table 6 shows similar trends of performance improvements as on English benchmarks. Compared to both state-of-the-art task-specific methods and pre-trained models, LightningDOT under translate-test setting achieves new state of the art on most languages and establishes a strong baseline for future study on these multilingual benchmarks. We show an example of image retrieval results here at figure 4 for query as "Sky view of a blue and yellow biplane flying near each other". In addition to the ground truth image in the red rectangle, all the 10 images retrieved by our model are valid retrieval since multiple keywords ("sky", "blue", "yellow", "airplane", "near") are captured for each image. Please see the appendix A.4 for more examples. In this paper, we propose a pre-training framework that learns joint visual-semantic embedding without any cross-attention between modalities. LightningDOT outperforms previous state of the art, while significantly speeding up inference time by 600-2000  on Flickr30K and COCO image-text retrieval benchmarks. Future work includes extending the efficient training framework to other V+L tasks.
abstain abstain abstain method objective abstain abstain abstain abstain abstain other abstain abstain abstain abstain other abstain abstain abstain abstain abstain abstain abstain method method abstain objective abstain objective objective abstain abstain abstain abstain abstain abstain objective other other other other objective other other other other other other abstain abstain abstain other abstain abstain abstain other abstain abstain abstain method abstain abstain method abstain abstain abstain abstain abstain abstain abstain other abstain abstain abstain method other abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain other method method abstain abstain method abstain abstain method abstain abstain abstain abstain abstain abstain method abstain other abstain abstain method abstain abstain other abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain result other abstain abstain result abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain result abstain result abstain abstain result abstain abstain other abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain result abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain result abstain abstain objective abstain abstain