Skip to main content

MLP-Shaker: Improving MLP Classifier with Dynamic Sparsity

MLP-Shaker is a model that adapts to the image classification task at hand, learning all that it needs from the data itself. Complex convolutional neural networks and vision transformers that dominate the image classification field rely on inductive biases for vision tasks. Meanwhile, our architecture starts with a fully connected multi-layer perceptron (MLP) – called MLP-Mixer – and prunes the unneeded weights. Pruning weights is important to reduce classification times and improves the model's generalization to various images. We decreased weight density using Dynamic Sparsity – a method introduced by Dr. Wang. In the end, our MLP-Shaker drastically reduces inference time by 80%, achieves 93% weight reduction, and maintains a similar accuracy on the Tiny ImageNet dataset compared to the dense MLP-Mixer. To showcase this new model, we made a web application that leverages a messaging queue architecture. The site can serve 50+ concurrent users with a median response time of 2.7 seconds per user.

Team Members

Kush Desai 

Akarsh Kumar 

Rishabh Parekh 

Viraj Parikh 

Malav Shah 

Sahil Vaidya

Semester