Artificial Intelligence/Search/Recommender Systems/Boltzmann Machines
What is a recommender system? 
There is a bunch of users who may order (read, view, buy) bunch of items. Users give grades (or ratings) to items. Our task is to predict, as precise as possible, what grade a user would give to a new item, based on his and other user's previous ratings, in order to recommend items which he or she may like.
Most recommender system have following features:
- There are much more users than items
- All or almost all user rated only small fraction of items
- There is a small number of possible grades (often 1,2,3,4,5).
- There is a wide variance in number of rated items.
As Netflix Prize contest showed, there is no approach which is superior to others. For optimal results, several approaches should be combined together. One of them, Restricted Boltzmann Machines (RBM), is described here.
- U - set of users
- I - set of items
- G - set of grades
- - set of users who rated the item .
- - set of items rated by user .
- - grade given by user to item .
- - prediction for grade given by user to item .
- T - training set. Each member of T is a triplet .
Before describing RBM model, we briefly describe SVD model (Singular Value Decomposition) which is maybe the single best approach.
Under SVD, each user is represented by a feature vector , where N is the dimensionality of the model. Similarly, each item is represented by a feature vector .
The predicted grade is product of two vectors:
Here x's and y's are parameters to be discovered by the model to fit the training set.
The model is intuitive, since features represent various qualities of the items. For example, when recommending movies, some feature may be highly positive for romantic movies, zero or negative for movies without any romantic appeal, and highly negative for cynical movies which ridicule romantics. The corresponding feature in user feature vectors will be negative for users who hate romantics, and positive in opposite case.
The simplest way to learn the model is to minimize the total error . We can do it by gradient descend, cyclically presenting data from the training set, and for each changing parameters in the direction opposite to gradient of E:
Here L is a learning parameter, which sets the overall speed of gradient descent.
However, for users and movies with few data, this approach tends to construct huge feature vectors, because this fits the data better. To prohibit this, and to utilize the knowledge that big feature values are improbable, relaxation term should be added:
For more detailed explanation of SVD, see Simon Funk's "Netflix Update: Try This at Home" . However, his algorithm adds one feature at a time, which later was found not as good as learning all features simultaneously.
Now we get to the Boltzmann Machine model.
As a first step, suppose that instead of grade, we can predict probability for a specific grade:
- probability that .
We can do it with approach similar to one described in the previous section:
(Why not ? Because usually there are much more users than items, therefore 's would contain huge number of parameters.)
But we can do better than this. Firstly, we can use the fact that the total probability for all grades is 1:
Secondly, since probabilities are always from 0 to 1, they are better described not by vector product itself, but by logistic function of it:
where logistic function f is defined as:
Redefining as weights W and as hidden units, and requesting that all x's will be 0 or 1, we get:
which is the Boltzmann Machine model.