Papers › Dense Cross-Query-and-Support Attention Weighted Mask Aggregation for Few-Shot Segmentation

Dense Cross-Query-and-Support Attention Weighted Mask Aggregation for Few-Shot Segmentation

18 Jul 2022arXiv:2207.08549archive 2025-07-28

Xinyu Shi, Dong Wei, Yu Zhang, Donghuan Lu, Munan Ning, Jiashun Chen, Kai Ma, Yefeng Zheng

Research into Few-shot Semantic Segmentation (FSS) has attracted great attention, with the goal to segment target objects in a query image given only a few annotated support images of the target class. A key to this challenging task is to fully utilize the information in the support images by exploiting fine-grained correlations between the query and support images. However, most existing approaches either compressed the support information into a few class-wise prototypes, or used partial support information (e.g., only foreground) at the pixel level, causing non-negligible information loss. In this paper, we propose Dense pixel-wise Cross-query-and-support Attention weighted Mask Aggregation (DCAMA), where both foreground and background support information are fully exploited via multi-level pixel-wise correlations between paired query and support features. Implemented with the scaled dot-product attention in the Transformer architecture, DCAMA treats every query pixel as a token, computes its similarities with all support pixels, and predicts its segmentation label as an additive aggregation of all the support pixels' labels -- weighted by the similarities. Based on the unique formulation of DCAMA, we further propose efficient and effective one-pass inference for n-shot segmentation, where pixels of all support images are collected for the mask aggregation at once. Experiments show that our DCAMA significantly advances the state of the art on standard FSS benchmarks of PASCAL-5i, COCO-20i, and FSS-1000, e.g., with 3.1%, 9.7%, and 3.6% absolute improvements in 1-shot mIoU over previous best records. Ablative studies also verify the design DCAMA.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2207.08549")

Code

Syntology Ran 4 of 5 code samples harvested from 1 repository linked to this paper; 1 has no recorded run. Of those that ran: 2 ran · our draft was wrong; 2 ran with no contract checked.

By repository: official repository: 5 samples from 1 repository, 4 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

pawn-sxy/dcama officialmentioned in paperpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

5 samples harvested; 4 ran; 0 honoured the contract we drafted; 1 has no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

2ran · our draft was wrong
2ran
1unverified

Licence: 5 of the 5 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from pawn-sxy/DCAMA. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

MultiHeadedAttention pawn-sxy/DCAMA/model/DCAMA.py official repository ran · metamorphic tier: deterministic no licence file found · pointer only · 5385d0ed2b350edf · report
PositionalEncoding pawn-sxy/DCAMA/model/DCAMA.py official repository ran · metamorphic tier: deterministic no licence file found · pointer only · 760d230fe439888d · report
attention pawn-sxy/DCAMA/model/DCAMA.py official repository ran · our draft was wrong no licence file found · pointer only · b008136cddaa0337 · report
clones pawn-sxy/DCAMA/model/DCAMA.py official repository ran · our draft was wrong no licence file found · pointer only · 84ee72bc513b03f8 · report
DCAMA_model pawn-sxy/DCAMA/model/DCAMA.py official repository unverified no licence file found · pointer only · 473fee9a518784e2 · report

Tasks

Few-Shot Semantic SegmentationSegmentationSemantic Segmentation

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Few-Shot Semantic Segmentation COCO-20i (1-shot) DCAMA (Swin-B) FB-IoU 73.2 #9 of 85 Archive leaderboard report
Few-Shot Semantic Segmentation COCO-20i (1-shot) DCAMA (Swin-B) Mean IoU 50.9 #9 of 85 Archive leaderboard report
Few-Shot Semantic Segmentation COCO-20i (1-shot) DCAMA (ResNet-101) FB-IoU 69.9 #42 of 85 Archive leaderboard report
Few-Shot Semantic Segmentation COCO-20i (1-shot) DCAMA (ResNet-101) Mean IoU 43.5 #42 of 85 Archive leaderboard report
Few-Shot Semantic Segmentation COCO-20i (1-shot) DCAMA (ResNet-101) learnable parameters (million) 47.7 #42 of 85 Archive leaderboard report
Few-Shot Semantic Segmentation COCO-20i (1-shot) DCAMA (ResNet-50) FB-IoU 69.5 #43 of 85 Archive leaderboard report
Few-Shot Semantic Segmentation COCO-20i (1-shot) DCAMA (ResNet-50) Mean IoU 43.3 #43 of 85 Archive leaderboard report
Few-Shot Semantic Segmentation COCO-20i (2-way 1-shot) DCAMA (Swin-B) mIoU 31.7 #3 of 6 Archive leaderboard report
Few-Shot Semantic Segmentation COCO-20i (5-shot) DCAMA (Swin-B) FB-IoU 76.9 #8 of 81 Archive leaderboard report
Few-Shot Semantic Segmentation COCO-20i (5-shot) DCAMA (Swin-B) Mean IoU 58.3 #8 of 81 Archive leaderboard report
Few-Shot Semantic Segmentation COCO-20i (5-shot) DCAMA (ResNet-101) FB-IoU 73.3 #28 of 81 Archive leaderboard report
Few-Shot Semantic Segmentation COCO-20i (5-shot) DCAMA (ResNet-101) Mean IoU 51.9 #28 of 81 Archive leaderboard report
Few-Shot Semantic Segmentation COCO-20i (5-shot) DCAMA (ResNet-101) learnable parameters (million) 47.7 #28 of 81 Archive leaderboard report
Few-Shot Semantic Segmentation COCO-20i (5-shot) DCAMA (ResNet-50) FB-IoU 71.7 #48 of 81 Archive leaderboard report
Few-Shot Semantic Segmentation COCO-20i (5-shot) DCAMA (ResNet-50) Mean IoU 48.3 #48 of 81 Archive leaderboard report
Few-Shot Semantic Segmentation COCO-20i (5-shot) DCAMA (ResNet-50) learnable parameters (million) 47.7 #48 of 81 Archive leaderboard report
Few-Shot Semantic Segmentation FSS-1000 (1-shot) DCAMA (Swin-B) FB-IoU 93.8 #7 of 24 Archive leaderboard report
Few-Shot Semantic Segmentation FSS-1000 (1-shot) DCAMA (Swin-B) Mean IoU 90.1 #7 of 24 Archive leaderboard report
Few-Shot Semantic Segmentation FSS-1000 (1-shot) DCAMA (ResNet-101) FB-IoU 92.4 #11 of 24 Archive leaderboard report
Few-Shot Semantic Segmentation FSS-1000 (1-shot) DCAMA (ResNet-101) Mean IoU 88.3 #11 of 24 Archive leaderboard report
Few-Shot Semantic Segmentation FSS-1000 (1-shot) DCAMA (ResNet-50) FB-IoU 92.5 #12 of 24 Archive leaderboard report
Few-Shot Semantic Segmentation FSS-1000 (1-shot) DCAMA (ResNet-50) Mean IoU 88.2 #12 of 24 Archive leaderboard report
Few-Shot Semantic Segmentation FSS-1000 (5-shot) DCAMA (Swin-B) FB-IoU 94.1 #7 of 22 Archive leaderboard report
Few-Shot Semantic Segmentation FSS-1000 (5-shot) DCAMA (Swin-B) Mean IoU 90.4 #7 of 22 Archive leaderboard report
Few-Shot Semantic Segmentation FSS-1000 (5-shot) DCAMA (ResNet-101) FB-IoU 93.1 #10 of 22 Archive leaderboard report
Few-Shot Semantic Segmentation FSS-1000 (5-shot) DCAMA (ResNet-101) Mean IoU 89.1 #10 of 22 Archive leaderboard report
Few-Shot Semantic Segmentation FSS-1000 (5-shot) DCAMA (ResNet-50) FB-IoU 92.9 #12 of 22 Archive leaderboard report
Few-Shot Semantic Segmentation FSS-1000 (5-shot) DCAMA (ResNet-50) Mean IoU 88.8 #12 of 22 Archive leaderboard report
Few-Shot Semantic Segmentation PASCAL-5i (1-Shot) DCAMA (Swin-B) FB-IoU 78.5 #11 of 105 Archive leaderboard report
Few-Shot Semantic Segmentation PASCAL-5i (1-Shot) DCAMA (Swin-B) Mean IoU 69.3 #11 of 105 Archive leaderboard report
Few-Shot Semantic Segmentation PASCAL-5i (1-Shot) DCAMA (ResNet-50) FB-IoU 75.7 #56 of 105 Archive leaderboard report
Few-Shot Semantic Segmentation PASCAL-5i (1-Shot) DCAMA (ResNet-50) Mean IoU 64.6 #56 of 105 Archive leaderboard report
Few-Shot Semantic Segmentation PASCAL-5i (1-Shot) DCAMA (ResNet-101) FB-IoU 77.6 #105 of 105 Archive leaderboard report
Few-Shot Semantic Segmentation PASCAL-5i (5-Shot) DCAMA (Swin-B) FB-IoU 82.9 #7 of 96 Archive leaderboard report
Few-Shot Semantic Segmentation PASCAL-5i (5-Shot) DCAMA (Swin-B) Mean IoU 74.9 #7 of 96 Archive leaderboard report
Few-Shot Semantic Segmentation PASCAL-5i (5-Shot) DCAMA (ResNet-50) FB-IoU 79.5 #54 of 96 Archive leaderboard report
Few-Shot Semantic Segmentation PASCAL-5i (5-Shot) DCAMA (ResNet-50) Mean IoU 68.5 #54 of 96 Archive leaderboard report
Few-Shot Semantic Segmentation PASCAL-5i (5-Shot) DCAMA (ResNet-101) FB-IoU 80.8 #56 of 96 Archive leaderboard report
Few-Shot Semantic Segmentation PASCAL-5i (5-Shot) DCAMA (ResNet-101) Mean IoU 68.3 #56 of 96 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections