Projects

Transformer Language Modeling

October 2024

Team: Emmanuel Rajapandian

Resources: [Code]

Summary: In this project, I implemented a Transformer language model from scratch using Python and PyTorch, focusing on understanding the mechanics of neural models for language tasks. The primary dataset used was the text8 collection, derived from Wikipedia, which was split into sequences for training. In Part 1, I built a simplified Transformer encoder to predict character occurrences in a sequence, utilizing self-attention mechanisms without relying on pre-built components like nn.TransformerEncoder. This involved creating queries, keys, and values matrices to compute attention scores and integrating positional encodings to enhance model accuracy. For Part 2, I extended this work to develop a Transformer-based language model capable of predicting the next character in a sequence. This required implementing causal masking to prevent future information leakage during prediction. I structured the network to process chunks of characters and optimized it to achieve a perplexity score of 6.63 against the benchmark of perplexity score of 7. Throughout the project, I focused on training stability and accuracy, ensuring my model adhered to proper probability distributions for language modeling tasks. This assignment provided deep insights into Transformer architectures and their application in natural language processing, helping me learn the practical skills for building advanced machine learning systems.

My contribution: Sole contributor.




Feedforward Neural Networks, Word Embeddings and Generalization

September 2024

Team: Emmanuel Rajapandian

Resources: [Code]

Summary: In this project, I explored training neural networks over text using PyTorch to enhance sentiment classification from a previous project. Initially, I tackled function optimization by implementing the gradient of a quadratic function and optimizing it using stochastic gradient descent (SGD). This involved calculating the best step size to reach the optimum efficiently. Moving on, the main task was to developed a deep averaging network for sentiment analysis using pretrained GloVe word embeddings. By averaging word vectors and employing a feedforward neural network, I experimented with various configurations, such as layer sizes and embedding dimensions, to optimize performance. Additionally, using batching the input data was handled efficiently, ensuring that sentences of varying lengths were padded appropriately. The project achieved an accuracy of 77% on the development set within a reasonable training time. Finally, I addressed data with misspellings by exploring spelling correction and prefix embeddings to improve model robustness against typographical errors. This comprehensive approach provided valuable insights into neural network training and optimization in text classification tasks.

My contribution: Sole contributor.




Linear Sentiment Classification

August 2024

Team: Emmanuel Rajapandian

Resources: [Code]

Summary: In this project, I leveraged Python 3.5+ along with libraries such as numpy, nltk, and spaCy to perform binary sentiment classification on a dataset of movie review snippets from Rotten Tomatoes. The dataset consisted of sentences labeled as either positive or negative, with neutral sentiments excluded. Followed the standard machine learning workflow by reading in the data, training classifiers, and testing their performance on divided datasets, including training, development, and blind test sets. Specifically used a Naive Bayes classifier for this task and employed the CountVectorizer from sklearn to convert text data into numerical vectors, which allowed to train the classifier effectively. After splitting the data into training and testing sets, I trained the classifier on the training data and evaluated its accuracy on the test set. This process provided valuable insights into handling text data and applying machine learning algorithms to real-world problems, enhancing my ability to design features and train classifiers for text analysis tasks.

My contribution: Sole contributor.




Autonomous RL-DL Agent for Realtime multiplayer SuperTuxKart Ice-Hockey

April 2024

Team: Emmanuel Rajapandian, Jean Del Rosario Pegeuro, Shubham Gupta

Resources: [Technical report]

Summary: We design an automated agent to play SuperTuxKart Ice Hockey which is a game featuring a vast state space, a diverse action space, and sparse rewards, presenting a highly formidable challenge. The objective of the agent is to maximize goal scoring in any difficulty and achieve victory in the match if possible. Our approach involves using imitation learning, combining both Behavioural Cloning and DAgger, to mimic other agents and learn the optimal strategy for playing the game. We employ REINFORCE on top of our best imitation agent to adjust the variables of the agent's policy in an approach that increases the likelihood of actions that result in higher rewards 1.e., an effective goal-scoring strategy. Our system is designed to exploit potential simplifications in this complex environment, with the ultimate aim of creating proficient players. We train a neural net model, inspired by the principles of imitation learning, to support a controller network to play ice hockey. Our system is state-based, focusing on the state of the game rather than the visual input from the player's field of view.

My contribution: Generated training dataset of over 300 episodes of agent gameplay for imitation learning, coded and trained multi-layer perceptron model using imitation learning combining Behavioural modelling and DAgger, wrote major sections of project report.




Image based vision system for a racing simulator - SuperTuxKart

February 2024

Team: Emmanuel Rajapandian

Summary: Developed an image-based vision system for a racing simulator, SuperTuxKart by leveraging deep learning using Python. The initial phase involved implementing a CNN classifier using PyTorch. Employing convolutional layers, ensured effective feature extraction for classification tasks. Through hyperparameter tuning and employing various techniques such as input normalization, residual blocks, dropout, and data augmentation, the model achieved an accuracy of 94/100 on validation data. Transitioning from image classification to dense prediction, the CNN was converted to a Fully Convoluional Network (FCN) for semantic segmentation. This FCN is designed to handle arbitrary input resolutions and outputs predictions per pixel. Employing skip and residual connections ensured accurate object detection and segmentation. Expanding the segmentation network, it was repurposed into point-based object detection. Predicting dense heatmaps of object centers enabled efficient object localization. Implementing peak extraction algorithms facilitated the identification of relevant objects such as projectiles, karts, bombs, nitro within the scene, further enhancing the system's understanding of the environment. Beyond vision processing, a low-level controller responsible for steering the racing vehicle towards a specified aim point was integrated with the image-based predictions along with control actions, to ensure smooth and efficient navigation across diverse racing tracks. Lastly, the planner model was trained to predict aim points directly from input images. Overall, the sequential culmination of these components resulted in a high-performance vision-based system for racing simulation. This project helped me learn lot about systems that showcase the superiority of deep learning in enhancing virtual game environments. Owing to UT Austin Honor Code, the model files will not be made public.

My contribution: Sole contributor.




RAG Chatbot using Falcon 7B LLM using Langchain

January 2024

Team: Emmanuel Rajapandian

Resources: [Code]

Summary: Leveraged the capabilities of LangChain, 8-bit quantized Falcon-7B LLM, Chroma DB to create a sophisticated chatbot developed and equipped with the capacity to learn from the external world through Retrieval Augmented Generation (RAG). Speed-cubing has been a part of my hobbies for the past 10 years and I decided to build the chatbot by extracting data from the official WCA website, it guidelines, regulations and other data. This dataset forms the bedrock, enabling the chatbot to respond adeptly to queries regarding the queries related to speed-cubing, its rules and guidelines. Built a functioning chatbot (notebook version for now) and RAG pipeline that can hold a conversation and provide informative responses based on the WCA data.The exploration promises a deep dive into the construction of an intelligent conversational agent.

My contribution: Sole contributor.