Kashyap Todi
email: kashyap.todi@gmail.com

Gilles Bailly
email: gilles.bailly@sorbonne-universite.fr

Luis A Leiva
email: luis.leiva@uni.lu

Antti Oulasvirta
email: antti.oulasvirta@aalto.fi

Adapting User Interfaces with Model-based Reinforcement Learning

Keywords: Human-centered computing → Interactive systems and tools Adaptive User Interfaces, Reinforcement Learning, Predictive Models, Monte Carlo Tree Search

Adapting an interface requires taking into account both the positive and negative effects that changes may have on the user. A carelessly picked adaptation may impose high costs to the user -for example, due to surprise or relearning effort -or "trap" the process to a suboptimal design immaturely. However, effects on users are hard to predict as they depend on factors that are latent and evolve over the course of interaction. We propose a novel approach for adaptive user interfaces that yields a conservative adaptation policy: It finds beneficial changes when there are such and avoids changes when there are none. Our model-based reinforcement learning

Figure 1: We present a model-based reinforcement learning approach for adaptive UIs that can improve usability while avoiding unexpected changes that surprise the user or require relearning. An interface is adapted by simulating several possible sequences of adaptations and evaluating them using predictive models in HCI. This approach avoids greedy, disadvantageous adaptations, and may anticipate possible user responses even with limited observation data.

INTRODUCTION

Adaptive user interfaces can autonomously change the content, layout, or style of an interface to improve their fit with the user's capabilities and interests. This paper looks at a foundational technical problem of adaptive interfaces that lies at the intersection of human-computer interaction and machine learning research: How to select adaptations? An adaptive system must decide what to adapt, and when -or when not -to make changes. Different computational approaches to this problem have been studied, among others, rule-based systems, heuristics, bandits, Bayesian optimisation, and supervised learning (see section 2). Although positive empirical results have been obtained (e.g., [START_REF] Bailly | Visual Menu Techniques[END_REF][START_REF] Cockburn | A Predictive Model of Menu Performance[END_REF][START_REF] Findlater | Ephemeral Adaptation: The Use of Gradual Onset to Improve Menu Selection Performance[END_REF][START_REF] Sears | Split Menus: Effectively Using Selection Frequency to Organize Menus[END_REF][START_REF] Soh | Deep Sequential Recommendation for Personalized Adaptive User Interfaces[END_REF][START_REF] Todi | Familiarisation: Restructuring Layouts with Visual Learning Models[END_REF][START_REF] Todi | Individualising Graphical Layouts with Predictive Visual Search Models[END_REF][START_REF] Tsandilas | Bubbling Menus: A Selective Mechanism for Accessing Hierarchical Drop-down Menus[END_REF]), known approaches have been criticised for being unpredictable and unreliable; they pick detrimental adaptations unacceptably often [START_REF] Findlater | A Comparison of Static, Adaptive, and Adaptable Menus[END_REF][START_REF] Greenberg | Adaptive personalized interfaces-A question of viability[END_REF][START_REF] Lavie | Benefits and Costs of Adaptive User Interfaces[END_REF][START_REF] Lavie | Benefits and Costs of Adaptive User Interfaces[END_REF][START_REF] Leiva | Interaction-Based User Interface Redesign[END_REF][START_REF] Vertegaal | Attentive User Interfaces[END_REF]. Estimation of utility is required for selecting an adaptation. Utility -in this case -refers to the usefulness of an adaptation to the user, or how it is perceived to benefit interaction when possible costs are taken into account. Picking an adaptation can be considered a hypothesis on how useful it is for user. Unfortunately, utility is very hard to estimate accurately -hard both at design time as well as interactively from the kind of data these systems have access to, such as clicks or viewing duration. In machine learning terms, utility is latent. Moreover, in adaptive interaction, utility is also non-stationary. That is, the skills and interests of the user evolve over time. A change that would make sense in the beginning when the user is novice with the design may be devastating for an experienced user.

We believe that adaptive systems could provide greater benefits by planning sequences of adaptations that gracefully lead a user through gradual changes. However, non-stationarity makes planning challenging: considering only a short period of time (i.e. a short horizon) can result in suboptimal designs. An adaptation that is overfit to a novice could be impossible to recover from later on when the user is more experienced. On the other hand, planning a long sequence of adaptations increases the size of search space, growing exponentially with the length of the planning horizon.

Model-based reinforcement learning is here developed as a principled and effective approach to these issues. We define the adaptation problem as a stochastic sequential decision problem [START_REF] Richard | Decision-making in a fuzzy environment[END_REF], where the adaptive system should plan a sequence of adaptations over a long horizon. Reinforcement learning (RL) is a class of machine learning methods appropriate for this type of problems. Typically, a policy is learnt via trial-and-error that maximises future cumulative utility. Our RL approach is model-based as it uses predictive HCI models to estimate utility. These models simulate consequences -benefits and costs -of possible adaptation sequences without actually executing them [START_REF] Pack | Reinforcement learning: A survey[END_REF][START_REF] Richard | Reinforcement learning: An introduction[END_REF]. However, their application is conditioned on their accuracy: They should accurately predict short-term costs such as due to relearning as well as longer-term improvements to performance. Generally, such models are available at least in the areas of pointing, menu interaction, and graphical layouts. In comparison with an alternative, the model-free approach, the model-based approach requires less training and better generalises across conditions [START_REF] Pack | Reinforcement learning: A survey[END_REF][START_REF] Richard | Reinforcement learning: An introduction[END_REF]. However, finding the best adaption -by assessing the value of each sequence of adaptations with predictive models -is computationally costly, especially when considering sequences of changes over a long horizon. To solve this computational problem in an online setting, we use a combination of Monte Carlo Tree Search (MCTS) for planning, and deep learning to boost performance. To avoid extensive trial-and-error with users in the loop, our deep learning models are trained offline using HCI models.

Our general approach can be applied for various HCI applications, such as adaptive mobile homescreens, graphical layouts, and application menus. We demonstrate it specifically in the context of adaptive menus. The task is to adapt the interface by changing the arrangement and grouping of menu items (Figure 1), thus improving the menu's usability. We exploit and extend multiple menu search models from literature to estimate the upper and lower bounds of the value of an adaptation as well as their change as the user learns. This helps us form an adaptation policy that accounts for different user strategies and avoids adaptations that incur high costs to users. Our technical evaluation shows that our solution can tackle realistic problem sizes, and find favourable adaptations, on a commodity computer. Finally, we present results from an empirical evaluation where the approach compared favourably against a non-adaptive baseline design and a frequency-based adaptation policy.

To sum up, this paper makes three key contributions:

(1) A new formulation for adaptive interfaces that formalises them as a stochastic sequential decision-making problem; (2) Development of model-based reinforcement learning for planning adaptations in the case where users learn; (3) Application in adaptive menus with demonstrated benefits to usability.

PREVIOUS WORK: MACHINE LEARNING METHODS FOR ADAPTIVE INTERFACES

Our work contributes to methods for adaptive interfaces designed to operate autonomously, that is without explicit feedback or training samples from user. The core computational problem we review here is how to pick an adaptation; we do not cover issues like prior elicitation, explainability, nor the design space of intelligent interaction techniques.

Rules, heuristics, and logic

Early work on this topic studied rule systems, heuristics, and logic as the basis of deciding what to adapt (see, e.g., [START_REF] Angel | Model-Based Automated Generation of User Interfaces[END_REF]). For example, in menu-based interaction, most systems still follow a heuristic approach, where adaptation is picked based on hand-written heuristics that exploit click frequency, visit duration, recency or other specific features that can be computed from observation data [START_REF] Gobert | SAM: A Modular Framework for Self-Adapting Web Menus[END_REF]. These approaches, in general, are feasible only when sensed input is highly predictive of the most appropriate adaptation. Another limitation is that writing a comprehensive and accurate rule system requires plenty of foresight. A rule system must be developed that, on the one hand, covers conceivable conditions the system can enter and, on the other, can graciously resolve conflicts when multiple rules apply.

Machine learning

The prevailing understanding is that learning is a key capability for adaptive systems [START_REF] Langley | Machine learning for adaptive user interfaces[END_REF]. Two learning capabilities are needed: (1) inference, the capability to update assumptions about the user based on observations; and (2) decision-making, the capability to choose appropriate adaptation in the light of assumptions about the user [START_REF] Oulasvirta | Computational interaction[END_REF]. The two challenges can be relaxed, for example if user state is trivially known, or if the state is highly predictive of appropriate adaptation. In the latter case, the problem can be approached as a supervised learning problem, where a mapping is learned between user data and suitable adaptations. While this approach has been successful for input techniques, such as gesture recognition [START_REF] Wu | Vision-Based Gesture Recognition: A Review[END_REF], it is an open question if this scales up to adaptive interfaces, which must not only learn user state but flexibly decide how to intervene in the user interface. A practical obstacle is how to obtain a dataset that describes the consequences of possible adaptations on possible users.

In the rest of the section, we focus on the general case, where both inference and decision-making are required and non-trivial.

Bandit systems and Bayesian optimisation

Bandit systems are one of the most successful probabilistic approaches to this problem, not only for recommendation systems but also for interface design and adaptation [START_REF] Lomas | Interface Design Optimization as a Multi-Armed Bandit Problem[END_REF]. Each adaptation is modelled as an 'arm' associated with a distribution describing expected gains. Given prior data and new evidence on the measured success of an adaptation, bandits use Bayes theorem to update expectation. Importantly, a principled solution is offered to the exploration/exploitation problem. Methods like Thompson sampling can optimally balance between exploring actions, to learn about which actions work, and exploitation, to converge to good designs.

Bayesian optimisation generalises bandit systems to the case of multiple interrelated decision variables [START_REF] Shahriari | Taking the human out of the loop: A review of Bayesian optimization[END_REF]. It is a global optimisation method that tries to find optimal adaptation by probing to a black box function; here, the user. It is a robust and sample-efficient and well-suited for noisy, expensive-to-evaluate functions. The method uses a surrogate model for approximating the model fit across the parameter space and quantify uncertainty. This is necessary for the acquisition rule to address the exploration-exploitation trade-off. This way, it is possible to learn adaptive responses via trial and error. Applications have been shown in human-in-the-loop design of interface features [START_REF] Dudley | Crowdsourcing Interface Feature Design with Bayesian Optimization[END_REF] and adaptation of low-dimensional design features [START_REF] Kim | Optimal Sensor Position for a Computer Mouse[END_REF]. However, while bandits and BO have been successful in simpler adaptation problems, like recommendations and calibration of interface parameters, their intrinsic limitation is that they are myopic; that is, they do not plan over a series of changes -a capability we need in adaptive interaction.

Reinforcement learning

Unlike bandits, reinforcement learning permits learning policies for sequences of actions where rewards are not immediately achievable. While applications have been shown for example in crowdsourcing [START_REF] Dai | POMDP-based control of workflows for crowdsourcing[END_REF], dialogue systems [START_REF] Young | POMDPbased statistical spoken dialog systems: A review[END_REF], and gaze-based interactions [START_REF] Gebhardt | Learning Cooperative Personalized Policies from Gaze Data[END_REF], a known limitation with the prevailing model-free RL approach is still the extensive amount of poor attempts (or trials) that are required to learn a good policy [START_REF] Richard | Reinforcement learning: An introduction[END_REF] This makes it poorly suitable for situations with very large state-action spaces.

Model-based RL uses a predictive model to simulate possibilities without first trying them out, which is useful for adaptive interfaces, because it significantly improves the efficiency of finding good solutions [START_REF] Pack | Reinforcement learning: A survey[END_REF]. A policy can be determined with much fewer trials, and if the model is good, at times directly. Outside of user interfaces, we find applications of model-based RL, for example in board games, robots, video games [START_REF] Kaiser | Model-based reinforcement learning for atari[END_REF], as well as behaviour-change applications, such as in generating behavioural instructions for people with dementia [START_REF] Hoey | Assisting persons with dementia during handwashing using a partially observable Markov decision process[END_REF]. A grand obstacle for applications in adaptive systems is the model: where to get a good one? A related problem is that of drift: prediction errors can have a compounding, cumulative effect on planning performance. In HCI, although previous work has explored the use of model-free RL (e.g., see [START_REF] Leino | Computer-Supported Form Design Using Keystroke-Level Modeling with Reinforcement Learning[END_REF]), model-based RL has not been explored in adaptive interfaces at large, as far as we know. Also, while predictive models have been used for oneshot design generation [START_REF] Oulasvirta | Combinatorial Optimization of Graphical User Interface Designs[END_REF], design space exploration [START_REF] Todi | Sketchplore: Sketch and Explore with a Layout Optimiser[END_REF], and for selecting a single action in a myopic manner [START_REF] Jussi | Modelling Learning of New Keyboard Layouts[END_REF][START_REF] Todi | Familiarisation: Restructuring Layouts with Visual Learning Models[END_REF], they have not been used for simulation-based planning in an adaptive system.

In this paper, we approach the fundamental problem of selecting user interface adaptations by applying model-based RL, and exploiting predictive HCI models, to simulate and plan adaptations.

PROBLEM FORMULATION

We formulate the problem of adaptation as a stochastic sequential decision-making problem [START_REF] Richard | Decision-making in a fuzzy environment[END_REF]. The adaptive system must decide what to adapt, if anything, given its observations. It should pick a sequence of adaptations in order to maximise their expected value to user over a longer window of interactions. For example, in our application example later on, we optimise for performance improvements in menu selection tasks achievable over multiple sessions of interactions. Further, in a stochastic problem, the world is neither fully known nor under the control of the system. In our case, while the system can change the interface, it cannot change the human, which has its own latent processes. For example, humans learn and change interests. This complicates the problem: Any greedily chosen adaptation may lead to irreversibly poor interactions later on. Thus, adaptations must be picked with a horizon of such developments in mind.

In the following, we formulate this problem as a Markov decision process (MDP). The benefit of an MDP formulation is that it offers a rigorous and actionable understanding of the problem. In particular, it (1) illuminates the decision problem, (2) links it to a body of theoretical results and practical approaches in AI and ML research, and (3) points toward appropriate algorithmic solutions.

The problem of adaptive interfaces is that of maximising expected cumulative discounted rewards 𝑟 (𝑠 𝑡 , 𝑎 𝑡 ) from acting according to an optimal policy 𝜋 * (see e.g. [START_REF] Janner | When to trust your model: Model-based policy optimization[END_REF]):

𝜋 * = argmax 𝜋 𝑝 (𝑠 𝑡 +1 |𝑠 𝑡 ,𝑎 𝑡 ) E 𝜋 ∞ 𝑡 =0 𝛾 𝑡 𝑟 (𝑠 𝑡 , 𝑎 𝑡 ) (1)
where,

• 𝑠 ∈ 𝑆 is a state of interaction; This consists of both the interface design (𝑑) and the user (𝑢)

• 𝑎 ∈ 𝐴 is an adaptation; i.e. a change that can be carried out on the interface. • 𝑝 is a transition function; it provides the probability of transitioning from state 𝑠 to state 𝑠 𝑡 +1 after performing adaptation 𝑎; i.e., 𝑝 (𝑠 𝑡 +1 |𝑠 𝑡 , 𝑎 𝑡 ). • 𝑟 is a reward collected for making adaptation 𝑎 in state 𝑠.

• 𝛾 is a discount factor controlling for how much to favour immediate (small 𝛾) vs. long-term (large 𝛾) reward.

Consider the case of adapting the homescreen layout of smartphones, consisting of a grid of application icons. Here, a state 𝑠 of the system consists of both the homescreen design 𝑑 and latent state of the user 𝑢 who is interacting with the device. More specifically, the design 𝑑 can encapsulate factors such as the arrangement of icons, their grouping or relationship to other icons, and other relevant features. With regard to the user 𝑢, aspects such as expertise, interests, and abilities, can be considered.

Given an initial homescreen design, with which the user has interacted, an adaptation 𝑎 would result in a new design by, for example, changing the layout or ordering of icons. Upon adaptation, the transition function 𝑝 specifies how the internal state of the user (e.g. their expertise) changes along with the external design state. The reward 𝑟 then signifies the benefit an adaptation provides to the user by improving future interactions, for example, by reducing the time required to select an icon. Finally, the discount factor 𝛾 indicates to the adaptive system how immediate benefits and long-term improvements contribute towards the reward. Given this setting, the goal of the system is to find a suitable policy 𝜏 that can be used to select adaptations that maximise the estimated cumulative reward.

Finding a policy to select adaptations can be challenging for adaptive interfaces. While the true state of the design is fully observable, the system does not have access to the true state of the user. We can only estimate it through HCI models, where predictions provide us a belief about the user status (for the theoretical implications of this, see [START_REF] Araya | A POMDP Extension with Belief-dependent Rewards[END_REF]). Further, due to the lack of user feedback, computing reward is not straightforward. Instead, predictive HCI models can be used to build objective functions related to performance and re-learning costs. Note that this formulation does not take a stance on what is the 'right' objective function. Finally, at any given state, there is a large number of possible adaptations that can change the design. When considering a sequence of adaptations over a long horizon, the state space grows exponentially. In the following, we describe how these challenges are addressed via model-based RL.

METHOD: DEEP MODEL-BASED REINFORCEMENT LEARNING

The core of this approach considers planning: the selection of a sequence of adaptation with the goal of maximising utility to user. Planning algorithms such as minimax and A-star, among others, utilise a tree representation of the search space. They have found several applications (e.g. game-playing [START_REF] Mark G Brockington | A taxonomy of parallel game-tree search algorithms[END_REF], circuit-routing [START_REF] Cai | ASA-routing: A-Star Adaptive Routing Algorithm for Network-on-Chips[END_REF], etc.). The tree consists of nodes, connected by branches, representing valid states and transitions between them. However, classic tree search algorithms often require expansion of the entire tree. This is computationally expensive given the large number of possible adaptations (breadth) and long horizons (depth) in adaptive interfaces.

Monte Carlo Tree Search (MCTS) has been successfully employed in various game-playing applications to plan a sequence of moves efficiently (see [START_REF] Browne | A Survey of Monte Carlo Tree Search Methods[END_REF]). MCTS can operate under uncertainty by analysing the most promising moves, and expanding tree nodes using random sampling based approaches. A well-known, inspiring application of MCTS is in AlphaGo [START_REF] Silver | Mastering the game of Go with deep neural networks and tree search[END_REF], the computer program capable of playing the game of Go competitively against human players. A key insight here has been to incorporate neural networks to help predict which branches have highest expected value, and thereby deal with larger problem instances. In our work, we incorporate a value neural network to compute longer sequence cases faster.

Planning with MCTS

In contrast to game-playing applications, where a win/loss defines the terminal state, our case does not have a well-defined horizon. The user could keep interacting for years. We thus need to estimate a cumulative reward over a horizon of reasonable length. In other parts, our solution follows standard implementations of MCTS (Figure 2):

1. Selection: When a user concludes an interaction session, the root state 𝑠 0 is given by the current design 𝑑 0 and user observations 𝑢 0 . A state 𝑠 𝑗 ∈ 𝑆 is selected via Upper Confidence Trees (UCT), a widely used estimator in model-based planning [START_REF] Kocsis | Bandit Based Monte-Carlo Planning[END_REF]. A key feature is that it has a coefficient 𝐶 to balance between exploration and exploitation when evaluating several possible UI adaptations:

UCT = 𝑟 𝑗 𝑛 𝑗 + 𝐶 ln 𝑛 𝑖 𝑛 𝑗 (2)
where 𝑟 𝑗 is the total reward for child state 𝑠 𝑗 , 𝑛 𝑗 is the number of times 𝑠 𝑗 has been visited, and 𝑛 𝑖 is the number of times parent state 𝑠 𝑖 has been visited. Exploration constant 𝐶 in our application is set to 1/ √ 2 following convention. If all adaptations from the selected state 𝑠 𝑗 have been previously explored, then selection is repeated until a leaf state is selected with unexplored adaptations.

2. Expansion: The selected node 𝑠 𝑗 is next expanded by picking an adaptation 𝑎 ∈ 𝐴 that results in a new state 𝑠 𝑗+1 . At this point, 𝑛 𝑗+1 , 𝑟 𝑗+1 = 0. In our application, we further assume that the expanded state is either visible or invisible to the user. Invisibility can be exploited to plan multiple adaptations in a single turn.

3. Roll-outs and simulations: During one roll-out, as the tree has no value estimates to inform the selection of consequential states, adaptations {𝑎 0 , . . . , 𝑎 𝑁 } ∈ 𝐴 are chosen at random, and rewards are estimated using predictive HCI models. All models simulate what would happen with that adaptation sequence and return an estimate of values over the whole window. This is repeated for a fixed number of steps, given by the horizon 𝐻 , and cumulative rewards are computed for each predictive model: 4. Backpropagation: At the end of a simulation, the cumulative reward 𝑟 𝑗+1 is backpropagated from the newly-expanded state 𝑠 𝑗+1 to the initial state 𝑠 0 , and values (rewards 𝑟 and visits 𝑛) are updated.

𝑟 𝑗+1 = 𝐻 𝑘=𝑗+2 𝑟 𝑘 (3)
The above steps (1-4) are repeated several times to obtain value estimates for each adapted state.

Selecting the next adaptation: Given these value estimates, the system can now choose the best adaptation (by setting 𝐶 = 0 in Equation 2) to maximise expected utility for the user while avoiding costly changes.

We support several ways for selecting adaptation that allows controlling for the trade-off between risk and gain. Our approach assumes that there are multiple predictive HCI models that bound the true behaviour, for example by offering best-case and (realistic) worst-case estimates. Alternatively, predictive models can be included to address multiple objectives, such as task completion time, cognitive load, and disruption [START_REF] Hui | A Probabilistic Mental Model for Estimating Disruption[END_REF]. Combining value estimations from all models, we can implement different objective functions, such as:

(1) Average: The mean of rewards from each model gives total reward 𝑟 , thus accounting for varying user strategies. (2) Optimistic: The system assumes optimal user strategy, and selects the model that maximises rewards. (3) Conservative: The system ensures that no user strategy is harmed by selecting the lowest-possible reward, and penalising negative rewards.

Value Estimation with Deep Neural Networks

To address large problem sizes in online settings, where repeating a sufficient number of MCTS simulations to attain robust estimates is infeasible, we develop a deep neural network architecture that can efficiently provide predictions in real-time.

In place of rollouts, where simulations can be costly for longer horizons, a pretrained value network is used to directly obtain value estimates for unexplored states. As illustrated in Figure 3, we propose an 𝑚-headed 𝑛-tailed architecture that is trained end-to-end with backpropagation. Each of the 𝑚 input parameters is treated as an independent model branch (head) that is eventually concatenated and passed to 𝑛 independent model branches (tails). During offline training, model-based data is generated using MCTS roll-outs from randomly sampled initial states. Value estimates, along with state (design and user) information, are given as input samples to a deep neural network model. Elementary design and user features are parameterised with the neural network model. This is then used to predict value estimates for any given state in an online setting. Note that we decouple value estimations from objective functions (see above), leaving it up to the adaptive system to decide how to use information from multiple models. The main advantages of using neural networks for estimation are that they have high learning capacity, and can evaluate thousands of states in real-time without running expensive simulations.

Applications in Adaptive Interfaces

With certain conditions we outline here, the approach we outline is broadly useful across applications of adaptive interfaces. For example, it can be used to adapt the structure of webpages layouts, arrange icons on mobile homescreens, or reorganise application menus. Depending on the application, the goal or objective can differ and might include minimising selection time, increasing saliency, reducing cognitive load, increasing engagement, or a combination of them. The approach can handle different types of adaptations including the presentation of the graphical elements (position, size, colour, etc.) or their behaviour (number of elements, animations, etc.). For any application case, a core aspect of our approach relies on HCI models [START_REF] Oulasvirta | Combinatorial Optimization of Graphical User Interface Designs[END_REF] to sufficiently accurately capture the effects of these adaptations on the chosen goals. For instance, Fitts' law [START_REF] Mackenzie | Fitts' Law as a Research and Design Tool in Human-Computer Interaction[END_REF] can be used to adapt the location and the size of an elements to minimise pointing time. Other practical limitations include the size of state-action space. In the following section, we demonstrate our approach with an application in adaptive menus, and present a novel HCI model to predict selection time in menus.

APPLICATION: ADAPTIVE MENUS

To demonstrate the applicability of our approach, we tackle a challenging and open question in the field of adaptive interfaces: adaptive menus. Menus have received extensive attention in HCI research because they are widely used, and adaptation has potential to improve usability [START_REF] Bailly | Visual Menu Techniques[END_REF][START_REF] Vanderdonckt | Exploring a Design Space of Graphical Adaptive Menus: Normal vs. Small Screens[END_REF]. It is known that unexpected changes in menus can introduce a temporary performance drop, increase cognitive load, and potentially lead to the rejection of the adaption/techniques [START_REF] Bailly | Visual Menu Techniques[END_REF][START_REF] Vanderdonckt | Exploring a Design Space of Graphical Adaptive Menus: Normal vs. Small Screens[END_REF]. No general solution has been proposed for autonomous adaptation that could not only move items to the top, but handle reorganisations more comprehensively. We provide a general solution here considering linear menus with up to 20 items, which covers a wide number of menus typically found in common operating systems, applications, and websites [START_REF] Bailly | Flower Menus: A New Type of Marking Menu with Large Menu Breadth, within Groups and Efficient Expert Mode Memorization[END_REF][START_REF] Bailly | Visual Menu Techniques[END_REF][START_REF] Bailly | Men-uOptimizer: Interactive Optimization of Menu Systems[END_REF]. As menu adaptations, we only consider those modifying the position and grouping of items in the menus, leaving other presentation adaptations, such as highlighting and split menus, for future work. While we consider linear menus with textual labels, our solution can be extended to address the problem of adaptive homescreens (introduced in section 3) by extending the menu search model to consider two-dimensional grids and graphical icons.

Problem Definition

Following the general formulation in section 3, we first define the adaptive menu problem. Figure 4 presents an exemplary illustration.

State (𝑆): A state 𝑠 ∈ 𝑆 gives information about the menu design and the user.

We define a design 𝑑 ∈ 𝐷 as a pair < 𝐿, 𝑀 > where 𝐿 is a nonhierarchical linear menu [START_REF] Kent L Norman | The psychology of menu selection: Designing cognitive control at the human/computer interface[END_REF] containing an ordered list of items. An item is either a word or a separator (used to create semantic groups). 𝑀 is an association matrix defining the semantic relatedness between menu items. In our implementation, 𝑀 is given by the designer as binary relationships by specifying lists of related items. For common words, it can be inferred using word embedding models [START_REF] Pennington | Glove: Global vectors for word representation[END_REF].

The system observes user clicks on menu items to approximate a user's expertise and interest. We use a simplified version of the learning component from ACT-R [START_REF] John R Anderson | The atomic components of thought[END_REF] to compute user expertise for each menu item 𝑖 𝑙 in a menu with 𝑛 items:

𝐵(𝑖 𝑙 ) = 𝑛 𝑗=1 (𝑇 -𝑇 𝑗,𝑖 𝑙 ) -𝜌 (4)
where 𝐵(𝑖 𝑙 ) is the level of activation of item 𝑖 at location 𝑙 in the memory, 𝑇 is the current time, 𝑇 𝑗,𝑖 𝑙 is the time of the 𝑗 𝑡ℎ selection of 𝑖 𝑙 , and 𝜌 is a decay parameter equal to 0.5. User interest (or prediction scheme [START_REF] Vanderdonckt | Exploring a Design Space of Graphical Adaptive Menus: Normal vs. Small Screens[END_REF]) is given by the frequency distribution of commands selected during the previous interaction session, containing 𝑁 clicks. Additional statistical models of user interest and expertise [START_REF] Fitchett | AccessRank: Predicting What Users Will Do Next[END_REF][START_REF] Peter | Composition during serial learning: A serial position effect[END_REF][START_REF] Gobert | SAM: A Modular Framework for Self-Adapting Web Menus[END_REF][START_REF] Todi | Familiarisation: Restructuring Layouts with Visual Learning Models[END_REF], can be plugged into our architecture.

Feasible Adaptations (𝐴):

The set of possible adaptations 𝐴, through which a menu can be reorganised, includes (1) moving a menu item to a certain position, (2) swapping two items, (3) adding or removing a separator, (4) moving an entire group, (5) swapping two groups, and (6) not making any changes.

Transition function (𝑝): We use MCTS, where the probability of making an adaptation from state 𝑠 0 to 𝑠 1 is given by UCT (Equation 2). During planning, we balance between exploiting highreward adaptations and exploring others. When selecting an adaptation 𝑎 to make on the current design 𝑑 0 , resulting in a new design 𝑑 1 , a greedy strategy is chosen:

argmax 𝑎 𝑟 𝑗 𝑛 𝑗 (5)

Reward (𝑟 ):

We extend predictive HCI models of menu use to obtain reward estimates. A key feature of these models is to take into account the implicit cost of adaptations. Given a pair of menu designs and estimates of user expertise and interest, these models predict selection time for items for varying user strategies. For each model, the reward 𝑟 then is the difference in average selection time, weighted by user interest. Rewards from multiple models can be combined using any of the objective functions given in section 4.1.

When an adapted state is assumed to be displayed (visible) to the user, we simulate an interaction session (new clicks) based on user interest, and update expertise accordingly. Conversely, the system can use invisible states to withhold presentation and combine multiple adaptations, such that the state is used only as a pathway to another state without being displayed. Here, no user updates are applied.

Models for Simulating Menu Search

Several predictive models explain how users search within linear menus [START_REF] Bailly | Model of Visual Search and Selection Time in Linear Menus[END_REF][START_REF] Michael | ACT-R/PM and menu selection: applying a cognitive architecture to HCI[END_REF][START_REF] Cockburn | A Predictive Model of Human Performance With Scrolling and Hierarchical Lists[END_REF][START_REF] Hornof | Cognitive Modeling Reveals Menu Search in Both Random and Systematic[END_REF][START_REF] Kent L Norman | The psychology of menu selection: Designing cognitive control at the human/computer interface[END_REF]. We build on these models to define three search strategies, and use these to evaluate the utility of a menu design by simulating search tasks, illustrated in Figure 5:

(1) Serial search: The user searches serially, from top to bottom, until the desired item is found in the menu. (2) Foraging search: Grouping of items is exploited such that the user only searches for the target within relevant groups. (3) Recall search: The user relies on memory to search for the desired item at an expected location in the menu. Our choice of the three models was made with the hypothesis that they would provide bounds for best-case and worst-case performance. In the beginning, best-case performance would be governed by foraging and serial search, but as experience accumulates, the (rational) user would shift to foraging based and recall-based strategies. But making the assumption that a user might -for reasons like lack of effort or interest -use a poor strategy allows us to define a conservative policy for adaptation that is unlikely to annoy them. We note that it is possible to plug in additional search strategies (e.g. Random search [START_REF] Kent L Norman | The psychology of menu selection: Designing cognitive control at the human/computer interface[END_REF]) without modifying the general architecture of the algorithm.

Table 1: Key notations used in this section.

Notation Description

𝑖 𝑙 Target item 𝑖 at location 𝑙 𝑇 model (𝑖) Search time for an item 𝑖 with a given model 𝛿 Constant for cautious inspection cost of an item 𝑇 𝑐 Constant surprise penalty when an item is not found as expected 𝑇 trail Constant pointing time when the cursor trails eye gaze 𝑀 (𝑖 𝑘 , 𝑖 𝑙 ) Boolean relationship between items 𝑖 𝑘 and 𝑖 𝑙 , from association matrix 𝑀 𝐵(𝑖 𝑙 ) Activation level for 𝑖 at 𝑙 5.2.1 Serial search. When searching for a menu item 𝑖 𝑒 at an expected position 𝑒, serial search [START_REF] Bailly | Model of Visual Search and Selection Time in Linear Menus[END_REF][START_REF] Cockburn | A Predictive Model of Menu Performance[END_REF][START_REF] Kent L Norman | The psychology of menu selection: Designing cognitive control at the human/computer interface[END_REF] consists of a top-tobottom inspection of the menu, until the item is reached. Inspection (or reading) cost for any item 𝑖 𝑙 is given by:

𝑇 read (𝑖 𝑙 ) = 𝛿 1 + 𝐵(𝑖 𝑙 ) (6)
where 𝐵(𝑖 𝑙 ) is the activation of 𝑖 at 𝑙, and 𝛿 is the cautious inspection cost constant when there is no activation. The total serial search time for a target at expected location 𝑒 is thus given by:

𝑇 serial (𝑖 𝑒 ) = 𝑒 𝑗=1
𝑇 read (𝑖 𝑗 ) + 𝑇 trail [START_REF] Richard | Decision-making in a fuzzy environment[END_REF] Where 𝑇 trail is a constant pointing time assuming that the mouse cursor trails the eye-gaze (tracking strategy) during serial search [START_REF] Bailly | Model of Visual Search and Selection Time in Linear Menus[END_REF][START_REF] Michael | ACT-R/PM and menu selection: applying a cognitive architecture to HCI[END_REF].

In an adapted menu, if the item's new location 𝑎 is before the expected location 𝑒 (𝑎 ⩽ 𝑒), the search time reduces following Equation 7. However, if 𝑎 is after 𝑒 (𝑎 ⩾ 𝑒), surprise penalty 𝑇 𝑐 is imposed upon not finding the item as expected. Following this, the user cautiously inspects the remaining items at a slower rate 𝛿. The total search time is:

𝑇 serial (𝑖 𝑎 ) = 𝑇 serial (𝑖 𝑒 ) + 𝑇 𝑐 + (𝑎 -𝑒) • 𝛿 + 𝑇 pointing (8)
To support serial search, it is advantageous for an adaptive system to move frequently-used items towards the top.

Foraging search.

Here, semantic structure (grouping) is exploited to avoid wasting time inspecting groups that most likely do not contain the target item [START_REF] Bailly | Visual Menu Techniques[END_REF]. The anchor, or first element of a group, "signals" what is in the group. If the anchor is unrelated to the target, the user skips the group. If the anchor is related, the user performs a serial search within this group.

Consider a menu where 𝑛 𝑔 is the number of groups, 𝑛 𝑔 (𝑖 𝑒 ) is the location of the group that contains the target (𝑖 𝑒 ), and 𝑒 the expected target location within the group. 𝑀 (𝑔 𝑗 , 𝑖 𝑒 ) ∈ [0, 1] specifies if 𝑖 𝑒 is associated to an anchor 𝑔 𝑗 . In a well-organised menu, where the anchor of one of the groups is related to the target item, foraging search time is:

𝑇 forage (𝑖 𝑒 ) = 𝑛 𝑔 (𝑖 𝑒 ) 𝑗=1 𝑇 read (𝑔 𝑗 ) + (9) 𝑀 (𝑔 𝑗 , 𝑖 𝑒 ) • min(𝑒 (𝑔 𝑗 ),𝑠 (𝑔 𝑗 )) 𝑘=1 𝑇 read (𝑖 𝑘 ) + 𝑇 trail
where 𝑠 (𝑔 𝑗 ) is the size of the group, and 𝑒 (𝑔 𝑗 ) is the location of the target item 𝑡 𝑒 within group 𝑔 𝑗 if it is located within the group, ∞ otherwise. Finally, 𝑇 trail remains the constant pointing time when the mouse cursor trails the eye gaze. Thus, items within related groups are inspected serially until the target is successfully found. In a poorly organised menu, where the target item is not located within the expected group(s), a user first attempts foraging search by inspecting all anchors, and all items within related anchors (given by Equation 9). Upon not finding the item, a surprise penalty 𝑇 𝑐 is incurred, and the user reverts to serial search under caution from the top of the menu.

To support foraging search, it is desirable for an adaptive system to create groups of related items, or eliminate groups where items have no associations. (a) when the target is at an expected location, search proceeds as expected; (b) when the target is at an unexpected location, a penalty is imposed upon not finding the target at its expected location (indicated by ×), and search reverts to slower strategies.

Open

5.2.3

Recall search. Recall (direct) search [START_REF] Bailly | Model of Visual Search and Selection Time in Linear Menus[END_REF] relies on user's memory, given by activations 𝐵, to directly glance at items without inspecting the entire menu. For a target item 𝑖, if there are no activations 𝐵 𝑖 above a threshold 𝜃 (we use 0.5), the user reverts to serial search (Equation 7). When 𝐵(𝑖 𝑙 ) ⩾ 𝜃 for a target 𝑖 𝑙 at location 𝑙, the user attempts recall search by inspecting the item at 𝑙 (Equation 6).

If found at 𝑙, the user then performs a pointing task. Here, the visual search and pointing task are performed sequentially as eye movement is faster than mouse movement [START_REF] Bailly | Model of Visual Search and Selection Time in Linear Menus[END_REF]. We use Fitts' law to estimate pointing time in menus:

𝑇 pointing (𝑖 𝑙 ) = 𝑎 𝑝 + 𝑏 𝑝 • log(1 + 𝑖 𝑙 ) (10)
where 𝑎 𝑝 = 10.3 and 𝑏 𝑝 = 4.8 according to [START_REF] Bailly | Model of Visual Search and Selection Time in Linear Menus[END_REF].

If not found at 𝑙, after incurring surprise penalty 𝑇 𝑐 , the user attempts local search, by randomly inspecting 𝑁 𝑙𝑜𝑐𝑎𝑙 items in the vicinity of location 𝑙.

𝑇 local (𝑖 𝑙 ) = 𝑇 𝑐 + 𝛿 • 𝑁 local + 𝑇 trail (11)
In non-ordered menus, 𝑁 local is equal to 2 times the number of items in the Fovea. In semantic menus, 𝑁 local is the number of items in the group.

In an adaptive menu, the target item 𝑖 might have been encountered at several locations. Here, the user attempts recall search at all locations 𝑙 ∈ 𝐿 where 𝐵(𝑖 𝑙 ) ⩾ 𝜃 , until the target is found. The total recall search time for target 𝑖 𝑎 at adapted location 𝑎 is given by:

𝑇 recall (𝑖 𝑎 ) = 𝑇 pointing (𝑖 𝑎 ) + 𝑙±𝑁 /2 𝑙 ∈𝐿:𝐵 (𝑖 𝑙 )⩾𝜃 𝑇 read (𝑖 𝑙 ) + 𝑇 local (𝑖 𝑙 ) (12)
If recall search fails (𝑎 ∉ 𝐿 or 𝐵(𝑡, 𝑎) < 𝜃 ), the user eventually reverts to serial search under caution (Equation 8).

To support recall, it is advantageous for an adaptive system to place frequently-encountered items at locations where they have been seen before.

Neural Network for Rewards Estimation

The above search models enable us to predict selection times for varying user strategies. By simulating consequences of adaptations during roll-outs, we can estimate implications of design changes on user performance. However, given the varying length of menu sizes, running simulations with long horizons can be infeasible for online settings. For example, for a menu with 15 items, and up to 8 separators, there are over 500 feasible adaptations. To address large problem sizes, we instantiate our general network architecture (Figure 3) for adaptive menus. The key idea is to anticipate the rewards for a given menu adaptation taking into account the previous menu design and the user behaviour. The model inputs are: (1) design head: adapted menu design, association matrices of the current and adapted menu; (2) user head: previous and current clicks distribution. The model outputs reward predictions for each of the three search models: serial, foraging, and recall. Figure 6 illustrates the model architecture.

Each input is treated as an independent model branch (head) that is eventually concatenated and passed to three independent model branches (tails), one for each output reward. Each item in the adapted menu is converted to a one-hot encoded vector, flattened, and then passed to a fully connected layer. The association matrices are diffed and passed to a long short-term memory (LSTM) layer, then passed to a fully connected layer. Finally, the click history is passed to an LSTM layer, which models sequential data and is designed to handle long-term dependencies, and is then passed to a fully connected layer.

The concatenated inputs are passed to each network tail, which comprises two stacked fully connected layers. At the end of each tail, we use linear activation to predict each reward, since they are not bounded. For regularisation purposes, our architecture uses Dropout layers with drop rate 0.5 before each of the fully connected layers. This prevents overfitting the model to the training data, improving generalisability to unseen data. The loss function for all model tails is the mean squared error (MSE), which is computed as the average of the squared differences between the predicted and the actual values, which penalises large errors. We use the RMSProp optimiser, a popular stochastic gradient descent algorithm with momentums. We use learning rate 𝜂 = 0.001 and decay factor 𝛽 = 0.9 for the optimiser. We train the model for 200 epochs at most, using early stopping (10 epochs patience) to retain the best model weights, and monitor its performance on a validation set comprising 20% of training data. After training, our model achieved remarkable performance: MSE 𝑠𝑒𝑟𝑖𝑎𝑙 = 0.149, MSE 𝑓 𝑜𝑟𝑎𝑔𝑒 = 0.408, MSE 𝑟𝑒𝑐𝑎𝑙𝑙 = 0.431.

EVALUATION

We validate our method, applied to adaptive menus, through technical and empirical evaluations.

Technical Evaluation

We conducted a technical evaluation with realistic and challenging scenarios, where the adaptive system must adapt menus for simulated users. The two main questions we seek to answer are:

(1) Can a model-based planning approach successfully and consistently improve predicted usability?

(2) Does our neural network based solution scale it up to address larger problem sizes?

6.1.1 Tasks. Menu Designs and User Interest: We considered 3 menu sizes -5, 10, and 15 items -to address varying cases, from short contextual menus to longer application menus. In addition, up to 8 separators were allowed for grouping, resulting in menus with up to 23 items. We picked common labels for menu items, where categories specified pairwise associations (e.g. animals, furniture, vegetables, clothing). For each menu size, we created 4 starting menu designs by randomly assigning labels to item positions. We used a Zipfian distribution to reasonably model menu usage [START_REF] Cockburn | A Predictive Model of Menu Performance[END_REF][START_REF] Liu | Effects of Frequency Distribution on Linear Menu Performance[END_REF]. We sampled 8 different click histories by randomly assigning frequency to item labels. This resulted in 3×8×4 = 96 configurations, each assigned to a different simulated user.

Reward Estimation: We compare two methods of estimating rewards: model-based simulations and value neural network predictions. With model-based simulations, predictive models are used during roll-outs to estimate rewards for each state. With value network predictions, our pre-trained network models are used to predict value estimates for each state. used a GNU/Linux server with an Intel Xeon Gold CPU @ 2.10 GHz (64 bit processor) for simulations. The execution of the study was automated such that trials were conducted sequentially, to avoid variations in computational resource usage.

During each trial, a combination of {menu size × user history × menu design × objective function × reward source} was selected, and given as input to the system. In a constrained setting, the MCTS algorithm was allowed 400 iterations, and a shallow roll-out horizon of 4 steps, to build the search tree and find suitable adaptations.

6.1.3 Result: Success Rate. With the above setup, we first evaluated whether our approach, and implementation, could successfully identify promising adaptations. As dependent variable, we measured success rate of finding beneficial adaptations. We define a successful trial as one where the predicted selection time is improved by adaptation. Figure 7 shows an example result for a challenging case with a 15-item menu.

The overall success rate with model-based simulation was 92.7%, indicating that in most cases an improvement was found. Similarly, with the value network, success rate was 89.6%. These results support our approach towards planning menu adaptations that can improve user performance. 6, 8, and 10 -depicting a range of planning horizons, from short sequences to longer sequences.

Figure 8 illustrates computation time results for each depth level (for 400 MCTS iterations). We observe that for depths ≤ 4, the value network does not provide much benefit. However, as search depth increases, while the computation time with our value network remains constant (mean M = 7.77s, SD = 1.0), it drastically increases with simulations (from M = 7.9s, SD = 3.5s at depth 4 to M = 39.0s, SD = 7.4 at depth 10).

Empirical Evaluation

The primary goal of this evaluation is to test whether our planning approach (henceforth MCTS) applied to linear menus improves performance in comparison with static menus (Static), and with the well-known frequency-based adaptive approach (Freqency) as a baseline (e.g. as in [START_REF] Lee | Quantitative results assessing design issues of selection-supportive menus[END_REF]). In MCTS, the menu adapts after each block by planning adaptations; in Static, the menu does not adapt over time; in Freqency, the menu adapts based on the frequency of clicks on menu items. To this end, we conducted a lab study where participants completed selection tasks in a within-subject design with three conditions (Static, Freqency, MCTS).

Materials.

For the experiment, linear menus with 15 item labels were randomly generated. Items labels were selected from common categories (e.g. animals, fruits, countries, etc.) to avoid prior biases. For each participant, two menus were generated for each of the three conditions, resulting in six unique menus. To avoid confusion, there were no overlaps in item labels or categories between the menus for a participant.

For each menu within a condition, a Zipfian distribution, known to accurately capture real-world command selections [START_REF] Cockburn | A Predictive Model of Menu Performance[END_REF][START_REF] Liu | Effects of Frequency Distribution on Linear Menu Performance[END_REF], with shape 𝑠 = 1.5 was used to control the frequency distribution of target items. The same frequency distribution was used for all three conditions within a participant. Unique frequency distributions were generated for every participant, to consider variance in user interests. These frequency distributions were then used to generate sequences of target items, to be presented as stimulus during the trials.

6.2.2 Participants. 18 participants (10 masculine, 8 feminine, 0 others), aged 18 to 38 (mean 27.2), with varying educational backgrounds, were opportunistically recruited. All participants reported frequent desktop or mobile, and web usage. Participation was compensated with a movie ticket voucher (approx. €12.00).

Apparatus.

The experiment was conducted on a Macbook Pro, with a 15" Retina display. An Apple Magic Mouse with default tracking speed was used for selection tasks. The study interface was implemented using HTML and Javascript, and was displayed in a browser window. Timestamped cursor movements and clicks on menu items were recorded. 6.2.4 Stimulus and Task. The target item name was displayed at the top of the browser window. Participants began a trial by clicking on a confirm button, upon which the menu was displayed directly below. Errors were logged, and participants had to select the target item to finish the trial. Upon clicking the target item, the menu was hidden, and a short break was provided. 6.2.5 Procedure and design. The experiment began with an introductory briefing and participant consent. In a within-subject experimental design, each participant tested the three conditions (Static, Freqency, MCTS) sequentially. Condition order was counterbalanced between participants using a 3×3 Latin square.

During each condition, the participant interacted with two different menus during 3 blocks. Within a block, the two menus appeared in an alternating order, separated by short breaks (3 seconds). For each menu, 20 selection tasks (trials) were completed. We introduced this design to reflect the fact that (1) users perform several sessions of work in the real life (one session == 1 block), (2) users regularly switch between applications within a session, and thus use different menus [START_REF] Raissi | Retroactive Transfer Phenomena in Alternating User Interfaces[END_REF]: we wanted to avoid undesirable effects due to repetitive selection within a single menu, and (3) each menu has a different selection frequency, given by two Zipfian distributions.

Participants took mandatory breaks (1 minute) between two consecutive blocks, and longer breaks (5 minutes) between conditions where they answered open-ended interview questions. In summary, the design is: 18 participants × 3 conditions × 3 blocks × 2 menus × 20 selections = 6480 trials.

Quantitative Results.

Average Selection Time: We created a mixed-effect model for repeated measures analysis of variance (one-way ANOVA) with selection time (in ms) as dependent variable, conditions (Static, Freqency, MCTS) as fixed independent variable, and participant ID and menu design as random variables.

Condition had a statistically significant effect on selection time 𝐹 (2, 17) = 5.47, 𝑝 < 0.05,s with grand means Static = 2283 ms, Freqency = 2298 ms, and MCTS = 2162 ms (Figure 9a). Post-hoc test using Tukey HSD revealed that MCTS (2162 ms) was significantly faster (lower selection time) than both Freqency (2298 ms) and Static (2283 ms); the difference between Static and Freqency was not statistically significant. Target Item Position: Given the menu selection scenario, items near the top of the menu are typically faster to select than items that are near the bottom. However, this selection time depends not only on the cursor movement distance, but also the user's ability to search for items in the menu. To get a better understanding of how the different conditions influenced performance, we further looked at how target item positions in the menu influence selection time. Figure 9b illustrates the linear increase in selection time with target position for the three conditions. It can be observed that while selection time for the top-most items (lower target positions) is quite similar for the three conditions, with MCTS being the fastest, it increases more drastically for the condition, as compared to Static and MCTS. When we exclude the top-three target items, the difference in selection time between MCTS (mean = 2454 ms) and Freqency (mean = 2799 ms) is 344 ms (i.e. Freqency is about 15% slower).

6.2.7 Qualitative Results. During the study, participants were not informed about adaptations (if any) in advance. After each block, we asked them whether they noticed changes to menus during use, and their opinions about these changes (if any). 15 participants commented that they noticed changes in the Freqency condition, but only 2 participants noticed how these changes were occurring. Participants commented that the reordering was confusing, and prevented them from remembering item locations: "I might skip down instead of checking the top, and then go back to the top. " (P3). In the Static condition, participants could use their memory to directly access some items, but commented on the lack of proper grouping: "the items were not consistent in their grouping, and they were not intuitively grouped" (P11). In the MCTS condition, participants noticed that the categorisation of items into groups improved upon adaptation, and helped them in searching for related items: "the items were organised under categories often -that helped select items" (P18).

Summary

Results from our simulation-based evaluation offer evidence for our approach and technical solutions. First, MCTS-based planning consistently proposes adaptations that could improve predicted performance (Figure 9a). Second, as search depth increases, our results indicate that value network is more efficient for estimating reward predictions. Further, results from our user study highlight benefits over a static and an adaptive baseline. Through model-based planning, we can adapt menus that improve overall performance, as given by reduced selection time. A common pitfall of the frequencybased approach is that, although it can improve performance for commonly-used items or commands, it prevents recall and makes selection of other items increasingly difficult. In contrast, we observed (Figure 9b) that adaptations made through our approach could provide these benefits while avoiding costly changes that require relearning and cause annoyance.

CONCLUSION

We have presented a model-based reinforcement learning method suitable for adaptive interactions. While recent successes of reinforcement learning have created renewed enthusiasm toward this approach in HCI, applications to adaptive user interfaces have remained scarce. To apply this class of machine learning methods for selecting adaptations, we have proposed the use of predictive models in HCI for value estimation during planning. We have presented solutions to several consequent technical challenges, most notably:

• How to model the decision problem in adaptive interfaces for model-based RL; • How to estimate MCTS roll-outs using HCI models; • How to design deep neural networks to boost planning.

To study and demonstrate the viability of the approach, we have applied it to the challenging case of adaptive menus by extending predictive models. Our simulated and empirical evaluations suggest significant and practically valuable improvements to usability. Importantly, the adaptive system does not require explicit user input, but is still able to perform conservatively without disadvantageous or annoying changes (Figure 10). Our empirical evaluation reveals that this approach can work even when starting from poor designs that would be hard to recover with approaches that do not consider planning. Future adaptive applications can benefit from our general approach by exploiting and extending predictive models of interaction.

Limitations and Future Work

We see several exciting topics for future research on model-based RL and its applications in HCI. First, one limitation to the applicability of the approach is the requirement for accurate models of short-and long-term consequences of adaptations. So far we have assumed that such models are expressed as step-by-step computer simulations or mathematical models. However, there is no reason why data-driven models (e.g. [START_REF] Yuan | Modeling Human Visual Search Performance on Realistic Webpages Using Analytical and Deep Learning Methods[END_REF]) -trained on larger datasets of user data -could not be used for this purpose, significantly expanding the scope of possible applications. Second, algorithm engineering is needed to deploy this approach to larger applications. In particular, presently, with our computing resources, problem sizes of up to 20 items are still within reach in the case of menu systems. To improve performance beyond that, techniques for GPU computation and more efficient training will need attention. Finally, while our work successfully used a value network, further improvements can be expected by implementing a policy network [START_REF] Silver | Mastering the game of Go with deep neural networks and tree search[END_REF].

To conclude, we hope our work can be broadly appealing, and invite contributions from both the HCI and the machine learning community. At the core of model-based RL is an understanding of how users behave and what makes a good design in given conditions. We believe that future applications can benefit from this approach to improve interactions.

OPEN SCIENCE

We support adoption and further research efforts by providing an open code repository, with examples and instructions, on our project page: https://userinterfaces.aalto.fi/adaptive.

Figure 2 :

 2 Figure 2: Model-based planning of adaptations using Monte-Carlo Tree Search (MCTS). Adaptations are selected using upperconfidence trees (UCT). After expanding a new node (adaptation), reward estimates are obtained through roll-outs, and backpropogated to the root node. The child with the highest value is picked as the next adaptation.

Figure 3 :

 3 Figure 3: Neural network architecture for obtaining value estimates. Training data is generated using HCI models.

Figure 4 :

 4 Figure 4: Menu adaptation with deep model-based RL. Given a current design and user observations, MCTS-based planning is used to select the next adaptation. Reward estimates are obtained either using predictive models or from a neural network.

Figure 5 :

 5 Figure 5: Model-based simulation of search for a target item ('Save As...').(a) when the target is at an expected location, search proceeds as expected; (b) when the target is at an unexpected location, a penalty is imposed upon not finding the target at its expected location (indicated by ×), and search reverts to slower strategies.

Figure 6 :

 6 Figure 6: Our value network architecture takes menu design and user features as input to provide individual reward predictions.

Figure 7 :

 7 Figure7: A sample result from the simulation study, for a 15item menu design. In 3 steps, the menu was adapted to better suit the given user's interests ('Gloves' group moved to the top), and improved some grouping ('Carrot' with 'Potato') as well.

6. 1 . 4

 14 Result: Scalability. To assess the scalability of our solution, we compared computation time for model-based simulations vs. value network predictions. In addition to the horizon of 4 steps used to evaluate success rate, we evaluated 3 other search depths -

Figure 8 :

 8 Figure 8: Computation time for planning adaptations via model-based simulations vs. value network for varying search depths. Our value network exhibited consistent performance for longer horizons.

Figure 9 :

 9 Figure 9: (a) The MCTS condition was associated with significantly lower selection time as compared to the two baselines. Vertical bars indicate 95% confidence intervals. (b) For items positioned lower in the menu, selection time in Freqency increased more drastically than other conditions.

Figure 10 :

 10 Figure 10: Sequential adaptation of a 5-item menu. The system avoids greedily moving 'Coffee' (lowest frequency) at the first step. In light of new observations, this change is justified by the reduced user interest.

  6.1.2 Implementation. Our MCTS-based planning algorithm, and the predictive menu models, are implemented in Python 3.7. The value neural network is implemented with TensorFlow 2.0.0. We

	User Interest
	(Frequencies)
	Gloves: 0.6
	Carrot: 0.16
	Panda: 0.1
	Table: 0.06
	Beans: 0.06
	Bikini: 0.02
	(Others: 0)
	Adapt x 3
	Predicted Average
	Selection Time (s)
	13.6s Current	7.2s Adapted

ACKNOWLEDGMENTS

We thank all study participants for their time, and colleagues and reviewers for their helpful comments. This work was funded by the Department of Communications and Networking (Comnet), the Finnish Center for Artificial Intelligence (FCAI), Academy of Finland projects 'Human Automata' and 'BAD', Agence Nationale de la Recherche (grant number ANR-16-CE33-0023), and HumaneAI Net (H2020 ICT 48 Network of Centers of Excellence).