The disclosed embodiments provide a system for processing data. During operation, the system obtains a set of topics associated with a set of content items. Next, the system obtains a first set of attributes associated with a first topic in the set of topics and a second set of attributes associated with a second topic.