Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

CCNet: Criss-Cross Attention for Semantic Segmentation

Criss-cross attention gathers full-image context for semantic segmentation at lower cost

  • Problem Non-local attention gives segmentation models full-image context, but it builds a dense weight for every pixel pair. That costs a lot of GPU memory and computation on high-resolution inputs.
  • Method CCNet adds a criss-cross attention module that lets each pixel gather context from its own row and column. Applying it twice with shared weights lets each pixel reach the whole image.
  • Results CCNet reached 81.9 mIoU on the Cityscapes test set with ResNet-101. It needs 11x less GPU memory than the non-local block.

Why full-image context is expensive

A fully convolutional network has local receptive fields, so it only sees short-range context, which limits how well it can label each pixel. Dilated convolutions reach only a few surrounding pixels, and pooling-based methods aggregate context in the same non-adaptive way for every pixel. Non-local networks address this by letting each position attend to every other position, which yields full-image context, but they produce a dense weight for every pixel pair.

Semantic segmentation needs high-resolution feature maps, so this cost lands on large inputs and fills GPU memory quickly. The authors replace one dense graph with several consecutive sparse graphs, where each stage links a position only to the positions in its own row and column.

How one criss-cross pass aggregates context

The module starts from the reduced feature map H, which comes from a convolution applied to the backbone output X. Two 1×1 convolutions turn H into a query map Q and a key map K, both with C′ channels, fewer than the C channels of H. For each position u, the query vector Q_u is compared by dot product with the key vectors in its criss-cross set Ω_u, which holds the keys in the same row or column.

\[ d_{i,u} = Q_u\,\Omega_{i,u}^{\top} \]

A softmax over the channel dimension converts these correlation scores into the attention map A, which has (H+W−1) rows and W×H columns. A third 1×1 convolution produces the value map V, and each position collects the values Φ_u that lie in its row or column. \[ H'_u = \sum_{i=0}^{H+W-1} A_{i,u}\,\Phi_{i,u} + H_u \] The sum is weighted by the attention map, and the residual term H_u keeps the local feature, so the output is the local feature plus selected context.

Each position sums over about 2√N weights rather than N, which is what makes the attention sparse.

Recurrent loops reach the rest of the image

A single pass only links a position to its own row and column, so the RCCA module unrolls the criss-cross attention into R loops. The paper uses R=2, where the second loop takes the output H′ of the first loop and produces H″. The two passes share parameters, so the recurrence adds no new weights. H″ is concatenated with X, and convolutional layers with batch normalization and activation fuse the result before the segmentation layer.

A pixel θ that is outside the criss-cross path of a position u can still reach u in two hops. In the first loop, θ passes its information to the two points that share a row or column with u, and in the second loop those points pass it on to u. The paper describes this as a one-to-one mapping between position pairs and attention-map elements, written with the function f.

Compared with a single criss-cross module, the RCCA module with R=2 adds no extra parameters and a minor increase in computation.

The category consistent loss

Cross-entropy alone may let the aggregated features over-smooth, a known issue in graph neural networks, so the authors add a loss that acts on the features directly. The design adapts a discriminative loss from instance segmentation to semantic segmentation. The three terms penalise spread around each class mean, push the mean features of different classes apart, and draw all class means towards the origin.

The variance term replaces the quadratic penalty with a piece-wise distance function that is zero within the margin δv, quadratic between δv and δd, and linear beyond δd. The total loss is a weighted sum of the segmentation loss and the three terms. \[ \ell = \ell_{seg} + \alpha\,\ell_{var} + \beta\,\ell_{dis} + \gamma\,\ell_{reg} \] The experiments set δv=0.5, δd=1.5, α=β=1 and γ=0.001, and apply the loss to a 1×1 reduction of the RCCA output to 16 channels.

What the loop count changes on Cityscapes

On the Cityscapes validation set with ResNet-101, the baseline reached 75.1 mIoU, while RCCA with R=1, R=2 and R=3 reached 78.0, 79.8 and 80.2. The estimated increments are 8.3, 16.5 and 24.7 GFLOPs and 53, 127 and 208 M of memory for R=1, 2 and 3, for an input of 1×3×769×769. The baseline is a ResNet-based FCN with dilated convolutions at stages 4 and 5, trained on 769×769 images, with a 97×97 RCCA input map.

The gains the authors report are 2.9% for the first loop, 1.8% for going from one loop to two, and 0.4% from two to three. The authors chose R=2 as the default because it balances accuracy against FLOPs and memory. Visual comparisons show challenging regions being corrected as the loop count grows.

Cost against the non-local module

Table 5 compares costs on an input of 1×3×769×769 against a baseline of 73.3 mIoU. Adding a non-local module gives 77.3 mIoU at 108 GFLOPs and 1411 M of memory, while RCCA with R=2 gives 78.5 at 16.5 GFLOPs and 127 M. The authors report that the criss-cross version needs 11× less GPU memory and about 85% fewer FLOPs than the non-local block for full-image dependencies.

The 73.3 baseline matches the ResNet50-Baseline of Table 4, whereas the 79.8 RCCA result in Table 4 uses ResNet-101, so the two tables should not be read as one backbone.

Running the non-local module recurrently with R=2 reaches 78.7 mIoU but needs 216 GFLOPs and 2820 M of memory. The authors note that the recurrent non-local variant gains more than 1 point, and attribute this to the second step starting from features that already carry longer-range dependencies. On ResNet-101 in Table 4, the non-local module reaches 79.1 and RCCA with R=2 reaches 79.8.

What the category consistent loss adds

In Table 4, RCCA with R=2 reaches 79.8 with ResNet-101 and 80.5 with the category consistent loss added. With ResNet-50 the same comparison goes from 78.5 to 79.3. The authors summarise this as a gain of about 0.7% mIoU on the Cityscapes validation set for both backbones.

To test stability, training was repeated 10 times with ResNet-50 for each loss, and a run counted as failed when its loss became NaN. The piece-wise function succeeded in 9 of 10 runs and the quadratic function in 6 of 10, with mean mIoU of 79.3 and 79.2. The authors attribute the stability to relaxing the penalty in Eq. 6, which keeps the values and gradients small when the distance exceeds δd.

Cityscapes test results

CCNet with ResNet-101, trained on the train and validation sets, reached 81.9 mIoU on the Cityscapes test set through the official evaluation server. On the same table, PSANet reached 80.1 and DenseASPP with DenseNet-161 reached 80.6 on the test set. The authors argue that PSANet's sub-attention map has 2×H×W weights, whereas CCNet's has H+W−1, so CCNet is cheaper while scoring higher.

On the validation set, CCNet with single-scale testing reached 80.5, against 79.3 for DeepLabv3 with multi-scale testing and 80.8 for DPC with extra COCO training data. The validation rows come from methods trained on different or larger sets or with other backbones, so they serve as reference points.

ADE20K and LIP results

On the LIP validation set, CCNet with ResNet-101 reached 55.47% mIoU within the CE2P framework, with RCCA with R=2 used as the context embedding and the category consistent loss applied. The previous best in the table, CE2P, reached 53.10, and the authors state the margin as more than 2.3%. The LIP set has 50,462 images with 19 human part labels and one background label, and the authors show a failure in which a skirt is labelled as pants.

COCO instance segmentation

Following the non-local work, RCCA is inserted into Mask R-CNN right before the last residual block of res4, and results are given for ResNet-50 and ResNet-101 backbones. The category consistent loss is not used in these runs, for fair comparison.

With ResNet-50, box AP rises from 38.2 to 39.3 and mask AP from 34.8 to 36.1. With ResNet-101, box AP rises from 40.1 to 41.0 and mask AP from 36.2 to 37.3, and the non-local block reaches 40.8 and 37.1. The authors describe the gain over the baseline as substantial in all metrics.

CamVid video results

CamVid contains 701 densely annotated images from five video sequences, and the split used has 367 training, 101 validation and 233 test images. Only single-scale evaluation is reported, and the models are initialised from Cityscapes pre-training with R=3.

CCNet3D with T=1 sampled frame reached 77.9 mIoU, and CCNet3D with T=5 temporally ordered frames reached 79.1. The T=5 setting is 1.2% above T=1. Other entries in the test table include PSPNet at 69.1 and VideoGCRF at 75.2.

Limits of the reported evidence

Other methods in the Cityscapes validation rows were trained on different or larger training sets or with other backbones, so those rows are not controlled comparisons. The 0.7% gain from the category consistent loss is reported only for the Cityscapes validation set.

The stability comparison uses 10 runs with ResNet-50, so the success rates rest on a small sample. The loop ablations use one input size of 769×769 and one RCCA map size of 97×97 on Cityscapes. No COCO result with the category consistent loss is reported, and the 3D variant is reported only on CamVid with single-scale evaluation.

Paper info

Authors
Zilong Huang, Xinggang Wang, Yunchao Wei, Lichao Huang, Humphrey Shi, Wenyu Liu, Thomas S. Huang
Venue
arXiv · Preprint
First published
2018-11-28
Added
2026-11-12
Updated
2020-7-9
Version
v2
arXiv
1811.11721
Category
cs.CV
Original paper terms
arXiv non-exclusive 1.0
What we show
Paper info and commentary

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Quote from the paper

Zilong Huang, Xinggang Wang, Yunchao Wei, Lichao Huang, Humphrey Shi, Wenyu Liu, Thomas S. Huang (2018). CCNet: Criss-Cross Attention for Semantic Segmentation. arXiv:1811.11721v2. https://arxiv.org/abs/1811.11721v2

BibTeX
@misc{huang2018ccnet,
  title = {{CCNet: Criss-Cross Attention for Semantic Segmentation}},
  author = {Zilong Huang and Xinggang Wang and Yunchao Wei and Lichao Huang and Humphrey Shi and Wenyu Liu and Thomas S. Huang},
  year = {2018},
  eprint = {1811.11721},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1811.11721v2}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up