berkeley-reclab / RecLab

MIT License
64 stars 7 forks source link

Syncing fork with main: Sensitization vs Boredom Model #225

Closed ameliakovacs closed 2 years ago

ameliakovacs commented 2 years ago

In this pull request, I built upon topics.py and registry.py to incorporate new boredom functionality inspired by the paper Just in Time Recommendations: Modeling the Dynamics of Boredom in Activity Streams (Kapoor et al., 2015): https://doi.org/10.1145/2684822.2685306. The main idea is that users switch between states of boredom (low engagement) and sensitization (high engagement) for the items they are presented with independently of the recommendation sequence, representing mood/external fluctuations in preferences. This new functionality builds off of the satiation addition to topics.py, with an added num_users x num_topics array to contain the current state of each user (0 = sensitized, 1 = bored).

I added a new parameter to topics.py, "switch_probability". The first value in the tuple represents the probability a user currently in a sensitized state switches to a state of boredom (conditional P(B | S)). Similarly, the second index represents P(S | B). The user's state for all topics changes every time they rate an item, regardless of the item recommended. The state of the user determines their satiation decay, which can now be passed as a tuple. The first index represents the decay when the user is sensitized, and the second index represents the decay when they are bored.

Below is a graph showing how the state changes impact a user's ratings and satiation levels for topic 0. The user was recommended topic 0 50 times, topic 1 25 times, then topic 0 again 25 times.

image

Here is a graph comparing the three different models of boredom currently in topics.py: the Bored Penalty model (the rating is penalized by a static amount once they see the item more than a threshold number of times, penalty and decay are static), the Satiation model (the rating is penalized as a function of the user's satiation, penalty is dynamic and decay is static), and the Sensitization vs Boredom model (both penalty and decay are dynamic).

image

I also added a new named environment dictionary to registry.py, 'topics-sensitization-v1' to make use of this functionality.