Papers
Topics
Authors
Recent
Search
2000 character limit reached

Instance Aware Group Alignment Loss

Updated 7 July 2026
  • The paper introduces Instance Aware Group Alignment Loss as a novel intra-pair prototype alignment mechanism that eliminates external negatives for medical cross-modal representation learning.
  • It employs dynamic threshold gating to form token-conditioned visual and patch-conditioned language groups based on sparsified similarity matrices.
  • Empirical results on CheXpert show improved performance, with Prec@5 rising from 45.34 to 50.28, highlighting the efficacy of combined intra-pair and group-to-group objectives.

Searching arXiv for the primary and closely related uses of “Instance Aware Group Alignment Loss” and adjacent “group alignment” formulations. arXiv search: ([2507.23402](/papers/2507.23402))

Instance Aware Group Alignment loss is the intra-pair alignment objective introduced in Adaptive Grouped Alignment (AGA), a framework for structured medical cross-modal representation learning from paired images and reports. In AGA, each image–report pair is decomposed into token-conditioned visual groups and patch-conditioned language groups derived from a sparse similarity matrix, and the loss aligns each token or patch to its own dynamically constructed group representation without requiring external negatives (Li et al., 31 Jul 2025). The formulation is explicitly motivated by medical vision-language pretraining settings in which clinical reports have inherent structure and large quantities of hard negatives are impractical.

1. Definition and conceptual role

In AGA, “instance-aware” refers to the fact that grouping and alignment are performed separately within each image–text pair, rather than globally across a batch. For pair ii, image patches vi,nRdv_{i,n}\in\mathbb{R}^d and text tokens ti,mRdt_{i,m}\in\mathbb{R}^d are first compared through a fine-grained similarity matrix

Si=[Si,mn]Mi×N,si,mn=vi,nti,m.S_i=[S_{i,mn}]_{M_i\times N},\qquad s_{i,mn}=v_{i,n}\cdot t_{i,m}.

Each token then forms a visual group from its most related image patches, and each patch forms a language group from its most related tokens. Group representations are computed as weighted averages based on similarity scores, and the Instance Aware Group Alignment loss aligns each token with its token-grouped visual representation and each patch with its patch-grouped language representation (Li et al., 31 Jul 2025).

The loss is therefore “group alignment” in a precise sense: it does not align isolated token–patch pairs, and it does not rely on sample-level global embeddings alone. Instead, it aligns an element to a group prototype constructed on the fly from the paired instance. This differs from standard cross-modal contrastive learning, which typically depends on cross-pair negatives and treats reports either as single entities or as fragmented tokens. In AGA, the objective is explicitly intra-pair and structured.

2. Group construction from sparse bidirectional similarity

AGA uses ResNet-50 as the image encoder and BioClinicalBERT as the text encoder. For pair ii, the local image embeddings are

Vi,l=(vi,1,vi,2,,vi,N),V_{i,l}=(v_{i,1},v_{i,2},\dots,v_{i,N}),

with global embedding vi\overline v_i, and the local text embeddings are

Ti,l=(ti,1,ti,2,,ti,Mi),T_{i,l}=(t_{i,1},t_{i,2},\dots,t_{i,M_i}),

with global embedding ti\overline t_i. The embedding dimension is d=128d=128 (Li et al., 31 Jul 2025).

The similarity matrix is row-wise min–max normalized to vi,nRdv_{i,n}\in\mathbb{R}^d0 and then sparsified by thresholding. AGA does not use a fixed group size vi,nRdv_{i,n}\in\mathbb{R}^d1; group sizes are dynamic because selection is controlled by two threshold gating modules. The Language Grouped Threshold Gate updates

vi,nRdv_{i,n}\in\mathbb{R}^d2

and the Vision Grouped Threshold Gate updates

vi,nRdv_{i,n}\in\mathbb{R}^d3

These gates define which similarities survive sparsification and therefore which elements enter each group. The paper notes that, although the abstract mentions “top-m” selection conceptually, the formal mechanism is threshold gating (Li et al., 31 Jul 2025).

The resulting grouped representations are

vi,nRdv_{i,n}\in\mathbb{R}^d4

where vi,nRdv_{i,n}\in\mathbb{R}^d5 is the token-grouped visual representation for token vi,nRdv_{i,n}\in\mathbb{R}^d6, vi,nRdv_{i,n}\in\mathbb{R}^d7 is the patch-grouped language representation for patch vi,nRdv_{i,n}\in\mathbb{R}^d8, and the weights are normalized over the selected elements in each group. Cosine similarity for subsequent losses is

vi,nRdv_{i,n}\in\mathbb{R}^d9

This grouping mechanism gives AGA a bidirectional structure: tokens induce visual groups and patches induce language groups. A plausible implication is that the loss is best understood as a local prototype alignment objective rather than a conventional token–patch matching loss.

3. Exact formulation of the Instance Aware Group Alignment loss

The loss has symmetric text-side and vision-side components. Positives are matched token–TGV and patch–PGL pairs with the same index ti,mRdt_{i,m}\in\mathbb{R}^d0; negatives come only from other elements within the same pair’s sequence. No negatives from other pairs are used (Li et al., 31 Jul 2025).

The text-side objective is

ti,mRdt_{i,m}\in\mathbb{R}^d1

The vision-side objective is

ti,mRdt_{i,m}\in\mathbb{R}^d2

These are InfoNCE-style objectives, but they are not standard batch-contrastive losses. Their denominators are confined to the current pair’s sequence, so the “negative” set is the other tokens in the same report or the other patches in the same image. This is the central departure from CLIP-style practice in AGA: the loss dispenses with external negatives and instead exploits the internal structure of a paired medical sample.

The paper’s rationale is explicit. In small, privacy-constrained medical datasets, obtaining many hard negatives is infeasible, and intra-pair alignment reduces both memory and computational burden while mitigating instability when hard negatives are scarce (Li et al., 31 Jul 2025).

4. Coupling with BCGA and the full optimization objective

IAGA is not the entirety of AGA. It sits between a global contrastive objective on ti,mRdt_{i,m}\in\mathbb{R}^d3 and a Bidirectional Cross-modal Grouped Alignment (BCGA) module that aligns grouped visual and linguistic representations across modalities (Li et al., 31 Jul 2025).

The global loss is

ti,mRdt_{i,m}\in\mathbb{R}^d4

BCGA introduces group-to-group alignment through cross-attention. For the token-grouped visual side, the paper defines

ti,mRdt_{i,m}\in\mathbb{R}^d5

and then optimizes a grouped language-to-vision alignment loss ti,mRdt_{i,m}\in\mathbb{R}^d6. The grouped vision-to-language counterpart ti,mRdt_{i,m}\in\mathbb{R}^d7 is defined symmetrically from patch-grouped language representations.

The full objective is

ti,mRdt_{i,m}\in\mathbb{R}^d8

This placement of IAGA within the training objective matters. The loss aligns local elements to their own grouped prototypes, while BCGA explicitly refines cross-modal group-to-group consistency and the global loss preserves sample-level retrieval geometry. The large drop in performance when BCGA is removed indicates that IAGA alone is not the whole mechanism of AGA (Li et al., 31 Jul 2025).

5. Optimization, complexity, and empirical behavior

AGA updates image and text encoders, projection heads, and gates jointly. The paper uses AdamW with learning rate ti,mRdt_{i,m}\in\mathbb{R}^d9, batch size Si=[Si,mn]Mi×N,si,mn=vi,nti,m.S_i=[S_{i,mn}]_{M_i\times N},\qquad s_{i,mn}=v_{i,n}\cdot t_{i,m}.0, and Si=[Si,mn]Mi×N,si,mn=vi,nti,m.S_i=[S_{i,mn}]_{M_i\times N},\qquad s_{i,mn}=v_{i,n}\cdot t_{i,m}.1 epochs. Temperatures are Si=[Si,mn]Mi×N,si,mn=vi,nti,m.S_i=[S_{i,mn}]_{M_i\times N},\qquad s_{i,mn}=v_{i,n}\cdot t_{i,m}.2 for the global loss, Si=[Si,mn]Mi×N,si,mn=vi,nti,m.S_i=[S_{i,mn}]_{M_i\times N},\qquad s_{i,mn}=v_{i,n}\cdot t_{i,m}.3 for IAGA, and Si=[Si,mn]Mi×N,si,mn=vi,nti,m.S_i=[S_{i,mn}]_{M_i\times N},\qquad s_{i,mn}=v_{i,n}\cdot t_{i,m}.4 for BCGA. The momentum hyperparameters are Si=[Si,mn]Mi×N,si,mn=vi,nti,m.S_i=[S_{i,mn}]_{M_i\times N},\qquad s_{i,mn}=v_{i,n}\cdot t_{i,m}.5 on SMTs and Si=[Si,mn]Mi×N,si,mn=vi,nti,m.S_i=[S_{i,mn}]_{M_i\times N},\qquad s_{i,mn}=v_{i,n}\cdot t_{i,m}.6 on MIMIC-CXR, with Si=[Si,mn]Mi×N,si,mn=vi,nti,m.S_i=[S_{i,mn}]_{M_i\times N},\qquad s_{i,mn}=v_{i,n}\cdot t_{i,m}.7 matched per dataset. Default patching and tokenization give Si=[Si,mn]Mi×N,si,mn=vi,nti,m.S_i=[S_{i,mn}]_{M_i\times N},\qquad s_{i,mn}=v_{i,n}\cdot t_{i,m}.8 patches and Si=[Si,mn]Mi×N,si,mn=vi,nti,m.S_i=[S_{i,mn}]_{M_i\times N},\qquad s_{i,mn}=v_{i,n}\cdot t_{i,m}.9 tokens (Li et al., 31 Jul 2025).

The computational profile follows directly from the loss design. Computing the similarity matrix costs ii0, normalization and gating cost ii1, token-grouped and patch-grouped aggregation cost ii2 and ii3, and the IAGA denominators induce ii4 for ii5 and ii6 for ii7. BCGA attention adds ii8 and is described as the dominant fine-grained cost. The intra-pair formulation avoids large memory banks or queues required by global contrastive methods in low-data regimes (Li et al., 31 Jul 2025).

Empirically, AGA reports strong retrieval and classification results. On CheXpert ii9, AGA attains Prec@5 Vi,l=(vi,1,vi,2,,vi,N),V_{i,l}=(v_{i,1},v_{i,2},\dots,v_{i,N}),0, exceeding ConVIRT Vi,l=(vi,1,vi,2,,vi,N),V_{i,l}=(v_{i,1},v_{i,2},\dots,v_{i,N}),1, GLoRIA Vi,l=(vi,1,vi,2,,vi,N),V_{i,l}=(v_{i,1},v_{i,2},\dots,v_{i,N}),2, MGCA Vi,l=(vi,1,vi,2,,vi,N),V_{i,l}=(v_{i,1},v_{i,2},\dots,v_{i,N}),3, and SPARC Vi,l=(vi,1,vi,2,,vi,N),V_{i,l}=(v_{i,1},v_{i,2},\dots,v_{i,N}),4. In supervised classification, CheXpert Vi,l=(vi,1,vi,2,,vi,N),V_{i,l}=(v_{i,1},v_{i,2},\dots,v_{i,N}),5 AUC is Vi,l=(vi,1,vi,2,,vi,N),V_{i,l}=(v_{i,1},v_{i,2},\dots,v_{i,N}),6 at Vi,l=(vi,1,vi,2,,vi,N),V_{i,l}=(v_{i,1},v_{i,2},\dots,v_{i,N}),7, Vi,l=(vi,1,vi,2,,vi,N),V_{i,l}=(v_{i,1},v_{i,2},\dots,v_{i,N}),8 at Vi,l=(vi,1,vi,2,,vi,N),V_{i,l}=(v_{i,1},v_{i,2},\dots,v_{i,N}),9, and vi\overline v_i0 at vi\overline v_i1; RSNA Pneumonia reaches vi\overline v_i2, vi\overline v_i3, and vi\overline v_i4 in the same regimes. In zero-shot classification, CheXpert reaches ACC vi\overline v_i5, F1 vi\overline v_i6, ROC vi\overline v_i7 (Li et al., 31 Jul 2025).

The ablation evidence isolates the role of grouped alignment. On CheXpert vi\overline v_i8, “Only global alignment” gives Prec@5 vi\overline v_i9, “No BCGA” drops to Ti,l=(ti,1,ti,2,,ti,Mi),T_{i,l}=(t_{i,1},t_{i,2},\dots,t_{i,M_i}),0, “AGA (fixed thresholds)” reaches Ti,l=(ti,1,ti,2,,ti,Mi),T_{i,l}=(t_{i,1},t_{i,2},\dots,t_{i,M_i}),1, and full AGA reaches Ti,l=(ti,1,ti,2,,ti,Mi),T_{i,l}=(t_{i,1},t_{i,2},\dots,t_{i,M_i}),2. The paper also reports that on MIMIC-CXR, Ti,l=(ti,1,ti,2,,ti,Mi),T_{i,l}=(t_{i,1},t_{i,2},\dots,t_{i,M_i}),3 stabilizes around Ti,l=(ti,1,ti,2,,ti,Mi),T_{i,l}=(t_{i,1},t_{i,2},\dots,t_{i,M_i}),4 and Ti,l=(ti,1,ti,2,,ti,Mi),T_{i,l}=(t_{i,1},t_{i,2},\dots,t_{i,M_i}),5 around Ti,l=(ti,1,ti,2,,ti,Mi),T_{i,l}=(t_{i,1},t_{i,2},\dots,t_{i,M_i}),6, whereas on SMTs they stabilize around Ti,l=(ti,1,ti,2,,ti,Mi),T_{i,l}=(t_{i,1},t_{i,2},\dots,t_{i,M_i}),7 and Ti,l=(ti,1,ti,2,,ti,Mi),T_{i,l}=(t_{i,1},t_{i,2},\dots,t_{i,M_i}),8, respectively. No formal convergence bounds are provided; stability is supported empirically (Li et al., 31 Jul 2025).

The literal name “Instance Aware Group Alignment loss” is specific to AGA, but several later papers map adjacent mechanisms to “group alignment” or “instance-aware alignment” without using the same term. InstAP treats each image or video as a group of instance captions and instance regions or trajectories, then applies a bidirectional instance contrastive loss with a masking matrix Ti,l=(ti,1,ti,2,,ti,Mi),T_{i,l}=(t_{i,1},t_{i,2},\dots,t_{i,M_i}),9 that removes intra-sample false negatives; the paper explicitly states that it does not use the literal term “Group Alignment Loss,” but its instance-aware bundle functions as a group alignment objective over visual and textual instance sets (Kumar et al., 9 Apr 2026). InstanceRSR similarly states that it does not literally name a loss “Instance Aware Group Alignment Loss”; instead, it combines a REPA-style representation alignment loss with an instance-scale loss over SAM-derived groups ti\overline t_i0, so that “group alignment” corresponds to scale alignment within instance groups (Guo et al., 25 Mar 2026).

Other papers use the phrase more loosely or retrospectively. “Closing the Modality Gap Aligns Group-Wise Semantics” defines an “IAGAL” as standard multimodal contrastive loss augmented with Align True Pairs and Centroid Uniformity terms, but the paper’s actual contribution is modality-gap reduction rather than intra-pair token–patch grouping (Grassucci et al., 26 Jan 2026). “Associative Alignment for Few-shot Image Classification” does not use the exact name, yet its centroid and conditional adversarial objectives are explicitly described in the provided synthesis as an instance-aware, class-conditional group alignment framework over retrieved base instances and novel-class groups (Afrasiyabi et al., 2019). In a different domain, “Cross-Domain Grouping and Alignment for Domain Adaptive Semantic Segmentation” aligns source and target per-group pixel distributions by conditioning a discriminator on group descriptors and soft pixel assignments, which the provided synthesis maps to an instance-aware group alignment concept at the per-pixel level (Kim et al., 2020). GP-Aligner, by contrast, performs unsupervised non-rigid groupwise point-set registration through pairwise Chamfer aggregation over transformed shapes with a group-specific latent descriptor, but it uses no per-instance or per-point weighting and no literal IAGA terminology (Wang et al., 2020).

This suggests a broader usage pattern: across medical VLP, VLP for grounded video, diffusion-based super-resolution, multimodal alignment, few-shot adaptation, and geometric registration, “group alignment” typically denotes alignment between dynamically formed local sets or group-conditioned representations rather than sample-level global embeddings. The exact optimization, however, varies substantially. In the strict encyclopedic sense, the canonical “Instance Aware Group Alignment loss” is the bidirectional intra-pair InfoNCE-style objective ti\overline t_i1 introduced in AGA (Li et al., 31 Jul 2025).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Instance Aware Group Alignment Loss.