arXiv:2609.03918cs.HCSep 2026

Manuscript Offprint

arXiv:2609.03918

Grounding GUI Design in Computational Psychology

Xianni Wang, Javier Romero Davila, Saku Sourulahti, Torsten Schaub, Jussi P. P. Jokinen

Abstract

Creating visually appealing user interfaces often requires extensive manual iteration. We propose an approach that applies answer set programming (ASP) to automatically generate and optimize UI layouts while satisfying design objectives such as grid alignment, grouping, color harmony, and whitespace, along with designer-specified preferences. Our method encodes constraints on element properties and relative positioning, producing layouts that balance functional and aesthetic goals. We evaluate this approach in three studies. Across two user studies, participants rated layouts generated with the full ASP model higher than both random designs and those based on simple heuristics. Designers reported that ASP-generated layouts supported early-stage sketching and exploration.

Keywords: graphical user interfaces, user interface optimization, answer set programming

1. Introduction

Graphical user interface (GUI) design is an iterative, detail-oriented process that demands significant time and resources (Cross, 2006). Designers must balance functional requirements, aesthetic choices, and constraints across platforms and screen sizes (Watzman, 2002). Even small layout changes can affect usability and perception, making evaluation both costly and time-intensive. Current practice relies heavily on repeated prototyping and usability testing. Existing computational tools are often narrow in scope, or inflexible, leaving much of the work manual (Oulasvirta et al., 2020). There is therefore a need for more comprehensive automated support in design.

GUI design is challenging because interfaces must align with two domains: the external task environment and the internal cognitive environment of users (Simon, 2019). Effective design requires minimizing discrepancies in both, meeting task demands while accommodating perceptual and cognitive capacities as well as individual needs and preferences. Psychological research can inform design, but its application often remains abstract and difficult to implement directly. To become actionable, such knowledge must be expressed in computational form, enabling systematic evaluation and adaptation of layouts (Oulasvirta, 2019; Oulasvirta et al., 2020). Embedding cognitive models into optimization procedures allows design tools to move beyond surface heuristics toward principled and interpretable improvements (Howes et al., 2023).

While computational tools for creating interface layouts have advanced, each existing paradigm leaves important gaps. Integer programming provides provable guarantees and real-time exploration but is presently limited to grid-based formulations and linear objectives, making it difficult to capture richer design semantics (Dayama et al., 2020, 2021a). Heuristic and evolutionary algorithms expand the design space and handle nonlinear objectives, yet they lack feasibility guarantees and often require substantial computation to avoid invalid layouts (Shiripour et al., 2021). Deep learning methods, including generative and graph-based models, capture complex spatial regularities and produce realistic layouts, but they depend on large annotated datasets and perform poorly on out-of-distribution designs or tasks requiring explicit interpretability (Jiang et al., 2022, 2024). Novel large language model (LLM) based approaches are promising, but lack in reliability and explainability (Kolthoff et al., 2025). Motivated by these limitations, we investigate Answer Set Programming (ASP; Lifschitz, 2008) as a declarative solver-based paradigm for GUI layout optimization. ASP combines the guarantees of constraint solving with non-monotonic reasoning capabilities. This allows us to model psychological design principles as "defaults with

∗^{*}Corresponding author.

Email address: xianni.x.wang@jyu.fi (Xianni Wang) exceptions" (e.g., elements use uniform sizing unless designated as salient), enabling both generation and evaluation of layouts under explicitly defined aesthetic and functional objectives.

Figure 1 illustrates our approach to computational UI design with ASP. Designers begin with sketches, partial layouts, or merely the desired number of elements, and encode principles such as alignment, grouping, and contrast into declarative statements. The solver then generates optimized layouts, enabling quick exploration of alternatives and adaptation across devices. Designers can also inspect the implemented design rules, providing explainability. This process supports a principled and transparent workflow in which constraints are directly interpretable.

In validation with online users, we show that ratings of visual quality clearly favor layouts generated with our ASP-based model over those produced with simple heuristics: encoding a broad set of aesthetic and cognitive constraints yields more appealing layouts. However, our tool is not intended to replace expert intuition, which reflects years of tacit knowledge about aesthetics, usability, and cognitive principles of design. Rather, it complements expertise by making these principles explicit, computationally testable, and actionable through optimization. We present evidence that designers with intermediate experience rate the generated layouts highly and report that the constraint-based specification process encourages them to articulate design relationships more clearly. Participants emphasize geometric relations, grouping, and automated color harmony as especially useful features, and note that the tool provides reference layouts that accelerate iteration and concept exploration. We envision future integration of the tool into early-stage ideation and rapid prototyping workflows. Beyond ideation, the system supports exploration of perceptual and cognitive design principles in silico, enabling experts to evaluate trade-offs and adapt layouts efficiently for different devices or user needs.

In sum, the contributions of this paper are:

  1. the first application of Answer Set Programming (ASP) to GUI layout optimization, demonstrating its rich representation capabilities;

  2. a formal set of aesthetic and cognitive design constraints operationalized in a declarative optimization pipeline; and

  3. three empirical studies with designers and end users that demonstrate the perceptual benefits of ASP-optimized layouts and provide formative evidence for the design tool in early-stage ideation.

All code and experimental materials reported in this pa-

per will be published open access in a Git repository upon publication.

References (77)