The Effect of Visual Design in Image Classification

Naftali Cohen, Tucker Balch, Manuela VelosoarXiv 2019

In the realm of machine learning, data scientists typically prioritize "raw" numerical data, viewing it as the most objective and information-dense format for model training. However, a recent study by J.P. Morgan’s AI Research team challenges this convention. The researchers explored whether transforming tabular data into visual representations—essentially treating data visualization as a form of feature engineering—could improve classification performance. Their findings suggest that spatial encoding can help models, particularly Convolutional Neural Networks (CNNs), identify complex non-linear relationships that remain obscured in flat numerical tables.

The Problem: The Gap Between Human and Machine Perception

Financial experts and analysts rarely make high-stakes decisions by scanning raw spreadsheets. Instead, they rely on dashboards, heatmaps, and charts to synthesize information. Traditionally, these visualizations are considered "human-only" tools, while models are fed the underlying raw numbers. The authors argue that this approach ignores the potential benefits of spatial dependencies. By converting numbers into images, correlations between features are brought closer together in a two-dimensional space, providing a "pre-processed" structure that algorithms can digest more effectively.

Methodology: Visual Transformation and Downsampling

To test this hypothesis, the researchers compared 16 different classifiers, including Logistic Regression, Random Forests, and CNNs. The methodology centered on three key steps:

  1. Visual Transformation: Numeric vectors were converted into images. For example, a 25-element vector representing a magic square was arranged into a 5x5 grid.
  2. Downsampling: The researchers used the Lanczos filter to reduce these images to various resolutions, ranging from 10x10 down to 2x2 pixels. This was intended to test if "global" structure was more important than granular detail.
  3. Voting Classifier: To ensure robust results, a "hard voting" ensemble aggregated predictions across all 16 models, minimizing the impact of any single algorithm's bias.
Visualizing Magic Squares: (a) Raw numerical data, (b) Valid square at various resolutions, and (c) Invalid square with highlighted discrepancies.

Experimental Datasets

The study utilized two distinct datasets to evaluate the efficacy of visual design:

5x5 Magic Squares

This synthetic dataset consisted of 288 samples. A "valid" magic square is one where the sums of all rows, columns, and diagonals are equal. "Invalid" squares were generated by randomly swapping two numbers. This dataset served as a benchmark for the model's ability to detect spatial dependencies and global logic.

Market-Health Data

This real-world dataset included 669 samples of S&P 500 indicators, such as Value, Positions, Flows, and Momentum. These were visualized as "Spider Charts," a format frequently used by J.P. Morgan analysts to assess market conditions. The task was to classify the data according to "Recommended" labels—a logic-based rule used by human experts.

Transformation of financial indicators into a visual spider chart representation.

Key Results and Insights

The results demonstrated a clear advantage for visual representations in specific classification tasks:

  • Superior Accuracy in Magic Squares: The mean predictability score for raw numeric data was approximately 0.71. However, when the data was converted to a low-resolution visual format (specifically 2x2 or 3x3 grids), accuracy surged to 0.90. This suggests that downsampling acts as a noise filter, forcing the model to focus on the overall structure rather than individual cell values.
  • Financial Classification Gains: In the "Recommended" labeling task for market health, visual representations outperformed numeric data by roughly 10% across the majority of classifiers. By placing related indicators like "Value" and "Momentum" adjacent to each other on a spider chart, the visual design "induced" relationships that independent-feature models typically ignore.
  • Predictive Limits: Notably, neither format was able to predict future market movements (the next week's S&P 500 index). Both numeric and visual data yielded results no better than a coin flip, reinforcing that while visualization aids in state identification, it cannot extract predictive signals from inherently stochastic market noise.

Conclusion and Future Directions

The study concludes that visual design should be viewed as a powerful combination of dimensionality reduction and feature engineering. By intentionally breaking the assumption of feature independence, visualizations create spatial dependencies that allow complex models to "see" the underlying logic of the data.

While the current study relied on human-designed charts (like the spider chart), the authors suggest that future research should explore automated visual design. This "AutoVis" approach would use machine learning to discover the optimal 2D arrangement of data to maximize a model's learning potential, moving beyond human intuition to find the most efficient visual language for AI.

Summary updated

BibTeX
@misc{cohen2019effect,
  author = {Naftali Cohen and Tucker Balch and Manuela Veloso},
  title = {{The Effect of Visual Design in Image Classification}},
  year = {2019},
  eprint = {1907.09567},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1907.09567},
}
Figure