Image-text retrieval serves as a pivotal bridge between vision and language, playing a critical role in achieving high-quality semantic alignment across modalities. To enhance the fine-grained discriminative capacity of semantic features in cross-modal retrieval, a multi-modal alignment framework that integrates intra-modal fine-grained local semantics with inter-modal global semantic correlations was proposed. Original features of images and texts were first extracted, followed by region-level relational reasoning through graph attention networks (GAT) to obtain relation-enhanced local features. An intra-modal attention mechanism was then employed to facilitate semantic interactions among samples within the same modality, thereby capturing comprehensive intra-modal associations and producing semantically enriched embeddings for both images and texts. Finally, a triangular constraint-enhanced triplet loss function was designed to optimize the alignment process. Experimental results on the MS-COCO dataset (1K test set) demonstrate improvements of 6.4% and 1.3% in image retrieval and text retrieval tasks, respectively, in terms of Recall@1, confirming the effectiveness of the proposed method. Experimental results on the MS-COCO dataset (1K test set) indicate that the proposed method improves Recall@1 (the percentage of queries for which at least one ground-truth match is retrieved in the top-1 results) by 6.4% and 1.3% on image-to-text and text-to-image retrieval, respectively, demonstrating its effectiveness.
WANG Zhong-mei, PENG Shen-ao, LIU Jian-hua, AO Wen-xiu, LI Quan-ming.
Local and Global Semantic Fusion for Image-text Retrieval[J].
Science Technology and Engineering, 2026, 26(13): 5574-5582 DOI:10.12404/j.issn.1671-1815.2503447
针对这些问题,为了进一步挖掘细微差异样本中的信息,现提出一种利用模态内样本信息的网络(exploring intra-modal sample information network,EISIN),用于进一步区分难分样本并解决相似性度量对尺度变化敏感的问题。具体来说,通过挖掘同一模态中不同样本之间的关联关系和相似度关系,将其分别作为掩码和权重融入多头注意力中,充分利用同一模态样本之间的语义进行关系增强。为了深入挖掘难分样本信息,将三角损失与三元组排序损失相结合,通过加入内角约束来引导负样本在嵌入空间中远离正样本,以期为模型提供额外的优化方向,提升多模态对齐效果。
1 相关工作
1.1 全局对齐方法
现有图像-文本检索往往通过学习一个公共嵌入空间,使得不同模态特征能在该空间进行相似性计算,全局对齐使用两个独立网络将图像和文本映射到同一个嵌入空间中。在早期的研究中[14-15],通常使用卷积神经网络(convolutional neural networks,CNN)来学习图像的全局特征,使用循环神经网络(recurrent neural network,RNN)或门控循环单元(gated recurrent unit,GRU)来提取文本特征,最后通过简单的距离度量来衡量两个模态特征之间的相似度。后续的研究改进了图像和文本特征的学习,如VSRN(visual semantic reasoning for image-text matching)[2]通过GRU构建全局特征并使用池化的方法来聚合全局特征[10]。随着注意力机制在自然语言处理领域的应用,现有的大多数方法使用双向Transformer的encoder(bidirectional encoder representation from Transformers,BERT)[16]提取文本特征来学习图像和文本特征的细粒度关系,进一步提升图像-文本检索效果。
在实验设置方面,所有实验都使用PyTorch框架在NVIDIA Tesla T4上实现。在训练过程中,使用Adam优化器,初始学习率为1×10-5,每10次迭代衰减0.1倍。将Flickr30k和MS-COCO的批量大小分别设置为128和256。在图像方面使用预提取的图像区域特征[24],将图像和文本特征维度转换为d维,d=1 024,控制两种池化比例的超参数η=0.8。在语义关系增强学习中,将分位数θ设置为50%并令λ=1.5。损失函数中的超参数为α=0.2、β=0.5,ω=0.65。
(2)语义关系增强学习的有效性:去除语义关系增强学习(social and emotional learning,SEL)模块,研究不学习同一模态内不同信息的模型效果。结果如表3所示,所有6个评价指标以及rSum都有明显的下降,这证明EISIN使得模型准确地学习了图像之间和文本之间的语义信息,利用更充足的语义信息达成了更好的检索效果,使得各个指标都有所提升,证明了方法的有效性。
PanZ, WuF, ZhangB. Fine-grained image-text matching by cross-modal hard aligning network[C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Vancouver: IEEE, 2023: 19275-19284.
[2]
LiK, ZhangY, LiK, et al. Visual semantic reasoning for image-text matching[C]// Proceedings of the IEEE/CVF International Conference on Computer Vision. Seoul: IEEE, 2019: 4654-4662.
[3]
FuZ, MaoZ, SongY, et al. Learning semantic relationship among instances for image-text match-ing[C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Vancouver: IEEE, 2023: 15159-15168.
HeFeng, WangTianci, YangYuyan, et al. Enhanced text prior guided text image super-resolution[J]. Science Technology and Engineering, 2025, 25(25): 10821-10828.
[8]
RaoJ, WangF, DingL, et al. Where does the perfor-mance improvement come from? -a reproducibility concern about image-text retrieval[C]// Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information Retrieval. Madrid: IEEE, 2022: 2727-2737.
DengYaping, WangXin, YinTiantian. Emotion analysis of face image based on multi-layer cross attention fusion network model[J]. Science Technology and Engineering, 2023, 23(3): 1152-1159.
[11]
WuY, WangS, SongG, et al. Learning fragment self-attention embeddings for image-text matching[C]// Proceedings of the 27th ACM International Conference on Multimedia. Nice: IEEE, 2019: 2088-2096.
YuanLu, TaoQing, LiuJingxuan, et al. Improved dual-stream multi-modal information fusion method for sitting posture recognition[J]. Science Technology and Engineering, 2024, 24(5): 1980-1988.
[14]
VelickovicP, CucurullG, CasanovaA, et al. Graph attention networks[J]. Statistics and Computing, 2017(20): 3292002.
[15]
VaswaniA. Attention is all you need[C]// Proceedings of the 31st International Conference on Neural Information Processing Systems. Long Beach: IEEE, 2017: 6000-6010.
[16]
ChenJ, HuH, WuH, et al. Learning the best pooling strategy for visual semantic embedding[C]// Proceedings of the IEEE/CVF Conference On Computer Vision and Pattern Recognition. Online: IEEE, 2021: 15789-15798.
[17]
FaghriF, FleetD J, KirosJ R, et al. VSE++: Improving visual-semantic embeddings with hard negatives[C]// Proceedings of the 2018 British Machine Vision Conference(BMVC). Durham: BMVC, 2018: 344.
LiuMeng, QiMengjin, ZhanZhenyu, et al. A survey on deep learning based image-text matching[J]. Chinese Journal of Computers, 2023, 46(11): 2370-2399.
[20]
WangJ, ZhouF, WenS, et al. Deep metric learning with angular loss[C]// Proceedings of the IEEE International Conference on Computer Vision. Venice: IEEE, 2017: 2593-2601.
[21]
WangL, LiY, LazebnikS. Learning deep structure-preserving image-text embeddings[C]// Proceedings of the IEEE Conference On Computer Vision And Pattern Recognition. Las Vegas: IEEE, 2016: 5005-5013.
[22]
WangL, LiY, HuangJ, et al. Learning two-branch neural networks for image-text matching tasks[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2018, 41(2): 394-407.
[23]
DevlinJ, ChangM W, LeeK, et al. BERT: Pretraining of deep bidirectional transformers for language understanding[C]// Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers). Minneapolis: Association for Computational Linguistics, 2019: 4171-4186.
[24]
BitenA F, MaflaA, GómezL, et al. Is an image worth five sentences? a new look into semantics for image-text matching[C]// Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision. Waikoloa: IEEE, 2022: 1391-1400.
[25]
LeeK H, ChenX, HuaG, et al. Stacked cross attention for image-text matching[C]//Proceedings of the European conference on computer vision (ECCV). Berlin: Springer, 2018: 201-216.
[26]
ChenH, DingG, LiuX, et al. IMRAM: Iterative matching with recurrent attention memory for cross-modal image-text retrieval[C]// Proceedings of the IEEE/CVF Conference On Computer Vision and Pattern Recognition. Seattle: IEEE, 2020: 12655-12663.
[27]
ChengY, ZhuX, QianJ, et al. Cross-modal graph matching network for image-text retrieval[J]. ACM Transactions on Multimedia Computing, Communications, and Applications, 2022, 18(4): 1-23.
[28]
ZhangK, MaoZ, WangQ, et al. Negative-aware attention framework for image-text matching[C]// Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. New Orleans: IEEE, 2022: 15661-15670.
[29]
NamH, HaJ W, KimJ. Dual attention networks for multimodal reasoning and matching[C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Honolulu: IEEE, 2017: 299-307.
[30]
HeK, ZhangX, RenS, et al. Deep residual learning for image recognition[C]// Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Las Vegas: IEEE, 2016: 770-778.
[31]
RenS, HeK, GirshickR, et al. Faster R-CNN: towards real-time object detection with region proposal net-works[J]. IEEE Transactions On Pattern Analysis and Machine Intelligence, 2016, 39(6): 1137-1149.
[32]
AndersonP, HeX, BuehlerC, et al. Bottom-up and top-down attention for image captioning and visual question answering[C]// Proceedings of the IEEE Con-ference on Computer Vision and Pattern Recognition. Salt Lake City: IEEE, 2018: 6077-6086.
[33]
SeidenschwarzJ D, EleziI, Leal-TaixéL. Learning intra-batch connections for deep metric learning[C]// International Conference on Machine Learning. Online: PMLR, 2021: 9410-9421.
[34]
KayaM, BilgeH Ş. Deep metric learning: a survey[J]. Symmetry, 2019, 11(9): 1066.
[35]
LinT Y, MaireM, BelongieS, et al. Microsoft COCO: common objects in context[C]// Computer Vision-ECCV 2014: 13th European Conference. Zurich: Springer International Publishing, 2014: 740-755.
[36]
PlummerB A, WangL, CervantesC M, et al. Flickr30k entities: Collecting region-to-phrase correspondences for richer image-to-sentence models[C]// Proceedings of the IEEE International Conference on Computer vision. Chile: IEEE, 2015: 2641-2649.
[37]
MessinaN, AmatoG, EsuliA, et al. Fine-grained visual textual alignment for cross-modal retrieval using Transformer encoders[J]. ACM Transactions on Multimedia Computing, Communications, and Applications, 2021, 17(4): 1-23.