1. A computer-implemented method performed by a data processing apparatus, the method comprising: generating, for each of a plurality of search queries, a selection vector for the search query, each selection vector including a plurality of vector elements, each vector element corresponding to a unique image, and the value of each vector element being a probability that the vector element's corresponding unique image will be selected in response to the unique image being presented as a search result for the search query; selecting a first search query and a second search query from the plurality of search queries; and determining, from the selection vectors for the first and second search queries, a similarity measure that is a measurement of the similarity of the first search query to the second search query.