{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,10,1]],"date-time":"2026-10-01T06:30:01Z","timestamp":1790836201906,"version":"4.1.0"},"reference-count":48,"publisher":"MDPI AG","issue":"7","license":[{"start":{"date-parts":[[2021,7,3]],"date-time":"2021-07-03T00:00:00Z","timestamp":1625270400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"DOI":"10.13039\/100007479","name":"Fondazione Cassa di Risparmio di Padova e Rovigo","doi-asserted-by":"publisher","award":["Progetti di eccellenza 2017 Numsense"],"award-info":[{"award-number":["Progetti di eccellenza 2017 Numsense"]}],"id":[{"id":"10.13039\/100007479","id-type":"DOI","asserted-by":"publisher"}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Entropy"],"abstract":"<jats:p>One of the most rapidly advancing areas of deep learning research aims at creating models that learn to disentangle the latent factors of variation from a data distribution. However, modeling joint probability mass functions is usually prohibitive, which motivates the use of conditional models assuming that some information is given as input. In the domain of numerical cognition, deep learning architectures have successfully demonstrated that approximate numerosity representations can emerge in multi-layer networks that build latent representations of a set of images with a varying number of items. However, existing models have focused on tasks requiring to conditionally estimate numerosity information from a given image. Here, we focus on a set of much more challenging tasks, which require to conditionally generate synthetic images containing a given number of items. We show that attention-based architectures operating at the pixel level can learn to produce well-formed images approximately containing a specific number of items, even when the target numerosity was not present in the training distribution.<\/jats:p>","DOI":"10.3390\/e23070857","type":"journal-article","created":{"date-parts":[[2021,7,4]],"date-time":"2021-07-04T22:34:36Z","timestamp":1625438076000},"page":"857","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":5,"title":["Learning Numerosity Representations with Transformers: Number Generation Tasks and Out-of-Distribution Generalization"],"prefix":"10.3390","volume":"23","author":[{"given":"Tommaso","family":"Boccato","sequence":"first","affiliation":[{"name":"Department of General Psychology, University of Padova, Via Venezia 8, 35131 Padova, Italy"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0001-7062-4861","authenticated-orcid":false,"given":"Alberto","family":"Testolin","sequence":"additional","affiliation":[{"name":"Department of General Psychology, University of Padova, Via Venezia 8, 35131 Padova, Italy"},{"name":"Department of Information Engineering, University of Padova, Via Gradenigo 6, 35131 Padova, Italy"}],"role":[{"vocabulary":"crossref","role":"author"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-4651-6390","authenticated-orcid":false,"given":"Marco","family":"Zorzi","sequence":"additional","affiliation":[{"name":"Department of General Psychology, University of Padova, Via Venezia 8, 35131 Padova, Italy"},{"name":"IRCCS San Camillo Hospital, Via Alberoni 70, 30126 Venice-Lido, Italy"}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1968","published-online":{"date-parts":[[2021,7,3]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","first-page":"1798","DOI":"10.1109\/TPAMI.2013.50","article-title":"Representation learning: A review and new perspectives","volume":"35","author":"Bengio","year":"2013","journal-title":"IEEE Trans. Pattern Anal. Mach. Intell."},{"key":"ref_2","doi-asserted-by":"crossref","first-page":"436","DOI":"10.1038\/nature14539","article-title":"Deep learning","volume":"521","author":"LeCun","year":"2015","journal-title":"Nature"},{"key":"ref_3","doi-asserted-by":"crossref","first-page":"515","DOI":"10.3389\/fpsyg.2013.00515","article-title":"Modeling language and cognition with deep unsupervised learning: A tutorial overview","volume":"4","author":"Zorzi","year":"2013","journal-title":"Front. Psychol."},{"key":"ref_4","doi-asserted-by":"crossref","first-page":"e2014196118","DOI":"10.1073\/pnas.2014196118","article-title":"Unsupervised neural network models of the ventral visual stream","volume":"118","author":"Zhuang","year":"2021","journal-title":"Proc. Natl. Acad. Sci. USA"},{"key":"ref_5","doi-asserted-by":"crossref","first-page":"181","DOI":"10.1017\/S0140525X12000477","article-title":"Whatever next? Predictive brains, situated agents, and the future of cognitive science","volume":"36","author":"Clark","year":"2013","journal-title":"Behav. Brain Sci."},{"key":"ref_6","doi-asserted-by":"crossref","first-page":"127","DOI":"10.1038\/nrn2787","article-title":"The free-energy principle: A unified brain theory?","volume":"11","author":"Friston","year":"2010","journal-title":"Nat. Rev. Neurosci."},{"key":"ref_7","doi-asserted-by":"crossref","first-page":"428","DOI":"10.1016\/j.tics.2007.09.004","article-title":"Learning multiple layers of representation","volume":"11","author":"Hinton","year":"2007","journal-title":"Trends Cogn. Sci."},{"key":"ref_8","doi-asserted-by":"crossref","first-page":"73","DOI":"10.3389\/fncom.2016.00073","article-title":"Probabilistic models and generative neural networks: Towards an unified framework for modeling normal and impaired neurocognitive functions","volume":"10","author":"Testolin","year":"2016","journal-title":"Front. Comput. Neurosci."},{"key":"ref_9","doi-asserted-by":"crossref","first-page":"1527","DOI":"10.1162\/neco.2006.18.7.1527","article-title":"A fast learning algorithm for deep belief nets","volume":"18","author":"Hinton","year":"2006","journal-title":"Neural Comput."},{"key":"ref_10","doi-asserted-by":"crossref","unstructured":"Le, Q.V. (2013, January 26\u201331). Building high-level features using large scale unsupervised learning. Proceedings of the 2013 IEEE international conference on acoustics, speech and signal processing, Vancouver, BC, Canada.","DOI":"10.1109\/ICASSP.2013.6639343"},{"key":"ref_11","doi-asserted-by":"crossref","first-page":"273","DOI":"10.1007\/s10339-017-0796-7","article-title":"Learning representation hierarchies by sharing visual features: A computational investigation of Persian character recognition with unsupervised deep learning","volume":"18","author":"Sadeghi","year":"2017","journal-title":"Cogn. Process."},{"key":"ref_12","doi-asserted-by":"crossref","first-page":"657","DOI":"10.1038\/s41562-017-0186-2","article-title":"Letter perception emerges from unsupervised deep learning and recycling of natural image features","volume":"1","author":"Testolin","year":"2017","journal-title":"Nat. Hum. Behav."},{"key":"ref_13","unstructured":"Kingma, D.P., and Welling, M. (2013). Auto-encoding variational bayes. arXiv."},{"key":"ref_14","unstructured":"Goodfellow, I.J., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., and Bengio, Y. (2014). Generative adversarial networks. arXiv."},{"key":"ref_15","doi-asserted-by":"crossref","unstructured":"Karras, T., Laine, S., and Aila, T. (2019, January 16\u201320). A style-based generator architecture for generative adversarial networks. Proceedings of the IEEE\/CVF Conference on Computer Vision and Pattern Recognition, Long Beach, CA, USA.","DOI":"10.1109\/CVPR.2019.00453"},{"key":"ref_16","doi-asserted-by":"crossref","unstructured":"Zhu, J.Y., Park, T., Isola, P., and Efros, A.A. (2017, January 22\u201329). Unpaired image-to-image translation using cycle-consistent adversarial networks. Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy.","DOI":"10.1109\/ICCV.2017.244"},{"key":"ref_17","unstructured":"Higgins, I., Matthey, L., Pal, A., Burgess, C., Glorot, X., Botvinick, M., Mohamed, S., and Lerchner, A. (2021, May 15). beta-vae: Learning Basic Visual Concepts with a Constrained Variational Framework 2016. Available online: https:\/\/openreview.net\/forum?id=Sy2fzU9gl."},{"key":"ref_18","unstructured":"Chen, X., Duan, Y., Houthooft, R., Schulman, J., Sutskever, I., and Abbeel, P. (2016). Infogan: Interpretable representation learning by information maximizing generative adversarial nets. arXiv."},{"key":"ref_19","unstructured":"Burgess, C.P., Matthey, L., Watters, N., Kabra, R., Higgins, I., Botvinick, M., and Lerchner, A. (2019). Monet: Unsupervised scene decomposition and representation. arXiv."},{"key":"ref_20","unstructured":"Dehaene, S. (2011). The Number Sense: How the Mind Creates Mathematics, Oxford University Press."},{"key":"ref_21","doi-asserted-by":"crossref","first-page":"642","DOI":"10.1037\/a0026218","article-title":"The interplay between nonsymbolic number and its continuous visual properties","volume":"141","author":"Gebuis","year":"2012","journal-title":"J. Exp. Psychol. Gen."},{"key":"ref_22","doi-asserted-by":"crossref","first-page":"194","DOI":"10.1038\/nn.2996","article-title":"Emergence of a\u2019visual number sense\u2019in hierarchical generative models","volume":"15","author":"Stoianov","year":"2012","journal-title":"Nat. Neurosci."},{"key":"ref_23","doi-asserted-by":"crossref","first-page":"e12940","DOI":"10.1111\/desc.12940","article-title":"Numerosity discrimination in deep neural networks: Initial competence, developmental refinement and experience statistics","volume":"23","author":"Testolin","year":"2020","journal-title":"Dev. Sci."},{"key":"ref_24","doi-asserted-by":"crossref","first-page":"20170043","DOI":"10.1098\/rstb.2017.0043","article-title":"An emergentist perspective on the origin of number sense","volume":"373","author":"Zorzi","year":"2018","journal-title":"Philos. Trans. R. Soc. B Biol. Sci."},{"key":"ref_25","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1038\/s41598-020-66838-5","article-title":"Visual sense of number vs. sense of magnitude in humans and machines","volume":"10","author":"Testolin","year":"2020","journal-title":"Sci. Rep."},{"key":"ref_26","doi-asserted-by":"crossref","unstructured":"Zanetti, A., Testolin, A., Zorzi, M., and Wawrzynski, P. (2019, January 12\u201314). Numerosity Representation in InfoGAN: An Empirical Study. Proceedings of the International Work-Conference on Artificial Neural Networks, Gran Canaria, Spain.","DOI":"10.1007\/978-3-030-20518-8_5"},{"key":"ref_27","unstructured":"Bahdanau, D., Cho, K., and Bengio, Y. (2015, January 7\u20139). Neural Machine Translation by Jointly Learning to Align and Translate. Proceedings of the 3rd International Conference on Learning Representations, San Diego, CA, USA."},{"key":"ref_28","unstructured":"Ghahramani, Z., Welling, M., Cortes, C., Lawrence, N., and Weinberger, K.Q. (2014). Sequence to Sequence Learning with Neural Networks. Advances in Neural Information Processing Systems, Curran Associates Inc."},{"key":"ref_29","unstructured":"Guyon, I., Luxburg, U.V., Bengio, S., Wallach, H., Fergus, R., Vishwanathan, S., and Garnett, R. (2017). Attention is All you Need. Advances in Neural Information Processing Systems, Curran Associates, Inc."},{"key":"ref_30","unstructured":"Ramsauer, H., Sch\u00e4fl, B., Lehner, J., Seidl, P., Widrich, M., Gruber, L., Holzleitner, M., Pavlovi\u0107, M., Sandve, G.K., and Greiff, V. (2020). Hopfield networks is all you need. arXiv."},{"key":"ref_31","unstructured":"Parmar, N., Vaswani, A., Uszkoreit, J., Kaiser, L., Shazeer, N., Ku, A., and Tran, D. (2018, January 10\u201315). Image Transformer. Proceedings of the 35th International Conference on Machine Learning, Stockholm, Sweden."},{"key":"ref_32","unstructured":"Chen, M., Radford, A., Child, R., Wu, J., Jun, H., Luan, D., and Sutskever, I. (2020, January 13\u201318). Generative Pretraining From Pixels. Proceedings of the 37th International Conference on Machine Learning, Virtual Event."},{"key":"ref_33","unstructured":"Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., and Gelly, S. (2020). An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale. arXiv."},{"key":"ref_34","unstructured":"Zhao, S., Ren, H., Yuan, A., Song, J., Goodman, N., and Ermon, S. (2018, January 3\u20138). Bias and Generalization in Deep Generative Models: An Empirical Study. Proceedings of the Advances in Neural Information Processing Systems, Montr\u00e9al, QC, Canada."},{"key":"ref_35","unstructured":"Kondapaneni, N., and Perona, P. (2020). A Number Sense as an Emergent Property of the Manipulating Brain. arXiv."},{"key":"ref_36","unstructured":"Wallach, H., Larochelle, H., Beygelzimer, A., d\u2019Alch\u00e9-Buc, F., Fox, E., and Garnett, R. (2019). PyTorch: An Imperative Style, High-Performance Deep Learning Library. Advances in Neural Information Processing Systems, Vancouver, BC, Canada, 8\u201314 December 2019, Curran Associates, Inc."},{"key":"ref_37","doi-asserted-by":"crossref","unstructured":"Abnar, S., and Zuidema, W. (2020). Quantifying Attention Flow in Transformers. arXiv.","DOI":"10.18653\/v1\/2020.acl-main.385"},{"key":"ref_38","doi-asserted-by":"crossref","unstructured":"Cenzato, A., Testolin, A., and Zorzi, M. (2020). Long-Term Prediction of Physical Interactions: A Challenge for Deep Generative Models. International Conference on Machine Learning, Optimization, and Data Science Siena, Italy, 10\u201313 September 2019, Springer.","DOI":"10.1007\/978-3-030-64583-0_9"},{"key":"ref_39","doi-asserted-by":"crossref","unstructured":"Carter, S., and Nielsen, M. (2017). Using Artificial Intelligence to Augment Human Intelligence. Distill.","DOI":"10.23915\/distill.00009"},{"key":"ref_40","doi-asserted-by":"crossref","first-page":"145","DOI":"10.1016\/S1364-6613(03)00055-X","article-title":"The neural basis of the Weber\u2013Fechner law: A logarithmic mental number line","volume":"7","author":"Dehaene","year":"2003","journal-title":"Trends Cogn. Sci."},{"key":"ref_41","doi-asserted-by":"crossref","unstructured":"He, K., Zhang, X., Ren, S., and Sun, J. (2016, January 27\u201330). Deep Residual Learning for Image Recognition. Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA.","DOI":"10.1109\/CVPR.2016.90"},{"key":"ref_42","doi-asserted-by":"crossref","first-page":"329","DOI":"10.1111\/desc.12299","article-title":"Spontaneous non-verbal counting in toddlers","volume":"19","author":"Sella","year":"2016","journal-title":"Dev. Sci."},{"key":"ref_43","doi-asserted-by":"crossref","first-page":"607","DOI":"10.1111\/j.1467-9280.2008.02130.x","article-title":"Does subitizing reflect numerical estimation?","volume":"19","author":"Revkin","year":"2008","journal-title":"Psychol. Sci."},{"key":"ref_44","doi-asserted-by":"crossref","first-page":"158","DOI":"10.3758\/s13423-020-01801-z","article-title":"Do estimates of numerosity really adhere to Weber\u2019s law? A reexamination of two case studies","volume":"28","author":"Testolin","year":"2021","journal-title":"Psychon. Bull. Rev."},{"key":"ref_45","doi-asserted-by":"crossref","first-page":"1123","DOI":"10.1126\/science.1239052","article-title":"Topographic representation of numerosity in the human parietal cortex","volume":"341","author":"Harvey","year":"2013","journal-title":"Science"},{"key":"ref_46","doi-asserted-by":"crossref","first-page":"213","DOI":"10.1016\/j.tics.2008.03.004","article-title":"The generative basis of natural number concepts","volume":"12","author":"Leslie","year":"2008","journal-title":"Trends Cogn. Sci."},{"key":"ref_47","doi-asserted-by":"crossref","unstructured":"Testolin, A. (2020). The challenge of modeling the acquisition of mathematical concepts. Front. Hum. Neurosci., 14.","DOI":"10.3389\/fnhum.2020.00100"},{"key":"ref_48","unstructured":"Kingma, D.P., and Ba, J. (2015, January 7\u20139). Adam: A Method for Stochastic Optimization. Proceedings of the 3rd International Conference on Learning Representations (ICLR), San Diego, CA, USA."}],"container-title":["Entropy"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/1099-4300\/23\/7\/857\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,11]],"date-time":"2025-10-11T06:25:36Z","timestamp":1760163936000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/1099-4300\/23\/7\/857"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2021,7,3]]},"references-count":48,"journal-issue":{"issue":"7","published-online":{"date-parts":[[2021,7]]}},"alternative-id":["e23070857"],"URL":"https:\/\/doi.org\/10.3390\/e23070857","relation":{"has-preprint":[{"id-type":"doi","id":"10.20944\/preprints202105.0401.v1","asserted-by":"object"}]},"ISSN":["1099-4300"],"issn-type":[{"value":"1099-4300","type":"electronic"}],"subject":[],"published":{"date-parts":[[2021,7,3]]}}}