Inspiration

Choosing an appropriate emoji for tweets or messages can be challenging as various emojis convey the same emotion. For the sponsor challenge, where the task is to predict emojis based on the content of tweets, I first thought that it was a typical classification problem. However, upon examining the data, I noticed that there were many instances where the same text had been mapped to several emojis. This suggested that emoji selection is subjective and contextual. It was a fundamental observation that made me realize that emoji prediction is not a conventional one-to-one classification problem. Consequently, this made me think about developing a system that would generate several emojis relevant to the input text.

What it does

Emoji prediction is typically treated as a single-label classification problem, where a model is expected to predict one “correct” emoji for a given piece of text. However, in practice, the same tweet can correspond to multiple valid emojis depending on context and interpretation. This makes strict prediction both limiting and often misleading. To address this, my system shifts from exact prediction to meaningful recommendation. We use a fine-tuned BERTweet model to generate probability-based predictions and return the top 3 most plausible emojis instead of a single output. These predictions are further adjusted using simple, interpretable signals such as sentiment consistency and class frequency to improve practical relevance. The final system provides users with multiple emoji suggestions along with their confidence, making it easier to select emojis that best match their intent.

How we built it

The purpose of my project is to develop and analyze emoji prediction models from tweets text and then use the best one for an emoji recommendation system. To begin with, I used baseline methods like TF-IDF + Logistic Regression & TF-IDF + Random Forest, and later I developed a finetuned BERTweet model which would provide better understanding of informal text contexts. While experimenting, I found out that a lot of predictions, claimed to be wrong, are semantically close enough to the correct emoji labels. In order to solve the problem, a system was developed to output the 3 best predictions. Besides that, I implemented a basic rating scheme for emoji predictions that considers sentiment consistency and emoji class distribution.

Challenges we ran into

The biggest challenge was that the problem itself is ambiguous. The dataset assigns only one emoji per tweet, even though multiple emojis can be equally valid. This made traditional evaluation metrics limiting and sometimes misleading. Another challenge was class imbalance, where certain emojis dominated the dataset, causing models to bias toward frequent classes. Handling short, noisy, and informal tweet text while maintaining meaningful predictions also required careful preprocessing and model selection.

Accomplishments that we're proud of

The reason why I am proud is not only because I made a model; rather, I discovered something about the problem itself which was a limiting factor for its solving. In particular, I showed that top-3 accuracy is a much better measure, and implemented the model, which is much closer to the actual use of emojis. Additionally, I made an end-to-end solution, from analysis and creating to a website.

What we learned

This project has helped me learn that enhancing performance may not necessarily mean having more complicated models. In many cases, the essence lies in understanding the problem at hand. Identifying ambiguity and adjusting evaluation techniques and designs have had more of an effect than maximizing accuracy alone. In addition, I have received practical knowledge on transformers and how to integrate machine learning with design considerations.

What's next for SmartEmoji

  1. More multi-label setup
  2. Integrate real-time context
  3. Extend sentiment analysis to advanced models
  4. Help in emoji selection in real-time based on context while typing

Built With

  • bertweet
  • googlecolab
  • jupyternotebook
  • logisticsregression
  • python
  • randomforest
  • streamlit
Share this project:

Updates