Learning 1D Causal Visual Representation with De-focus Attention Networks

Modality differences have led to the development of heterogeneous architectures for vision and language models. While images typically require 2D non-causal modeling, texts utilize 1D causal modeling. This distinction poses significant challenges in constructing unified multi-modal models. This paper explores the feasibility of representing images using 1D causal modeling. We identify an "over-focus" issue in existing 1D causal vision models, where attention overly concentrates on a small proportion of visual tokens. The issue of "over-focus" hinders the model's ability to extract diverse visual features and to receive effective gradients for optimization. To address this, we propose De-focus Attention Networks, which employ learnable bandpass filters to create varied attention patterns. During training, large and scheduled drop path rates, and an auxiliary loss on globally pooled features for global understanding tasks are introduced. These two strategies encourage the model to attend to a broader range of tokens and enhance network optimization. Extensive experiments validate the efficacy of our approach, demonstrating that 1D causal visual representation can perform comparably to 2D non-causal representation in tasks such as global perception, dense prediction, and multi-modal understanding. Code is released at https://github.com/OpenGVLab/De-focus-Attention-Networks.

Paper

Similar papers

Peer review

Reviewer WAfJ7/10 · confidence 4/52024-06-30

Summary

This paper mainly improves the existing 1D causal models when handling visual inputs, generally 2D non-causal. The key insight of the authors mainly comes from Figure 1: the 1D causal models will over-focus to a few tokens instead of capturing the rich information from the whole image. To fix this issue, the authors propose the de-focus network. They first view the spatial decay and positional embedding as bandpass filters and learn that such filters lead to the capture of diverse information. In addition, the improvement in optimization, especially a significantly larger dropout, also encourages the model to make use of diverse sources of information. Finally, the authors experiment on image classification, object detection, and image-text training to prove the effectiveness of their approach.

Strengths

1. In Figure 1 and Sec. 4.1, the authors make a very good demonstration and reasoning of their intuitions. 2. The De-focus network is simple and reasonable, including both the bandpass filter part and the optimization improvement. 3. The experiments across a wide range of fundamental tasks prove the effectiveness of the De-focus network.

Weaknesses

I think the paper is good overall. I only have one question regarding the generalization of the method, which is not discussed in the paper. Transformer-based architectures like ViT in image classification and CLIP show certain generalizations to different resolutions. For example, people can train a model on 224x224 and inference on 336x336 by interpolating the positional embeddings. I am curious how well the de-focus network will perform under such generalization scenarios, compared with the 2D non-causal transformer-based architectures.

Questions

See weakness.

Rating

7

Confidence

4

Soundness

4

Presentation

4

Contribution

3

Limitations

Yes, the authors have addressed such limitations.

Reviewer WAfJ2024-08-12

Thanks to the authors for the rebuttal! I have also checked the other reviewers' questions and the author's rebuttal. I maintain my current scores for now.

Reviewer J7C54/10 · confidence 4/52024-07-01

Summary

This paper addresses the issue of over-focus in vision models by proposing strategies of using large and scheduled drop path rates and an auxiliary loss on globally pooled features. These strategies aim to encourage the model to focus on a wider range of tokens and improve network optimization. The paper is logically structured, the methods are novel, and the experimental results validate the effectiveness of the proposed approach.

Strengths

1. The paper is well-organized and easy to follow. 2. The authors have an insightful perspective on existing vision models. 3. The research perspective of this paper is interesting and will be inspiring for future studies.

Weaknesses

I am confused about some of the author's viewpoints. For example, in the introduction, the author mentioned that the causal modeling methods explored in existing vision models give them causal reasoning capabilities. 1. Why do vision models based on standard Transformers without adding a causal attention mask still possess some level of causal reasoning abilities? 2. Can we consider that vision Transformers inherently have causal abilities, and that existing improved methods simply amplify these models' causal capabilities?

Questions

1. Can using large spatial dropout/dropblock or randomly dropping masked image tokens achieve similar effects compared to using a Large Drop Path Rate? If these methods are feasible, could additional experimental results comparisons be included? 2. The authors need to provide further explanation on the rationale behind the positioning of learnable decay and learnable RoPE in the attention mechanism. Besides, can we directly deploy them on the feature maps before the attention mechanism?

Rating

4

Confidence

4

Soundness

3

Presentation

4

Contribution

3

Limitations

1. The authors compared the parameter counts between models in terms of efficiency, but parameter count alone may not fully reflect model efficiency. I suggest the authors consider adding metrics related to model FLOPs and latency in Table 1 and Table 2. 2. Adding a classification loss to the model is not a novel method. 3. The ablation study lacks experimental results comparing with other causal methods. 4. There is a small grammatical error. In the paragraph on line 38, the phrase "On one hand xxx, On the other hand xxx" typically indicates a contrasting situation, but in this context, the authors may not intend to convey such a situation.

Authorsrebuttal2024-08-13

Thanks for your reply! We appreciate your time and efforts to read our responses and paper. Please see our new response below. --- > **Q1: For Transformer models that do not include adding a causal attention mask, how do they possess the ability for causal modeling? Furthermore, based on the current definition of "causal modeling," can we consider CNNs as a form of causal modeling as well?** A1: It should be first clarified that standard Transformers or CNNs can not learn to perform causal modeling without a causal attention mask. In mathematical terms, given an input token sequence $x_1, ..., x_n$, causal modeling aims to maximize the likelihood of the correct next token given previous tokens in the sequence, which can be formulated as $$\max_\theta\sum_{i=1}^{n-1}\log p(x_{i+1}|x_1, ..., x_i;\theta),$$ where $\theta$ refers to the parameter set of the model. For Transformers and CNNs, a causal mask is necessary to restrict access to future tokens. Without a causal mask, Transformers can access the entire input sequence, i.e., they will use $x_1, ..., x_n$ as the probability condition rather than $x_1, ..., x_i$. Similarly, CNNs can access neighborhood tokens in the local window, i.e., they will use $x_{i-w}, ..., x_{i+w}$ as the probability condition, where $w$ is the local window width. These conditions both include the next token, which leads to information leakage. Therefore, standard Transformers and CNNs will rely on such shortcuts, failing to learn to perform causal modeling effectively. --- > **Q2: Building on the last question, if existing models already inherently possess causal modeling capabilities, would the proposed method be considered merely an enhancement?** A2: Based on the reasons mentioned above, existing models do not inherently have causal modeling abilities, and our De-focus Attention Networks demonstrate that causal models equipped with the "de-focus attention" strategy can achieve comparable performances with non-causal models. --- > **Q3: The operational mechanism of the Large Drop Path Rate seems similar to large spatial dropout/dropblock or randomly dropping masked image tokens. Why is it that the Large Drop Path Rate can achieve more advantageous results? What are the reasons that lead to its superior performance? Observation from the table in your reply.** A3: Large spatial dropout or dropping masked image tokens could theoretically introduce some regularization effects. However, there are nuanced differences in their mechanisms and impacts on model training compared to large drop path rate. - Large spatial dropout only drops portions of the tokens, so some tokens can still access information from neighboring tokens. Therefore, the network can still learn to focus on neighboring tokens and rely on depth to gather information. - Dropping masked image tokens completely removes some input tokens, so the model may fail to learn to pay attention to tokens that are distant in positions. As a result, it does not prevent the model from leveraging depth to learn representations. Its regularization effect is thus not significant. --- We hope that our response can address your concerns, and any further discussion is welcomed.

Reviewer 4dxw6/10 · confidence 4/52024-07-13

Summary

The paper addresses the challenges of using 1D causal modeling for images, which traditionally require 2D non-causal modeling due to inherent modality differences between vision and language models. It identifies a significant issue in existing 1D causal vision models termed "over-focus," where the model's attention is overly concentrated on a few visual tokens, hindering diverse feature extraction and optimization. To combat this, the paper introduces De-focus Attention Networks that use learnable bandpass filters to diversify attention patterns and incorporate strategies like large drop path rates and an auxiliary loss on globally pooled features to broaden token attention and enhance model optimization. Experiments on several image underst show that these innovations enable 1D causal visual representation to achieve performance comparable to 2D non-causal models in various tasks, including global perception and multi-modal understanding.

Strengths

+ Identifying over-focus issue in 1D causal visual modeling is an interesting and provide a starting point for the work in thissubmission. + A "de-focus attention" strategy is introducted to address this issue. It incorporates learnable bandpass filters into the existing attention mechanisms to generate diverse attention patterns. The proposed idea is resonable. A high drop path probability and an auxiliary loss is also proposed for better optimization. + Experiments on seval visual understanding benchmarks show that via the proposed De-focus Attention Networks, 1D causal visual representation can match the performance of 2D non-causal representation in tasks involving global perception, dense prediction, and multi-modal understanding.

Weaknesses

- For CLIP experiments, it is helpful to also report comparisons for cross-modal retrival on MSCOCO to follow existing routines of CLIP model comparisons. - The major motivation is about addressing challenges in constructing unified multi-modal model, while the main experments are about image understanding tasks. To this point, seems discussions/explorations about impact of proposed method on MLLM is missing. I'm also curious about its potential applications for image generation models.

Questions

Please refer to details in Weakness part above.

Rating

6

Confidence

4

Soundness

3

Presentation

3

Contribution

3

Limitations

Some limitations of the work have been discussed in the submission.

Reviewer WFuU4/10 · confidence 2/52024-07-15

Summary

The paper explores the feasibility of representing images with 1D causal modeling in unified multi-modal vision and language models, addressing the "over-focus" issue in existing models by proposing De-focus Attention Networks (DANs) with learnable bandpass filters and enhanced training strategies. Extensive experiments show that 1D causal visual representation can perform comparably to 2D non-causal representation in global perception, dense prediction, and multi-modal understanding tasks, with code to be released.

Strengths

1. The proposal to use 1D causal modeling for images is a novel approach that challenges the traditional 2D non-causal representation, opening new avenues for unified multi-modal models. 2. The use of large and scheduled drop path rates and an auxiliary loss on globally pooled features are effective training strategies that promote broader attention and better network optimization.

Weaknesses

1. The evaluation of the proposed method is inconsistent, e.g., in table 1, the performance of Base ViT model is reported, but Small and Large model are missing. In table 2 and 3, only Mamba model results are compared.

Questions

Please refer to the weakness section.

Rating

4

Confidence

2

Soundness

2

Presentation

3

Contribution

3

Limitations

Limitations have been discussed in this paper.

Reviewer J7C52024-08-12

Response to authors

I have thoroughly read the authors' responses and revisited the paper. Thank you for the detailed answers. However, I still have some concerns regarding Q1 and Q2. 1. For Transformer models that do not include adding a causal attention mask, how do they possess the ability for causal modeling? Furthermore, based on the current definition of "causal modeling," can we consider CNNs as a form of causal modeling as well? 2. Building on the last question, if existing models already inherently possess causal modeling capabilities, would the proposed method be considered merely an enhancement? 3. The operational mechanism of the Large Drop Path Rate seems similar to large spatial dropout/dropblock or randomly dropping masked image tokens. Why is it that the Large Drop Path Rate can achieve more advantageous results? What are the reasons that lead to its superior performance? Observation from the table in your reply. Many thanks.

Reviewer J7C52024-08-12

Regarding the response to Q5

Yes, I understand. However, you listed adding an auxiliary classification loss as one of your main contributions to optimize the model's representation.

Authorsrebuttal2024-08-13

Thank you for your feedback. We understand your concern regarding the novelty of incorporating an auxiliary classification loss. It's important to emphasize that the auxiliary loss is not a standalone contribution but a component of our comprehensive "de-focus attention" strategy. The core novelty of our work lies in the holistic application of this strategy, which, as demonstrated in our results, enables 1D causal models to achieve performance comparable to non-causal models. We respectfully suggest that the value of the auxiliary loss should be viewed in the context of its role within our broader strategy, which collectively advances the state of the art in causal modeling.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC