A Comparison of Contextual and Non-Contextual Preference Ranking for Set Addition Problems

Timo Bertram, Johannes Fürnkranz, Martin MüllerarXiv 2021

TL;DR

This paper tackles the challenge of recommending items to add to an existing set, where the value of an item depends heavily on the context of the set. They propose and compare two Siamese neural network approaches, a "twin" network and a "triplet" network, for learning these contextual preferences. Their findings show that the triplet network, which explicitly models the context, significantly outperforms the twin network and previous methods on the complex task of Magic: The Gathering deck building.

What Problem Does This Paper Address?

Imagine you're building a deck for a card game, or curating a stock portfolio. The "best" card or stock to add isn't always obvious. It depends on what you already have. A mediocre goalkeeper might be a great addition to a team of star forwards, but a terrible one if you already have a solid goalie. Similarly, a high-risk stock might fit well into a diversified portfolio but be a disaster if your existing holdings are already volatile. This is the "set addition problem": evaluating the best item to add to an existing set, where the value is contextual. Traditional preference learning often treats items in isolation or compares the final resulting sets, failing to capture this crucial contextual dependency.

Methods

The authors propose two Siamese neural network architectures to address this problem:

  • RankNet (Twin Network): This approach treats the problem as learning unconditional preferences between the resulting sets after an addition. It uses a Siamese network where one branch encodes the existing set plus a candidate item, and the other branch encodes the existing set plus a different candidate. The network learns to predict which of these two resulting sets is preferable. This implicitly models context by comparing the final outcomes.
  • CPR (Triplet Network): This novel approach directly models contextual preferences. It uses a triplet Siamese network where an "anchor" represents the context (the existing set), a "positive" example is a preferred addition, and a "negative" example is a less preferred addition. The network is trained with a triplet loss to ensure the preferred addition is "closer" to the context in the embedding space than the less preferred one. This explicitly models the context as a separate input.

Both networks embed inputs into a shared, D-dimensional space using fully-connected layers with ELU activations and a tanh output layer.

Datasets

The primary dataset used for training and evaluation is the DraftSim dataset. This dataset contains 107,949 human drafts from the collectible card game Magic: The Gathering (MTG). Each draft consists of 24 packs of 15 cards. The data was prepared by creating training examples from each card pick, pairing the chosen card with every other card available in the same pack. This resulted in over 217 million training examples. The dataset was split 80/20 for training and testing, following previous work for direct comparison.

Key Insights and Ideas

  • Context is King: The core insight is that for set addition problems, the context (the existing set) is paramount. Simply evaluating items in isolation or comparing final set outcomes is insufficient.
  • Explicit Context Modeling Wins: The triplet network (CPR), which explicitly models the context as an anchor, significantly outperforms the twin network (RankNet) that implicitly models context by comparing final set unions. This suggests that directly feeding context into the preference learning mechanism is more effective.
  • Siamese Networks are Versatile: The paper demonstrates the adaptability of Siamese networks beyond their typical use cases (like image similarity) to complex preference learning tasks involving sets and context.
  • MTG Drafting as a Benchmark: Using MTG deck building as a real-world benchmark highlights the complexity of contextual preference learning and provides a robust testbed for evaluating these methods.

Key Results

  • CPR Outperforms RankNet: The triplet network (CPR) achieved significantly higher performance than the twin network (RankNet).
  • State-of-the-Art Performance: Both CPR and RankNet significantly outperformed previous methods on the DraftSim dataset. Specifically, the 256-dimensional CPR agent achieved a Mean Testing Top-One Accuracy (MTTA) of 83.78% and a Mean Testing Pick Distance (MTPD) of 0.25. This represents an accuracy increase of over 56% and a pick distance decrease of over 83% compared to the best previous method (NNetBot).
  • Robustness Across Draft: The CPR agent maintained stable performance throughout the drafting process, unlike other methods that showed U-shaped accuracy curves.
  • Correlation with Context: A strong correlation (Kendall's tau = 0.74) was found between the first-pick rate of cards and their distance to an empty anchor, reinforcing the importance of context.

Limitations and Future Work

  • Domain Specificity: While successful in MTG, the authors acknowledge the need to test the generality of their framework on other domains where preference learning with context is relevant.
  • Evaluating Whole Sets: The current work focuses on adding single items. Future work could explore evaluating entire sets of extensions at once.
  • Game Playing Applications: The potential to extend this method to real-time game playing, where game states can be represented as sets, is a promising avenue.
  • Beyond Human Data: The current models are trained on human expert data. For domains with automatic evaluation functions, generating datasets via self-play (similar to TD-Gammon or AlphaZero) could further improve performance and generalizability.

Summary updated

Abstract

In this paper, we study the problem of evaluating the addition of elements to a set. This problem is difficult, because it can, in the general case, not be reduced to unconditional preferences between the choices. Therefore, we model preferences based on the context of the decision. We discuss and compare two different Siamese network architectures for this task: a twin network that compares the two sets resulting after the addition, and a triplet network that models the contribution of each candidate to the existing set. We evaluate the two settings on a real-world task; learning human card preferences for deck building in the collectible card game Magic: The Gathering. We show that the triplet approach achieves a better result than the twin network and that both outperform previous results on this task.
BibTeX
@misc{bertram2021comparison,
  author = {Timo Bertram and Johannes Fürnkranz and Martin Müller},
  title = {{A Comparison of Contextual and Non-Contextual Preference Ranking for Set Addition Problems}},
  year = {2021},
  eprint = {2107.04438},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2107.04438},
}

Loading related content...

Figure