Manuscript Offprint

arXiv:2608.24467

HMGCLIP: Heterogeneous Multi-Granularity Contrastive Learning for E-commerce Representation Learning

Qiuyu Zhu, Yi Gao, Zhichao Wan, Mingyang Ma

Abstract

Although recent Multimodal Large Language Models (MLLMs) have advanced general product understanding, they implicitly encode product information into global embeddings, thereby limiting their ability to capture fine-grained attributes. This limitation hinders performance in tasks requiring precise attribute discrimination, such as distinguishing subtle material differences among visually similar products. To address this challenge, we propose HMGCLIP, a unified multimodal embedding framework. By constructing a heterogeneous hypergraph, we leverage hypergraph topology to mine structure-aware hard negatives and align multi-granular semantics at both relation and hyperedge levels. This design enables a dual-granularity inference mechanism that dynamically fuses attribute evidence for both fine-grained and coarse-grained downstream tasks. Furthermore, we release a comprehensive fine-grained e-commerce dataset to facilitate future benchmarking. Extensive experiments on this new dataset and the public MAVE benchmark show that HMGCLIP outperforms strong multimodal encoders, MLLMs, and e-commerce baselines, validating the superiority of HMGCLIP.

1 Introduction

Modern e-commerce platforms manage billions of products described by images, titles, structured attributes, and categorical hierarchies. Learning unified representations from heterogeneous signals is fundamental to product search, recommendation, attribute value extraction (PAVE), and duplicate product detection (Radford et al., 2021; Chia et al., 2022). Despite rapid progress in multimodal representation learning (Lin et al., 2025; Li et al., 2026), three limitations persist in the e-commerce setting.

First, general vision-language models such as CLIP (Radford et al., 2021) are trained on web-scale image-text pairs and struggle with the fine-

Figure

Figure 1: Comparison of fine-grained attributes among the query, ground-truth product and similar product.

grained distinctions that e-commerce demands—for instance, differentiating between “mesh” and “leather” uppers, or “air cushion” and “flat rubber” soles, requires more than global visual alignment. Second, standard contrastive learning typically treats negative samples uniformly or samples them randomly from batches. This approach fails to provide the semantically confusable hard negatives necessary for sharpening decision boundaries at the attribute level (de Souza P. Moreira et al., 2025). Third, existing benchmarks often lack the structural richness of real-world e-commerce data—particularly category taxonomies, attribute key-value constraints, and higher-order product entity groups—making it difficult to evaluate hierarchical and compositional understanding.

The core challenge is that e-commerce products are inherently compositional: their semantics arise from the interaction of visual appearance, textual descriptions, and structured attributes. As illustrated in Figure 1, monolithic encoders may fail to preserve fine-grained product distinctions when trained without explicit structural constraints. For example, a query sneaker with a pink-tinted outsole and a mesh upper may receive high similarity to a visually similar but semantically incorrect item, such as a sneaker with a beige outsole and a leather upper, because the two products share coarse visual cues including silhouette, lacing pattern, and overall color distribution. In large-scale retrieval, such global bias leads to ranking errors and retrieval ambiguity, as the model overlooks decisive attribute-level evidence such as material texture and outsole appearance.

To address these limitations, we present HMG-CLIP, a unified framework for multimodal e-commerce representation learning built on three insights: (1) e-commerce data naturally forms a heterogeneous hypergraph where products, images, attributes, and categories participate in higher-order relationships that extend beyond pairwise edges; (2) effective contrastive learning requires hard negative mining at multiple granularities—from coarse category-level to fine attribute-level; (3) learning a structure-aware unified embedding space enables robust zero-shot generalization across diverse downstream tasks, eliminating the need for task-specific fine-tuning. Our main contributions are summarized as:

• Framework. We present a unified multimodal embedding framework for e-commerce that supports both fine-grained and coarse-grained downstream tasks, achieving robust generalization without task-specific encoder fine-tuning.

• Method. We develop a multi-granularity contrastive learning paradigm that aligns relation-level and hyperedge-level semantics in a unified embedding space. By exploiting heterogeneous hypergraph topology, our method mines semantically confusable hard negatives and jointly aligns global product representations with local attribute semantics and higher-order groups.

• Dataset. We release a fine-grained multimodal e-commerce dataset to fill the gap in existing benchmarks and facilitate future research.

• Evaluation. Extensive experiments on our introduced dataset and the public MAVE benchmark demonstrate that HMGCLIP achieves strong and often state-of-the-art performance across attribute prediction and product classification tasks, validating its robustness and versatility.