Editor’s introduction
The study presents a two-stage deep learning model designed to predict visual attention in graphic design documents, focusing on webpages as a primary example. The first stage generates component-specific saliency maps—such as for logos, banners, and text—based on layout type, then combines them to predict overall document saliency.
Introduction
Unlike natural images, graphic design documents are created by people to convey information, such as flyers, webpages, etc. This means that their layout usually directs a viewer’s attention to particular elements of the design, perhaps in a specific viewing order. Predicting a user’s attention is therefore critically important to knowing whether the graphic design efficiently conveys the intended information. Also unlike natural images, graphic designs try to direct attention using a mixture of captivating text fonts, animations, and images. Competition between these design elements for attention makes this a more difficult problem than attention prediction for natural images, not only because images are included in documents, but also because complex cognitive processes are engaged (e.g., reading) that are not part of most natural image viewing.
Previous methods to predict attention allocation during document viewing have significant limitations. For one, they mainly adopt black-box solutions that lack interpretability, making it difficult to understand how individual document components contribute to attention behavior. Also, these works have largely attempted to predict only the spatial distribution of attention over a document, as estimated by purely spatial fixation-density maps (FDMs). However, visual attention is a dynamic process that changes both spatially as well as over time. The regions of a document can be attended in different orders which likely signify different levels of engagement with the document.
Predicting the dynamic allocation of a person’s attention can have far-reaching applications. For one, growth in remote education has created the need for predictive models of attention in the context of online meeting platforms, which are also graphic documents. If one could predict attention shift between speakers, shared image content (i.e., slides), etc., then intelligent systems could anticipate a viewer’s attention and introduce content to maximize a desired outcome (e.g., comprehension of presented material). At a shorter timescale, being able to predict attention, even for the first few gaze fixations, could enable preferential content loading, thereby making delays resulting from bandwidth limitations less disruptive. Critically, however, existing saliency prediction methods do not consider this temporal dynamic.
We fill this gap by introducing Attention on Graphic Designs (AGD), a model for predicting the spatio-temporal allocation of visual attention (gaze scanpaths) during graphic design document viewing. Our primary focus is on webpages, due to their diversity of components (texts, logos, images etc.) making these documents a challenging test of saliency models, but we show that our method generalizes beyond webpages to other design documents such as comics, posters, and mobile user interfaces (Sec. VI).
AGD consists of two highly-interpretable stages. The first stage, AGD-Fixation (AGD-F), is related to existing work in that we use a saliency map to predict the FDM (the aggregate spatial distribution of a viewer’s fixations over the document) and we compute saliency using face, text, and other document image features. However, whereas previous models assumed that all text and faces are in a sense equally salient, our model uses only the faces and text that attract the most attention. Prioritizing the importance of individual text and faces is a contribution of our work because documents often depict multiple instances of both, and not all instances attract attention equally well (see Sec. III-B). Our approach thus models attention as a combination of only the salient instances within multiple document components.
In addition to salience-weighted combination of document components, another innovation of our study is the use of page layout as another feature for predicting gaze, adding to the features that are specific to the different document components. The design of a document, and specifically its layout, is likely to impact a viewer’s attention allocation, which can be biased even by (content-less) geometric shapes. Existing saliency methods do not consider page layout in their predictive models, assuming that a layout bias would simply disappear when these boxes are filled with content, as in a webpage. Here we assume otherwise, that different design layouts can lead to different document viewing behaviors. We include layout information in our model by passing a layout embedding directly as an input to the model encoder, thus factoring webpage layout into the overall saliency prediction. We obtained webpage layouts using page metadata and purely data-driven segmentation methods (Sec. III-B) over a large repository of 55,000 popular webpages.
Webpage FDMs are computed in stage 1 so that they can be used as the state representation in the stage 2 modeling aimed at predicting the temporal order of fixations over different webpage regions, referred to here as webpage scanpaths. For a modeling approach we use inverse reinforcement learning (IRL), which was recently shown to predict scanpaths in the context of search tasks and natural images. We extend this model to the free viewing of webpages by adopting a state representation consisting of a webpage’s semantic elements (texts, banners, etc.). We call this model AGD-Scanpath (AGD-S). By integrating a component-specific fixation-prediction network with a modified inverse-reinforcement learning paradigm developed for natural images, we found that our model showed unprecedented generalization between different types of graphic designs. To the best of our knowledge, ours is the first deep learning model to predict fixation scanpaths on multiple graphic design types (e.g., webpages and mobile UIs).
Attention Prediction on Natural Images
Computer vision has made rapid progress in image saliency detection, especially using deep learning methods, which can be broadly classified into: bottom-up models and top-down models. Notable works include the use of multi-scale deep features, multi-contextual features, and recurrent deep models. See for a good review of saliency models and datasets in the deep learning era. Also, several works have aimed to predict scanpaths on natural images. These natural image attention models do not generalize well to graphic design documents, as shown in previous studies. This motivates us to build a model for such documents.
Attention Prediction on Graphic Designs
There have been several works that have predicted saliency on graphic designs such as webpages, posters, etc. Shen et al. combined hand-crafted features (e.g. text, positional bias, etc.) with straightforward fitting of these feature maps to predict eye fixations on webpages. In comparison, our model first finds the saliency of the visual components and then combines these salient components. Zheng et al. collected human fixations under various tasks such as shopping and form-filling, and predicted saliency based on these task labels. Gu et al. captured page biases using a variational autoencoder and used feature detectors to predict webpage saliency. Xia et al.’s saccadic model predicts scanpaths while viewing webpages, using hand-crafted features for training and is not interpretable. We, however, adopt a deep learning approach that better reveals the dynamic attention mechanisms, being trained on a larger dataset of gaze fixations. This helps us improve prediction performance with interpretable results.
Bylinskii et al. used deep learning to predict saliency for data visualizations and graphics. Deka et al. collected a dataset of mobile UIs and learned a low dimensional representation using an AutoEncoder. In a similar spirit, we have encoded document layouts. Further along investigated saliency in mobile UIs. Bannier et al. applied deep networks in saliency prediction on comics. Recently, presented a model that first classifies a graphic design and then predicts design-specific importance. However, this work predicts importance maps, collected using mouse annotations instead of eye fixation data. While we compare our model with the model in, our findings suggest that the importance maps obtained by their model do not well predict the eye fixations in our WebSaliency dataset due to qualitative differences. The model we propose generalizes to saliency prediction for posters, comics, mobile UIs and natural images.
Model Overview
We propose a two-stage model for predicting attention on graphic design documents. In the first stage, we predict the fixation density map (FDM) by first computing the FDMs of the components that constitute a graphic design such as faces, texts, banners, etc., using a dilated inception module as the encoder that leverages image features and an explicit page layout representation. Next, these component FDMs are used to predict the final FDM. In the second stage, we leverage the component FDMs computed in Stage 1 to predict the visual scanpath (sequence of fixations on the document image) using an inverse reinforcement learning (IRL) approach. We describe in details these stages in the following subsections.
Stage 1: Fixation Density Map Prediction
As is well known in graphic designs, human related features, like eyes and faces, logos, and even text attract more attention than other objects. Thus, we design our model to include information from all of these sources, and to find the overall importance of these features relative to one another. Our results also show that not every face or textual region is important in attracting attention. We thus opt to use face and text saliency maps instead of their raw feature encodings to predict attention. Similarly, we use logo and banner saliency maps in our prediction model as these components have also been found to influence attention in designs such as webpages. Our model also includes a natural image saliency map that captures attention for other visually discriminative regions.
Component Saliency Prediction: We propose a Component Saliency Prediction Network (CSPNet), a deep network for predicting the fixation density maps of the components that constitute a graphic design. More specifically, the face, text, logo, banner and image FDMs, constitute the final FDM. CSPNet predicts the saliency of each of these components.
Several works have used convolutional networks with encoder-decoder architectures to predict saliency in natural images. has shown that using dilated convolutions in an encoder-decoder model better captures the multi-scale contextual information in an image and improves saliency prediction. Motivated by the success of this model, we first encode the document image using a dilated residual network (with ResNet-50 backbone), which we used as our primary feature extractor. We add a dilated inception module on top of the backbone network for capturing the multi-scale image features, following.
Automatic webpage segmentation: Visual segmentation of graphical stimuli, such as webpages or mobile apps, is a well studied process in UI communities. We script the web browser to obtain automated access to the Document Object Models (DOM) and CSS Object Models (CSSOM) of the webpages. We use these models to segment the pages into their components, including HTML images, advertisements, and paragraphs. We selected 55K pages from the 1 million most popular webpages. See supplementary for details regarding the segmentation of different webpage components.
Stage 2: Scanpath Prediction
Rather than applying GAIL to search, we modified it for document scanpath prediction by removing the object contingency used by to predict search behavior. Furthermore, used panoptic object segmentations for different natural object categories to construct an internal state representation. Graphic designs however, have a different set of semantic components (text, banners, logos, etc). We thus propose a state representation that reflects the semantic components in a graphic design (the predicted component FDMs from Stage 1) for our IRL model of scanpath prediction. We used the predicted component FDMs and not their segmentation maps because the component FDM predictions are more discriminative than segmentations of only the component locations. More importantly, unlike the dynamic contextual belief maps in that are hand crafted for state space representation, we leverage the automatically learned component FDMs from Stage 1 for predicting scanpaths in Stage 2.
We followed to develop our AGD-S model. AGD-S is composed of three main components: (1) the policy network, (2) the critic network, and (3) the discriminator network. The policy and critic networks are jointly updated using the PPO algorithm by maximizing the total expected reward, as explained in.
Evaluation of the Saliency Prediction Model
We compare our AGD-F model with natural saliency models: Itti, Deep Gaze II, SalGAN, DVA, SAM-ResNet, UAVDSM, DI Net, EML-NET, webpage saliency models: MKL, MMF and SPPL, TaskWebSal (FreeView) and the graphic design saliency model, UMSI. We quantitatively compare over the metrics: Normalized Scanpath Saliency (NSS), Cross Correlation (CC), KL divergence (KL), the Judd AUC (AUC-J) and the Shuffled AUC (sAUC). We randomly selected 58 images from WebSaliency for testing and the rest for training.
Tables II and III list different performance metrics for the compared methods. As seen, AGD-F outperforms previous methods on all metrics on both FiWI and WebSaliency. We did not compute KL divergence on FiWI (Table II) and did not evaluate MKL, MFF, SPPL on WebSaliency (Table III) due to lack of publicly available code.
Comparison of computational cost of different saliency prediction models
In Table VI we report the number of model parameters and GFLOPs of the compared deep learning models to analyze their computational requirements. Our model has significantly fewer parameters and GLOPs compared to the natural saliency model SAM-ResNet and the webpage saliency model TaskWebSal. The number of model parameters is similar to UMSI, the state-of-the-art for predicting importance on graphic designs, although UMSI uses significantly less GFLOPs for prediction. Also, the number of GFLOPs and model parameters compare well with other natural saliency models such as DI Net, EML-NET and Deep Gaze II. Thus, our model has reasonable computational requirements despite the use of multiple sub-networks. We attribute this to the fact that the PageSegNet and PageEncoder sub-networks are lightweight versions of the U-Net++ model and our CSPNet model uses dilated convolutions, known to significantly reduce computational cost compared to other encoder-decoder models for saliency predictions (e.g. Deep Gaze II, SalGAN, UAVDVSM, etc.) that use convolutional networks with different kernel sizes.
Evaluation of the Scanpath Prediction Model
We compare our AGD-S model with the following baselines: (1) Itti model, (2) AGD-F (our saliency model) with Winner-Take-All (WTA) and Inhibition of Return (IoR) applied on the FDM, (3) the MASC model for scanpath prediction, (4) the SceneWalker model, and (5) the G-Eymol model. We compared the models using: (1) Sequence Score (SS) - by converting the predicted and the human scanpaths into corresponding strings of fixation cluster IDs and then measuring string similarity using, and (2) MultiMatch, which considers shape, direction, length, and position aspects of scanpath similarity. We evaluated the first seven fixations on the same test set as our saliency model evaluation. In Table VII we compare prediction performance as well as inter-observer (IO) performance, where one subject’s scanpath predicts another subject’s scanpath for the same image. High Sequence Score and MultiMatch values suggest a high agreement in how different people viewed these documents, despite the potential for idiosyncratic differences. As seen in Table VII, scanpaths predicted by our model are more similar to those of people compared to baselines. We also compare our AGD-S model without layout information in the state representation, where we found adding layout information improves the prediction performance.
Conclusion
In this work, we have presented a data-driven model for predicting attention on webpage images and show that our saliency model easily generalizes to other graphic designs such as posters, comics, etc. The model outperforms prior works by combining only the most salient visual components in a webpage to predict saliency. We further show that utilizing the page layout representation for saliency prediction leads to better performance. Using these layouts we obtain the largest dataset of free-viewing webpage fixations to date. Finally, the component saliency maps are leveraged to predict attention scanpaths on graphic designs.


