7 min readfrom Machine Learning

Revisiting the Efficient Channel Attention paper (2019, 12k citations) - the central hypothesis isn't quite right [D]

Our take

The Efficient Channel Attention (ECA) paper of 2019, boasting over 12,000 citations, proposed a seemingly simple yet impactful approach to channel attention. However, a closer look reveals a fundamental disconnect: ECA's core hypothesis regarding cross-channel interaction may be inaccurate. While ECA demonstrably outperforms Squeeze-Excitation (SE), its design doesn't logically align with the principles of convolutional operations.

The recent critique of the Efficient Channel Attention (ECA) paper, a work boasting over 12,000 citations, offers a fascinating case study in the evolution of AI-native spreadsheet technology and the importance of rigorous hypothesis testing. The core argument, elegantly presented by /u/arkuto, challenges the foundational claim that cross-channel interaction is the key driver of ECA’s performance. Instead, it suggests that the efficacy of ECA might be more attributable to simpler factors, a point underscored by the surprisingly strong results achieved with a k=1 kernel – essentially, no cross-channel interaction at all. This resonates with a broader discussion within our community about over-engineering solutions and the potential for simpler approaches to deliver significant gains, a concern echoed in discussions around data extraction efficiency, as seen in articles like [Formula for extracting information from one worksheet's column to different worksheet giving blank result.] and the ongoing quest to automate data manipulation tasks, as exemplified by efforts to match table row orders, described in [How to get a table to match the number of rows, and row order, of a parent table].

The author's experimental approach, utilizing chess endgame tablebases, is particularly insightful. Moving beyond standard image datasets like CIFAR-10, which can be susceptible to incidental regularization and biased sampling, allows for a more controlled assessment of architectural efficiency. Chess tablebases provide a complete, unbiased dataset, effectively eliminating the risk of overfitting and enabling a clearer separation of core architectural benefits from those arising from dataset peculiarities. The results, demonstrating that even a minimal, k=1 ECA configuration outperforms established methods like Squeeze-and-Excitation (SE), further weaken the original paper’s central hypothesis. This highlights a critical point often overlooked in the rush to publish – the need to actively disprove, rather than simply confirm, initial assumptions. The fact that so few ECA implementations even test the k=1 case underscores this point, suggesting a potential bias towards confirming existing narratives rather than challenging them.

The broader implications of this critique extend beyond the specific context of channel attention mechanisms. It serves as a reminder that even highly cited and influential papers are not immune to scrutiny and that a deeper understanding of underlying principles is crucial. The author’s suggestion to test architectures on synthetic datasets, where complete data access is possible, is particularly valuable. This methodology could be applied across various domains, allowing for a more rigorous assessment of architectural performance and a reduction in reliance on potentially biased real-world datasets. It also connects to the ongoing efforts to improve data integrity and accuracy, which are paramount for reliable AI-driven decision-making. The challenges of ensuring data quality, particularly when dealing with complex spreadsheets and legacy systems, are highlighted in articles like [Looking to see if it is possible to create a formula to show my account number], where users are grappling with the complexities of data representation and security.

Ultimately, this revisiting of the ECA paper prompts a crucial question: are we, as a community, becoming overly reliant on complex architectures when simpler solutions might offer comparable, or even superior, performance? The surprisingly robust results of the k=1 configuration, coupled with the author’s observation that manually inspecting the weights of ECA with k=3 can be useful, suggests that a more pragmatic and less theoretically driven approach to network design might be warranted. It’s a call for a renewed focus on fundamental principles and a willingness to challenge established dogma, even when it comes to highly cited and widely adopted techniques. The next few years will likely see a shift towards more streamlined and interpretable AI models, and this critique of ECA may prove to be a catalyst for that change.

ECA was positioned as a successor to SE.

The idea behind ECA is quite simple. Unlike SE which reduces the channel means into a smaller hidden layer, it directly uses a 1d convolution kernel on the channel means themselves, avoiding the need for dimensionality reduction. The results are undeniable: ECA is a clear improvement over SE. The authors claim that cross-channel interaction is a key ingredient. But on a conceptual level, the design of ECA doesn't make much sense.

Let's take a step back. Why do we use convolutions in the first place? Convolutions are fundamentally designed for data with an underlying topology (e.g. space or time). They assume locality (adjacent elements interact) and translation invariance (the same kernel applies everywhere). Sliding a kernel across a 2D image works because coordinates have meaning, and the statistical properties of an image are largely stationary across the frame. This isn't perfectly true - which is why modern CNNs have moved towards dynamic convolutions - but it's still good enough to be useful. If you randomly permuted the pixels in an image, a convolution would be meaningless.

Now consider tabular data. Suppose we have 32 channels e.g. [cost, weight, material, colour, volume, speed, ...]. Using a CNN architecture for this kind of data is clearly inappropriate. A 1d kernel of width 3 would be moved across the channels, so that [cost, weight, material] was input and also [ weight, material, colour] was input and so on, and have to somehow output something meaningful. ECA is doing exactly this type of computation.

ECA does a 1d convolution over the channel dimension. It is a cursed convolution because tabular data does not have a topology to suit it. In practice, if you did use a CNN on tabular data, I would expect better than random performance because neural networks are ridiculously good at fitting to the dataset given their constraints and would reorganise the channel order (using the initial 1x1 projection layer) to suit it. It would learn to use convolutions, but it would be an inefficient approach.

Experiments

Instead of using image data, I used chess data: the 6-piece endgame tablebases for chess. Chess is a solved game with 6 (or fewer) pieces on the board. The task for the network is this: given a position, with perfect play is it a win, draw or loss for the active player? A CNN architecture is what lc0 originally used (where at the time, surpassed Stockfish to become the strongest chess engine) so it is very suitable for this task.

Chess tablebases are useful for benchmarking architectural designs because training examples can be sampled from the complete underlying problem rather than from an incomplete dataset. This differs from datasets such as the CIFAR-10 image dataset, where the train set is not expected to be a random unbiased sample from the true full distribution - we might unknowingly have a disproportionately have pictures of frogs on sunny days. Even when we don't train on each of the 3.7 trillion 6-piece positions, we know that we've randomly sampled from those positions, meaning we don't train on a biased subset - we can be confident our training samples are representative of the full set.

Experiment results. Each channel gate row is the average of 3+ separate runs.

Channel gate Avg test loss Avg test accuracy
IdentityGate 0.0981 96.04%
SqueezeExcitationGate (SE8) 0.0954 96.17%
EfficientChannelAttentionGate (k=3) 0.0822 96.68%
EfficientChannelAttentionGate (k=1) 0.0826 96.61%
CenterMaskedEfficientChannelAttentionGate (k=3) 0.0821 96.63%
PerChannelGate 0.0815 96.65%

IdentityGate Unsurprisingly, no squeeze performed the worst of all tests.

SqueezeExcitationGate SE showed a modest improvement.

EfficientChannelAttentionGate (k=3) ECA, consistent with the paper, showed a clear improvement over SE.

EfficientChannelAttentionGate (k=1) Surprisingly, this had good results indicating that their central hypothesis that cross-channel interaction is key wasn't quite right

CenterMaskedEfficientChannelAttentionGate: ECA with k = 3 with the middle channel masked (in a [1, 0, 1] mask) This complicates the story, it indicates cross channel attention can actually be useful.

PerChannelGate Instead of a convolution kernel that slides across the axis, simply use a separate independently specified weight per channel. This has one parameter per channel, more than the 3 parameters of ECA With k=3, but it is still a negligible amount since per layer we expect on the order of num_channels2 parameters.

For clarity and to avoid ambiguity, here is the code for the key squeezes.

So basically there's 3 tiers of results. No squeeze with poor results, SE With mediocre results, and the rest ECA-like with the best results. So something weird is going on. I don't have a good explanation for the results (in particular the success of the [1, 0, 1] mask), and I am currently trying to find one. One suspicion I have is that in the 101 mask, the net is smart enough to smuggle information into the global means of channel A and C to help with channel B without affecting normal channel operation (by using biases to undo its shift of the global mean), but have not yet tested this hypothesis. There's a lot of possibilities. The good news is the weight count is very low - only 3 with k=3, so manually inspecting the weights can be useful.

In my digging, I some repositories that recreate the original ECA. Not one of them tests the k=1 case, which would have revealed that the explanation of the mechanism is not correct. The official repo does use k=1 but only for a limited number of early layers, then moves to k=3 for the rest.

Repository Permits / Uses $k=1$? Trained $k=1$ Ablation? Result / Notes
BangguWu/ECANet (Official) Yes. MobileNetV2 uses $k=1$ when $C < 96$, else $k=3$ Partial. Mixed $k={1,3}$ in MobileNetV2; no pure $k=1$ ResNet ablation 72.56 Top-1 / 90.81 Top-5 on ImageNet
Reproducibility-Challenge-ECANET Generic formula can yield $k=1$, but not at standard test widths No. No independent $k=1$ run found None
huggingface/pytorch-image-models (timm) Can be manually set to $k=1$, but adaptive formula clamps $k \ge 3$ No. No official $k=1$ benchmark None

It's interesting that the k=1 case, a 1 parameter approach, outperforms SE, CBAM and matches ECA. It definitely makes me wonder if we're over-engineering networks today in some way.

My final thoughts:

  1. The paper and repos should have tested the "degenerate" kernel size of 1, which has no cross channel interaction. At k=1, ECA still beats SE, undermining their central hypothesis. They spent an enormous amount of time fine tuning the exact optimal value of k, without taking the scientific approach of trying to disprove their hypothesis.

  2. In addition to traditional real-world datasets, architectures should also be tested on synthetic datasets where we have full access to the complete dataset (e.g. chess endgame data) so that we can better separate incidental regularization improvement effects with core architectural efficiency effects - the idea being that there is no risk of overfitting when we have access to a complete, flawless dataset. If the real reason a new architecture works well on real-world data is because of implicit regularization, it won't show the same improvements on the synthetic dataset.

submitted by /u/arkuto
[link] [comments]

Read on the original site

Open the publisher's page for the full experience

View original article