Abstract

In a Transformer, token mixing is the step that lets each token draw information from other tokens, and it dominates the cost of encoding long sequences. Self-attention does this mixing very well: every token weighs every other token by content, which gives strong contextual modeling. That all-pairs comparison is also why its cost grows quadratically with sequence length. We introduce WNet, a Transformer encoder that replaces self-attention with token mixing based on the discrete wavelet transform (DWT). Three attention-free mixers recombine the scales: by linear fusion, by learned gating, or by letting each token choose its scales. A hybrid adds self-attention in the last layer only. A receptive-field analysis shows that wavelet mixers built from two-tap filters, such as Haar, never relate tokens outside fixed blocks, however deep the network, even when the filters are learned. Longer filters reach the whole sequence within two layers. We pre-train every model with masked language modeling on a fixed-token subset of C4 and fine-tune on GLUE, using one controlled setup with size-matched BERT and FNet baselines and a control that cannot mix tokens. The token-gated mixer trains as fast as attention at 256 tokens and 2.7 times faster at 4,096.

Keywords

Publication details

Journal
Not available
Open access
Green open access

Cite this article

APA 7

Salama, R. A., Youssef, A., & Diab, M. (2026). WNet: Discrete Wavelets Transform for Efficient Token Mixing. https://omanscience.com/en/articles/wnet-discrete-wavelets-transform-for-efficient-token-mixing

MLA 9

Salama, Rana Aref, et al. "WNet: Discrete Wavelets Transform for Efficient Token Mixing." https://omanscience.com/en/articles/wnet-discrete-wavelets-transform-for-efficient-token-mixing.

Chicago (author–date)

Salama, Rana Aref, Abdou Youssef, and Mona Diab. 2026. "WNet: Discrete Wavelets Transform for Efficient Token Mixing." https://omanscience.com/en/articles/wnet-discrete-wavelets-transform-for-efficient-token-mixing.

Harvard

Salama, R. A., Youssef, A. and Diab, M. (2026) 'WNet: Discrete Wavelets Transform for Efficient Token Mixing', Available at: https://omanscience.com/en/articles/wnet-discrete-wavelets-transform-for-efficient-token-mixing.

Vancouver

Salama RA, Youssef A, Diab M. WNet: Discrete Wavelets Transform for Efficient Token Mixing. https://omanscience.com/en/articles/wnet-discrete-wavelets-transform-for-efficient-token-mixing

IEEE

R. A. Salama, A. Youssef, and M. Diab, "WNet: Discrete Wavelets Transform for Efficient Token Mixing," https://omanscience.com/en/articles/wnet-discrete-wavelets-transform-for-efficient-token-mixing.