Pooling layer
In neural networks, a pooling layer is a kind of network layer that downsamples and aggregates information that is dispersed among many vectors into fewer vectors. It has several uses. It removes redundant information, thus reducing the amount of computation and memory required, which makes the model more robust to small variations in the input; and it increases the receptive field of neurons in later layers in the network.
In neural networks, a pooling layer is a kind of network layer that downsamples and aggregates information that is dispersed among many vectors into fewer vectors. It has several uses. It removes redundant information, thus reducing the amount of computation and memory required, which makes the model more robust to small variations in the input; and it increases the receptive field of neurons in later layers in the network. Define \mathrm{MaxPool}(x | f, s)_{0, 0, 0} = \max(x_{0:f-1, 0:f-1, 0}) where 0:f-1 means the range 0, 1, \dots, f-1 . Note that we need to avoid the off-by-one error. The next input is \mathrm{MaxPool}(x | f, s)_{1, 0, 0} = \max(x_{s:s + f-1, 0:f-1, 0}) and so on. The receptive field of y_{i, j, c} is x_{is + f-1, js + f-1, c} , so in general, \mathrm{MaxPool}(x | f, s)_{i,j,c} = \mathrm{max}(x_{is: is+f-1, js: js + f-1, c}) If the horizontal and vertical filter size and strides differ, then in general, \mathrm{MaxPool}(x | f, s)_{i,j,c} = \mathrm{max}(x_{is_H: is_H+f_H-1, js_W: js_W + f_W-1, c}) More succinctly, we can write y_k = \max(\{x_{k'} | k' \text{ in the receptive field of }k\}) . If H is not expressible as ks + f where k is an integer, then for computing the entries of the output tensor on the boundaries, max pooling would attempt to take as inputs variables off the tensor. In this case, how those non-existent variables are handled depends on the padding conditions, illustrated on the right. Global Max Pooling (GMP) is a specific kind of max pooling where the output tensor has shape \R^{C} and the receptive field of y_c is all of x_{0:H, 0:W, c} . That is, it takes the maximum over each entire channel. It is often used just before the final fully connected layers in a CNN classification head. Average pooling (AvgPool) is similarly defined \mathrm{AvgPool}(x | f, s)_{i,j,c} = \mathrm{average}(x_{is: is+f-1, js: js + f-1, c}) = \frac{1}{f^2} \sum_{k \in is: is+f-1}\sum_{l \in js: js + f-1} x_{k, l, c} Global Average Pooling (GAP) is defined similarly to GMP. It was first proposed in Network-in-Network. Similarly to GMP, it is often used just before the final fully connected layers in a CNN classification head. Mixed Pooling is a linear sum of max pooling and average pooling. That is, \mathrm{MixedPool}(x | f, s, w) = w \mathrm{MaxPool}(x | f, s) + (1-w)\mathrm{AvgPool}(x | f, s) where w \in [0, 1] is either a hyperparameter, a learnable parameter, or randomly sampled anew every time. Lp Pooling is similar to average pooling, but uses Lp norm average instead of average: y_k = \left(\frac 1N \sum_{k' \text{ in the receptive field of } k} |x_{k'}|^p\right)^{1/p} where N is the size of receptive field, and p \geq 1 is a hyperparameter. If all activations are non-negative, then average pooling is the case of p = 1 , and max pooling is the case of p \to \infty . Square-root pooling is the case of p = 2 . Stochastic pooling samples a random activation x_{k'} from the receptive field with probability \frac{x_{k'}}{\sum_{k} x_{k}} . It is the same as average pooling in expectation. Softmax pooling is like max pooling, but uses softmax, i.e. \frac{\sum_{k'} e^{\beta x_{k'}}x_{k'}}{\sum_{k} e^{\beta x_{k}}} where \beta > 0 . Average pooling is the case of \beta \downarrow 0 , and max pooling is the case of \beta \uparrow \infty Local Importance-based Pooling generalizes softmax pooling by \frac{\sum_{k'} e^{ g(x_{k'})}x_{k'}}{\sum_{k} e^{ g(x_{k})}} where g is a learnable function. Covariance pooling computes the covariance matrix of the vectors \{x_{k, l, 0:C-1}\}_{k \in is:is + f-1, l \in js:js + f-1} which is then flattened to a C^2 -dimensional vector y_{i,j, 0:C^2-1} . Global covariance pooling is used similarly to global max pooling. As average pooling computes the average, which is a first-degree statistic, and covariance is a second-degree statistic, covariance pooling is also called "second-order pooling". It can be generalized to higher-order poolings. Blur Pooling means applying a blurring method before downsampling. For example, the Rect-2 blur pooling means taking an average pooling at f = 2, s = 1 , then taking every second pixel (identity with s = 2 ). Multihead attention pooling (MAP) applies a multi headed attention block to pooling. Specifically, it takes as input a list of vectors x_1, x_2, \dots, x_n , which might be thought of as the output vectors of a layer of a ViT. It then applies a feedforward layer \mathrm{FFN} on each vector, resulting in a matrix V = [\mathrm{FFN}(v_1), \dots, \mathrm{FFN}(v_n)] . This is then sent to a multi-headed attention, resulting in \mathrm{MultiheadedAttention}(Q, V, V) , where Q is a matrix of trainable parameters. This was first proposed in the Set Transformer architecture. Later papers demonstrated that GAP and MAP both perform better than BERT-like pooling. \mathbf{y} = \frac{\mathbf{X}\mathbf{p}}{\Vert\mathbf{p}\Vert} where \mathbf{p} is a learnable projection vector. The projection vector \mathbf{p} computes a scalar projection value for each graph node. The top-k pooling layer can then be formalised as follows: \mathbf{X}' = (\mathbf{X} \odot \text{sigmoid}(\mathbf{y}))_{\mathbf{i}} \mathbf{A}' = \mathbf{A}_{\mathbf{i}, \mathbf{i}} where \mathbf{i} = \text{top}_k(\mathbf{y}) is the subset of nodes with the top-k highest projection scores, \odot denotes element-wise matrix multiplication, and \text{sigmoid}(\cdot) is the sigmoid function. In other words, the nodes with the top-k highest projection scores are retained in the new adjacency matrix \mathbf{A}' . The \text{sigmoid}(\cdot) operation makes the projection vector \mathbf{p} trainable by backpropagation, which otherwise would produce discrete outputs. \mathbf{y} = \text{GNN}(\mathbf{X}, \mathbf{A}) where \text{GNN} is a generic permutation equivariant GNN layer (e.g., GCN, GAT, MPNN). The Self-attention pooling layer can then be formalised as follows: \mathbf{X}' = (\mathbf{X} \odot \mathbf{y})_{\mathbf{i}} \mathbf{A}' = \mathbf{A}_{\mathbf{i}, \mathbf{i}} where \mathbf{i} = \text{top}_k(\mathbf{y}) is the subset of nodes with the top-k highest projection scores, \odot denotes element-wise matrix multiplication. The self-attention pooling layer can be seen as an extension of the top-k pooling layer. Differently from top-k pooling, the self-attention scores computed in self-attention pooling account both for the graph features and the graph topology.
References
- ^ Zhang, Aston; Lipton, Zachary; Li, Mu; Smola, Alexander J. (2024). "7.5. Pooling" . Dive into deep learning . Cambridge New York Port Melbourne New Delhi Singapore: Cambridge University Press. ISBN 978-1-009-38943-3 . Wikipedia revision 1361286348, retrieved 2026-11-20 · 1795129200.0
- ^ Wang, Qilong; Xie, Jiangtao; Zuo, Wangmeng; Zhang, Lei; Li, Peihua (2020). "Deep CNNs Meet Global Covariance Pooling: Better Representation and Generalization". IEEE Transactions on Pattern Analysis and Machine Intelligence . 43 (8): 2582– 2597. arXiv : 1904.06836 . doi : 10.1109/TPAMI.2020.2974833 . ISSN 0162-8828 . PMID 32086198 . Wikipedia revision 1361286348, retrieved 2026-11-20 · 1795129200.0
- ^ Zhang, Richard (2018-09-27). "Making Convolutional Networks Shift-Invariant Again" . arXiv : 1904.11486 . {{ cite journal }} : Cite journal requires |journal= ( help ) Wikipedia revision 1361286348, retrieved 2026-11-20 · 1795129200.0
- ^ He, Kaiming; Chen, Xinlei; Xie, Saining; Li, Yanghao; Dollar, Piotr; Girshick, Ross (June 2022). "Masked Autoencoders Are Scalable Vision Learners" . 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) . IEEE. pp. 15979– 15988. arXiv : 2111.06377 . doi : 10.1109/cvpr52688.2022.01553 . ISBN 978-1-6654-6946-3 . Wikipedia revision 1361286348, retrieved 2026-11-20 · 1795129200.0
- ^ Lee, Juho; Lee, Yoonho; Kim, Jungtaek; Kosiorek, Adam; Choi, Seungjin; Teh, Yee Whye (2019-05-24). "Set Transformer: A Framework for Attention-based Permutation-Invariant Neural Networks" . Proceedings of the 36th International Conference on Machine Learning . PMLR: 3744– 3753. arXiv : 1810.00825 . Wikipedia revision 1361286348, retrieved 2026-11-20 · 1795129200.0
- ^ Karamcheti, Siddharth; Nair, Suraj; Chen, Annie S.; Kollar, Thomas; Finn, Chelsea; Sadigh, Dorsa; Liang, Percy (2023-02-24). "Language-Driven Representation Learning for Robotics". arXiv : 2302.12766 [ cs.RO ]. Wikipedia revision 1361286348, retrieved 2026-11-20 · 1795129200.0
- ^ Lin, Min; Chen, Qiang; Yan, Shuicheng (2013). "Network In Network". arXiv : 1312.4400 [ cs.NE ]. Wikipedia revision 1361286348, retrieved 2026-11-20 · 1795129200.0
- ^ Hartline, H. K. (1940-09-30). "The Receptive Fields of Optic Nerve Fibers" . American Journal of Physiology. Legacy Content . 130 (4): 690– 699. doi : 10.1152/ajplegacy.1940.130.4.690 . ISSN 0002-9513 . Wikipedia revision 1361286348, retrieved 2026-11-20 · 1795129200.0
- ^ Hubel, D. H.; Wiesel, T. N. (January 1962). "Receptive fields, binocular interaction and functional architecture in the cat's visual cortex" . The Journal of Physiology . 160 (1): 106–154.2. doi : 10.1113/jphysiol.1962.sp006837 . ISSN 0022-3751 . PMC 1359523 . PMID 14449617 . Wikipedia revision 1361286348, retrieved 2026-11-20 · 1795129200.0
- ^ Westheimer, G (December 1965). "Spatial interaction in the human retina during scotopic vision" . The Journal of Physiology . 181 (4): 881– 894. doi : 10.1113/jphysiol.1965.sp007803 . ISSN 0022-3751 . PMC 1357689 . PMID 5881260 . Wikipedia revision 1361286348, retrieved 2026-11-20 · 1795129200.0
- ^ Julesz, Bela; Chang, Jih Jie (March 1976). "Interaction between pools of binocular disparity detectors tuned to different disparities" . Biological Cybernetics . 22 (2): 107– 119. doi : 10.1007/BF00320135 . ISSN 0340-1200 . PMID 1276243 . Wikipedia revision 1361286348, retrieved 2026-11-20 · 1795129200.0
- ^ Schumer, Robert; Ganz, Leo (1979-01-01). "Independent stereoscopic channels for different extents of spatial pooling" . Vision Research . 19 (12): 1303– 1314. doi : 10.1016/0042-6989(79)90202-5 . ISSN 0042-6989 . PMID 532098 . Wikipedia revision 1361286348, retrieved 2026-11-20 · 1795129200.0
- ^ Weng, J.; Ahuja, N.; Huang, T.S. (1992). "Cresceptron: A self-organizing neural network which grows adaptively". [Proceedings 1992] IJCNN International Joint Conference on Neural Networks . Vol. 1. IEEE. pp. 576– 581. doi : 10.1109/IJCNN.1992.287150 . ISBN 978-0-7803-0559-5 . Wikipedia revision 1361286348, retrieved 2026-11-20 · 1795129200.0
- ^ Yu, Dingjun; Wang, Hanli; Chen, Peiqiu; Wei, Zhihua (2014). "Mixed Pooling for Convolutional Neural Networks" . In Miao, Duoqian; Pedrycz, Witold; Ślȩzak, Dominik; Peters, Georg; Hu, Qinghua; Wang, Ruizhi (eds.). Rough Sets and Knowledge Technology . Lecture Notes in Computer Science. Vol. 8818. Cham: Springer International Publishing. pp. 364– 375. doi : 10.1007/978-3-319-11740-9_34 . ISBN 978-3-319-11740-9 . Wikipedia revision 1361286348, retrieved 2026-11-20 · 1795129200.0
- ^ Zeiler, Matthew D.; Fergus, Rob (2013-01-15). "Stochastic Pooling for Regularization of Deep Convolutional Neural Networks". arXiv : 1301.3557 [ cs.LG ]. Wikipedia revision 1361286348, retrieved 2026-11-20 · 1795129200.0
- ^ Gao, Ziteng; Wang, Limin; Wu, Gangshan (2019). "LIP: Local Importance-Based Pooling" : 3355– 3364. arXiv : 1908.04156 . {{ cite journal }} : Cite journal requires |journal= ( help ) Wikipedia revision 1361286348, retrieved 2026-11-20 · 1795129200.0
- ^ He, Kaiming; Zhang, Xiangyu; Ren, Shaoqing; Sun, Jian (2015-09-01). "Spatial Pyramid Pooling in Deep Convolutional Networks for Visual Recognition". IEEE Transactions on Pattern Analysis and Machine Intelligence . 37 (9): 1904– 1916. arXiv : 1406.4729 . Bibcode : 2015ITPAM..37.1904H . doi : 10.1109/TPAMI.2015.2389824 . ISSN 0162-8828 . PMID 26353135 . Wikipedia revision 1361286348, retrieved 2026-11-20 · 1795129200.0
- ^ Tuzel, Oncel; Porikli, Fatih; Meer, Peter (2006). "Region Covariance: A Fast Descriptor for Detection and Classification" . In Leonardis, Aleš; Bischof, Horst; Pinz, Axel (eds.). Computer Vision – ECCV 2006 . Vol. 3952. Berlin, Heidelberg: Springer Berlin Heidelberg. pp. 589– 600. doi : 10.1007/11744047_45 . ISBN 978-3-540-33834-5 . Retrieved 2024-09-09 . Wikipedia revision 1361286348, retrieved 2026-11-20 · 1725836400.0
- ^ a b Zhai, Xiaohua; Kolesnikov, Alexander; Houlsby, Neil; Beyer, Lucas (June 2022). "Scaling Vision Transformers" . 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) . IEEE. pp. 1204– 1213. arXiv : 2106.04560 . doi : 10.1109/cvpr52688.2022.01179 . ISBN 978-1-6654-6946-3 . Wikipedia revision 1361286348, retrieved 2026-11-20 · 1795129200.0
- ^ Zhang, Aston; Lipton, Zachary; Li, Mu; Smola, Alexander J. (2024). "14.8. Region-based CNNs (R-CNNs)" . Dive into deep learning . Cambridge New York Port Melbourne New Delhi Singapore: Cambridge University Press. ISBN 978-1-009-38943-3 . Wikipedia revision 1361286348, retrieved 2026-11-20 · 1795129200.0
- ^ a b Dosovitskiy, Alexey; Beyer, Lucas; Kolesnikov, Alexander; Weissenborn, Dirk; Zhai, Xiaohua; Unterthiner, Thomas; Dehghani, Mostafa; Minderer, Matthias; Heigold, Georg; Gelly, Sylvain; Uszkoreit, Jakob (2021-06-03). "An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale". arXiv : 2010.11929 [ cs.CV ]. Wikipedia revision 1361286348, retrieved 2026-11-20 · 1795129200.0
- ^ a b Boureau, Y-Lan; Ponce, Jean; LeCun, Yann (2010-06-21). "A theoretical analysis of feature pooling in visual recognition" . Proceedings of the 27th International Conference on International Conference on Machine Learning . ICML'10. Madison, WI, USA: Omnipress: 111– 118. ISBN 978-1-60558-907-7 . {{ cite journal }} : CS1 maint: periodical has ISBN ( link ) Wikipedia revision 1361286348, retrieved 2026-11-20 · 1795129200.0
- ^ Yamaguchi, Kouichi; Sakamoto, Kenji; Akabane, Toshio; Fujimoto, Yoshiji (November 1990). A Neural Network for Speaker-Independent Isolated Word Recognition . First International Conference on Spoken Language Processing (ICSLP 90). Kobe, Japan. Archived from the original on 2021-03-07 . Retrieved 2019-09-04 . Wikipedia revision 1361286348, retrieved 2026-11-20 · 1567551600.0
- ^ a b c Gao, Hongyang; Ji, Shuiwang Ji (2019). "Graph U-Nets". arXiv : 1905.05178 [ a cs.LG a ]. Wikipedia revision 1361286348, retrieved 2026-11-20 · 1795129200.0
- ^ a b Lee, Junhyun; Lee, Inyeop; Kang, Jaewoo (2019). "Self-Attention Graph Pooling". arXiv : 1904.08082 [ cs.LG ]. Wikipedia revision 1361286348, retrieved 2026-11-20 · 1795129200.0
- ^ a b Liu, Chuang; Zhan, Yibing; Li, Chang; Du, Bo; Wu, Jia; Hu, Wenbin; Liu, Tongliang; Tao, Dacheng (2022). "Graph Pooling for Graph Neural Networks: Progress, Challenges, and Opportunities". arXiv : 2204.07321 [ cs.LG ]. Wikipedia revision 1361286348, retrieved 2026-11-20 · 1795129200.0
- Dive into deep learning . · 1782428400.0
- The Receptive Fields of Optic Nerve Fibers . · 1782428400.0
- Interaction between pools of binocular disparity detectors tuned to different disparities . · 1782428400.0
- Independent stereoscopic channels for different extents of spatial pooling . · 1782428400.0
- Yamaguchi, Kouichi. A Neural Network for Speaker-I . November 1990. · 1782428400.0
- Rough Sets and Knowledge Technology . · 1782428400.0
- A theoretical analysis of feature pooling in visual recognition . · 1782428400.0
- Local Importance-based Pooling generalizes softmax pooling by \frac{\sum_{k'} e^{ g(x_{k'})}x_{k'{\sum_{k} e^{ g(x_{k}) where g is a learnable function. Cite journal |last1=Gao |first1 . · 1782428400.0
- Tuzel, Oncel. Computer Vision – ECCV 2006 . 2006. · 1782428400.0
- Zhang, Richard. Making Convolutional Networks Shift-Invariant Again . 2018-09-27. · 1782428400.0
- Cite book |last1=He |first1=Kaiming |last2=Chen |first2=Xinlei |last3=Xie |first3=Saining |last4=Li |first4=Yanghao |last5=Dollar |first5=Piotr |last6=Girshick |first6=Ross |chapter=Masked Autoencod . · 1782428400.0
- Multihead attention pooling (MAP) applies a Attention (machine learning)|multi headed attention block to pooling. Specifically, it takes as input a list of vectors x_1, x_2, \dots, x_n , whi . · 1782428400.0
- 2022 IEEE . · 1782428400.0
Cite this
"Pooling layer". 1782506967. e01 Encyclopedia. CC BY-SA 4.0. https://en.wikipedia.org/w/index.php?oldid=1361286348 JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy