Comparatives, Quantifiers, Proportions: a Multi-Task Model for the Learning of Quantities from Vision

Sandro Pezzelle, Ionut-Teodor Sorodoc, Raffaella Bernardi

Abstract

Humans possess an "Approximate Number System" (ANS) that allows for the estimation of ratios and proportions without explicit counting. This paper explores whether artificial neural networks can replicate this ability through Multi-Task Learning (MTL). By training a model on a hierarchy of tasks—ranging from simple comparisons to complex proportional estimations—the researchers demonstrate that learning to distinguish "more" from "less" provides a vital foundation for higher-level proportional reasoning. Conversely, the study finds that incorporating absolute counting tasks can actually degrade a model's ability to understand relative proportions, suggesting a computational distinction between counting and holistic estimation.

Introduction

In traditional computer vision, quantity is typically treated as a counting problem. However, human linguistic expressions of quantity often involve nuances that go beyond integers, such as comparatives (more than), vague quantifiers (most, some), and proportions (20%). We can instantly recognize that a stadium is "mostly full" without knowing the exact number of spectators.

This research addresses the gap between symbolic counting and holistic quantity estimation. The authors investigate whether these tasks are interdependent and if a single model can learn them more effectively by treating them as a hierarchy of increasing complexity.

Methods: A Hierarchical Approach

The proposed Multi-Task Learning (MTL) architecture is designed to reflect the conjectured cognitive complexity of quantification. The model utilizes an Inception v3 backbone to extract visual features, which then feed into a branching hierarchical structure.

The hierarchical multi-task architecture, showing how lower-level comparison tasks inform higher-level quantification and proportion tasks.

The Task Hierarchy

  1. Comparison (setComp): The base level determines if there are more, fewer, or an equal number of target objects compared to non-targets.
  2. Quantification (vagueQ): The middle level predicts the most likely vague quantifier from a set of nine (e.g., "few," "many," "almost all").
  3. Proportion (propTarg): The highest level estimates the exact proportion across 17 pre-defined ratios ranging from 0% to 100%.

Information sharing is central to this design: higher-level tasks build directly upon the representations learned by lower-level tasks. The model is trained end-to-end, using cross-entropy loss for classification and Pearson’s correlation for the "fuzzy" quantifier task.

Datasets and Experimental Setup

To evaluate the model, the researchers generated a synthetic dataset of 17,000 scenes. Each scene features a mix of "target" objects (animals) and "non-target" objects (artifacts) arranged on a 5x5 grid.

Example synthetic scenes featuring varied object types, sizes, and orientations to ensure the model learns quantity rather than visual patterns.

To ensure the model learned abstract quantity rather than specific visual cues, objects were randomly selected from 100 animal and 145 artifact instances, then resized and flipped. The data was partitioned into 70% training, 10% validation, and 20% testing, including a specific "unseen" test set to evaluate generalization to new object combinations.

Key Results and Insights

The Power of Multi-Task Learning

The MTL approach significantly outperformed single-task baselines. In the most challenging task—proportional estimation—the MTL model achieved 91.8% accuracy, whereas the best single-task version reached only 65.9%. Furthermore, the MTL model demonstrated robust generalization; when presented with unseen object combinations, it maintained 53.9% accuracy, while single-task models plummeted to near-chance levels (~6%).

The "Counting Interference" Effect

A pivotal finding was the impact of absolute counting (nTarg). When the researchers added a task to count the exact number of individuals to the MTL loop, performance on proportions degraded. This suggests that estimating ratios and counting individuals are computationally distinct—and potentially conflicting—operations, mirroring observations in human psychology.

Abstract Internal Representations

PCA analysis revealed that the model's internal layers naturally organized scenes into a "clock-like" structure based on proportion. Even without explicit instruction on the numerical relationships between classes, the model learned to place 10% closer to 20% than to 80%, indicating a learned scale of magnitude.

Conclusion and Future Work

This study confirms that quantification is a "ladder" of complexity. Learning simple comparisons provides the representational foundation necessary for understanding proportions. While successful on synthetic data, future work is required to test these models on real-world images where objects may overlap or be obscured. Additionally, grounding these visual representations in broader natural language contexts remains a promising avenue for creating AI that understands quantity as intuitively as humans do.

Summary updated

BibTeX
@inproceedings{pezzelle2018comparatives,
  author = {Sandro Pezzelle and Ionut-Teodor Sorodoc and Raffaella Bernardi},
  title = {{Comparatives, Quantifiers, Proportions: a Multi-Task Model for the Learning of Quantities from Vision}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2018},
  doi = {10.18653/v1/n18-1039},
}
Figure