Set2Box: Similarity Preserving Representation Learning for Sets

Geon Lee, Chanyoung Park, Kijung Shin

TL;DR

This paper introduces Set2Box, a novel method for learning compact representations of sets that accurately preserve their similarity. By modeling sets as "boxes" in a latent space, Set2Box captures set overlaps effectively, enabling versatile similarity estimation. An advanced version, Set2Box+, further enhances conciseness and accuracy through a unique box quantization technique.

What Problem Does This Paper Address?

In many real-world applications, data is naturally represented as sets. Examples include documents as sets of keywords, customers as sets of purchased items, or social networks as sets of connections. Measuring the similarity between these sets is crucial for tasks like plagiarism detection, recommendation systems, and graph compression. However, as the number and size of these sets grow, traditional methods for computing set similarity become computationally expensive and require significant storage. Existing solutions like hashing and sketching offer some improvements but often lack the flexibility to handle various similarity measures or struggle with large sets. This paper aims to bridge this gap by developing a learning-based approach that generates compact, versatile, and accurate set representations.

Methods

The core innovation of Set2Box lies in representing each set as a box (a hyper-rectangle) in a latent space. This geometric representation is designed to capture set overlaps and relationships. Specifically:

  • Box Representation: A box is defined by its center and offset, allowing it to represent a region in the latent space. The volume of the box is made proportional to the size of the set it represents, and the volume of the intersection of two boxes is made proportional to the size of the intersection of the corresponding sets.
  • Objective Function: Set2Box uses a novel objective function that preserves not just pairwise set relationships but also higher-order (triple-wise) relationships. This is achieved by minimizing the difference between ratios of set cardinalities (e.g., intersection sizes) and the corresponding ratios of box volumes. This approach is designed to be independent of any specific similarity measure.
  • Set-Context Pooling (SCP): To derive the box's center and offset from the entities within a set, Set2Box employs a permutation-invariant pooling mechanism called SCP. This method uses attention to highlight important entities and considers the context of each set.
  • Set2Box+ (Box Quantization): To further improve conciseness, Set2Box+ introduces an end-to-end box quantization scheme. This involves dividing the latent space into subspaces and learning "key boxes" within each. A set's representation is then compressed into a discrete code indicating which key boxes best represent its sub-boxes. This is a departure from standard product quantization, as it explicitly considers the geometric properties of boxes.
  • Joint Training: Set2Box+ also incorporates a joint training strategy where both the original box representations and their quantized (reconstructed) versions are trained simultaneously. This helps stabilize optimization and improve the accuracy of the quantized representations.

Datasets

The paper evaluates its methods on eight real-world datasets:

  • Yelp (YP)
  • Amazon (AM)
  • Netflix (NF)
  • Gplus (GP)
  • Twitter (TW)
  • MovieLens 1M (ML1)
  • MovieLens 10M (ML10)
  • MovieLens 20M (ML20)

These datasets represent various domains, including user ratings, social networks, and movie recommendations, with varying sizes and characteristics of sets and entities.

Key Insights and Ideas

  • Boxes as a Natural Representation for Sets: The geometric nature of boxes, with their inherent properties like volume and intersection, provides a powerful and intuitive way to model set relationships, particularly overlaps.
  • Beyond Pairwise Similarity: Capturing higher-order relationships (triples of sets) is crucial for a more robust understanding of set structures and leads to better generalization.
  • Versatility through Geometric Properties: By focusing on preserving fundamental set relationships (like intersection sizes) through box geometry, Set2Box avoids being tied to a specific similarity metric, making it applicable to various measures.
  • Quantization that Understands Geometry: The proposed box quantization method is a significant advancement over standard vector quantization. By considering the overlap ratio (BOR) between sub-boxes and key boxes, it preserves geometric relationships, leading to more accurate and compact representations.
  • Joint Training for Stability and Accuracy: Training both original and reconstructed boxes together not only improves the accuracy of the quantized representations but also stabilizes the learning process, especially for the quantization step.

Key Results

  • Accuracy: Set2Box+ achieves significantly lower Mean Squared Error (MSE) for set similarity estimation compared to baselines like Set2Bin, Set2Vec, Set2Vec+, and Set2Box. For instance, it shows up to a 40.8x smaller estimation error on the Jaccard Index for the Twitter dataset.
  • Conciseness: Set2Box+ offers substantial compression. It requires 60% fewer bits to encode sets while achieving comparable or better accuracy. In some cases, it yields up to 96.8x more concise representations than Set2Bin for similar accuracy.
  • Versatility: Set2Box and Set2Box+ can estimate multiple similarity measures (Overlap Coefficient, Cosine Similarity, Jaccard Index, Dice Index) from a single representation, unlike methods like Set2Vec which are trained for specific metrics.
  • Speed: Set2Box and Set2Box+ enable constant-time estimation of set similarities once the representations are learned, regardless of the original set sizes.
  • Effectiveness of Components: Ablation studies show that both the box quantization scheme and the joint training strategy in Set2Box+ contribute significantly to its improved accuracy and conciseness.

Limitations and Future Work

  • Computational Cost of Training: While inference is fast, training Set2Box and Set2Box+ can still be computationally intensive, especially on very large datasets.
  • Parameter Sensitivity: The performance of Set2Box+ can be influenced by parameters like the number of subspaces (D) and key boxes (K), although the paper notes that accuracy is generally robust to the number of training samples.
  • Future Work: The paper suggests exploring more advanced quantization techniques and investigating the application of Set2Box to more complex set-based tasks. The authors also highlight the potential for further research into the geometric properties of boxes for set representation.

Summary updated

BibTeX
@inproceedings{lee2022set,
  author = {Geon Lee and Chanyoung Park and Kijung Shin},
  title = {{Set2Box: Similarity Preserving Representation Learning for Sets}},
  booktitle = {ICDM},
  year = {2022},
  doi = {10.1109/icdm54844.2022.00125},
}
Figure