Ali Hassani

Computer Science Graduate Student
at University of Oregon


I am a first year computer science graduate student at University of Oregon, and am advised by Prof. . I work at SHI Lab @ UO as a graduate researcher.

My research mostly involves computer vision and language processing. My research interests are transformer-based models, vision transformers and self-supervision.

During my undergrad years, I did research under the supervision of Prof. at the Mahani Mathematical Research Center.


Research Experience

Teaching Experience



Escaping the Big Data Paradigm with Compact Transformers

*[1], *[1], [1], [1], [1,2], and [1,2,3].
*Equal contribution.
In association with SHI Lab @ University of Oregon[1] and UIUC[2], and Picsart AI Research (PAIR)[3].

With the rise of Transformers as the standard for language processing, and their advancements in computer vi-sion, along with their unprecedented size and amounts of training data, many have come to believe that they are not suitable for small sets of data. This trend leads to great concerns, including but not limited to: limited availability of data in certain scientific domains and the exclusion ofthose with limited resource from research in the field. In this paper, we dispel the myth that transformers are “data-hungry” and therefore can only be applied to large sets of data. We show for the first time that with the right size and tokenization, transformers can perform head-to-head with state-of-the-art CNNs on small datasets. Our model eliminates the requirement for class token and positional embed-dings through a novel sequence pooling strategy and the use of convolutions. We show that compared to CNNs, our compact transformers have fewer parameters and MACs,while obtaining similar accuracies. Our method is flexible in terms of model size, and can have as little as 0.28M parameters and achieve reasonable results. It can reach an ac-curacy of 94.72% when training from scratch on CIFAR-10,which is comparable with modern CNN based approaches,and a significant improvement over previous Transformer based models. Our simple and compact design democratizes transformers by making them accessible to those equipped with basic computing resources and/or dealing with important small datasets.

arXiv GitHub