Be Precise or Fuzzy: Learning the Meaning of Cardinals and Quantifiers from Vision

Sandro Pezzelle, Marco Marelli, Raffaella Bernardi

TL;DR

This paper proposes two computational models to learn the distinct meanings of exact number words (cardinals) and fuzzy quantity words (quantifiers) from visual scenes. By leveraging different similarity measures (dot product for cardinals, cosine for quantifiers), the models successfully learn to map linguistic expressions to visual representations, paving the way for more nuanced AI understanding of quantity.

What Problem Does This Paper Address?

Humans use two primary ways to express quantity: precise cardinal numbers (like "one," "two," "three") and fuzzy quantifiers (like "few," "most," "all"). While both relate to quantity, they are processed differently by the human brain and language acquisition systems. Children, for instance, grasp quantifiers before fully mastering exact counting. This distinction suggests that computational models aiming to understand quantity in images need to account for these different mechanisms. Existing approaches often treat all quantity expressions similarly or focus on object detection without explicitly modeling the semantic difference between precise and fuzzy quantities. This paper aims to bridge this gap by developing models that learn the distinct "meaning representations" of cardinals and quantifiers from visual input.

Methods

The core of this work lies in proposing two computational models that learn the meaning of cardinals (Cs) and quantifiers (Qs) through a cross-modal mapping from linguistic representations to visual scenes.

  • Similarity Measures: The models leverage two geometric similarity measures:
  • Cosine Similarity: This measure captures the orientation similarity between vectors, making it suitable for fuzzy quantities where the proportion or relative amount matters. For example, "most" dogs in a scene would have a high cosine similarity.
  • Dot Product: This measure incorporates both orientation and magnitude, making it ideal for exact cardinals where the absolute number is key. For instance, "two" dogs would be represented by a dot product reflecting that specific count.
  • Cross-Modal Mapping: The models learn by mapping linguistic representations (word embeddings for objects like "dog") to visual scenarios. Each cardinal or quantifier is learned as a separate function that maps the linguistic input to its corresponding visual representations in training data. This process is inspired by how children might learn these concepts.
  • Model Architectures: Three models were experimented with:
  • Linear Model: A simple linear mapping.
  • Cosine Neural Network (nn-cos): A neural network designed to maximize cosine similarity between linguistic and visual representations.
  • Dot-Product Neural Network (nn-dot): A neural network designed to approximate the dot product between linguistic and visual representations.

Datasets

The authors created synthetic visual scenes to overcome limitations of existing datasets.

  • Synthetic Scenes: These scenes are constructed from images of individual objects (sourced from ImageNet) arranged in a "patchwork" style. This approach allows for controlled variability in the number of target objects and distractors, avoiding object localization issues and enabling the creation of balanced datasets for different quantity expressions.
  • Training and Testing Splits: The dataset was split into a training set (3008 scenarios) and a testing set (1504 scenarios). The splits were designed to maintain balance and avoid biasing the learning of specific quantifiers or cardinals.
  • Quantifiers and Cardinals Studied:
    • Quantifiers: "no," "few," "most," and "all" (defined by percentage ranges: 0%, 1-49%, 51-99%, 100%).
  • Cardinals: "one," "two," "three," and "four" (chosen to align with typical child acquisition stages).

Key Insights and Ideas

  • Distinct Mechanisms for Quantity: The paper strongly supports the hypothesis that cardinals and quantifiers are learned and represented differently, requiring distinct computational approaches.
  • Cosine for Fuzzy, Dot Product for Precise: The choice of similarity measure is crucial. Cosine similarity effectively captures the "fuzzy" nature of quantifiers like "few" and "most," while dot product excels at representing the exact counts of cardinals.
  • "Plausible Errors" as Evidence: The models exhibit "plausible errors" (e.g., confusing "few" with "no," or "three" with "four"), which mirrors human cognitive biases and suggests the models are learning an ordered scale of quantity, not just arbitrary classifications.
  • Language-to-Vision Mapping: The cross-modal mapping approach provides a principled way to learn the semantic meaning of quantity words by grounding them in visual evidence.

Key Results

  • Model Performance:
    • For quantifiers, the nn-cos model generally outperformed the others, achieving higher mean average precision (mAP) in most cases.
  • For cardinals, the nn-dot model consistently showed superior performance in both mAP and precision at top-2 positions (P2).
  • Quantitative Metrics: Table 2 shows mAP scores for different models and quantity types. For instance, nn-cos achieved an mAP of 0.87 for "no" and 0.68 for "few," while nn-dot achieved 0.61 for "three" and 0.76 for "four."
  • Qualitative Findings: The confusion matrices (Table 3) reveal that the best models tend to confuse quantities that are adjacent on their respective ordered scales, supporting the idea of learned ordered representations.

Limitations and Future Work

  • Synthetic Data: The current study relies on synthetic scenes. The authors acknowledge that future work should investigate these models using real-world images to account for complexities like object occlusion and varied backgrounds.
  • Broader Set of Quantifiers/Cardinals: The study used a limited set of quantifiers and cardinals. Future research could explore a wider range, including those with more complex pragmatic uses or higher cardinal numbers, to test the scalability and robustness of the approach.
  • "Cardinal Functions": Investigating how the models handle "cardinal functions" beyond the subitizing range would be valuable, potentially revealing how they make "plausible errors" for larger numbers.
  • Human-like Errors: Further exploration of the models' errors could provide deeper insights into human cognitive processes for quantity understanding.
  • Modeling Pragmatics: The current models treat quantifiers as lying on a simple ordered scale, ignoring pragmatic nuances. Future work could incorporate these aspects for a more complete model.

Summary updated

BibTeX
@inproceedings{pezzelle2017be,
  author = {Sandro Pezzelle and Marco Marelli and Raffaella Bernardi},
  title = {{Be Precise or Fuzzy: Learning the Meaning of Cardinals and Quantifiers from Vision}},
  booktitle = {EACL},
  year = {2017},
}
Figure