Dhruv Toshniwal

Simulating a Video Recommendation System: A Responsible AI Case

May 2023

Simulating a Video Recommendation System: A Responsible AI Case

Introduction

In the digital era, video-sharing platforms like YouTube, TikTok, and Vimeo have transformed content consumption. This blog post explores a Python simulation of a video recommendation system, developed as part of a Responsible AI course collaboration between Boston University, Tel Aviv University, the Technion, and Bocconi University.

Project Background

The project was a case study within Boston University's Responsible AI course, which focuses on the ethical and responsible use of AI technologies. The simulation aimed to create a video recommendation system that emphasizes "fairness, transparency, and overall responsibility in AI applications."

The Python Simulation

The simulation began by setting up:

  • Potential video types
  • Challenges
  • Uploaders
  • Users

Key functions included:

  • initialize_user_profiles(): Assigns each user an empty list of watched videos
  • video_generator(): Populates the platform with videos, creating unique titles and attributes

Simulating User Activity

The core of the simulation was a loop mimicking user activity over several days. The process_chunk() function simulated user interactions by:

  • Randomly selecting users
  • Deciding whether to watch recommended videos or choose new ones

Video Recommendation Generation

The recommendation system used:

  • TF-IDF vectorization to convert video titles to vectors
  • Cosine similarity to identify similar videos
  • get_top_recommendations() function to generate personalized recommendations

Recommendations were ranked using an engagement score considering:

  • Likes
  • Dislikes
  • Shares
  • Comments
  • Total watch time

Conclusions & Lessons Learned

The simulation provided insights into recommendation system mechanics while highlighting responsible AI principles. It demonstrated the importance of:

  • Transparency in recommendation generation
  • Fair content representation
  • Ethical considerations in AI development

Additional Resources