Differentiable user models

Alex Hämäläinen, Mustafa Mert Çelikok, Samuel Kaski

Abstract

Probabilistic user modeling is essential for building machine learning systems in the ubiquitous cases with humans in the loop. However, modern advanced user models, often designed as cognitive behavior simulators, are incompatible with modern machine learning pipelines and computationally prohibitive for most practical applications. We address this problem by introducing widely-applicable differentiable surrogates for bypassing this computational bottleneck; the surrogates enable computationally efficient inference with modern cognitive models. We show experimentally that modeling capabilities comparable to the only available solution, existing likelihood-free inference methods, are achievable with a computational cost suitable for online applications. Finally, we demonstrate how AI-assistants can now use cognitive models for online interaction in a menu-search task, which has so far required hours of computation during interaction.

Introduction

To build truly helpful AI assistants, systems must understand human thought and action through user modeling. The current gold standard, "computational rationality," assumes human behavior is rational but constrained by cognitive bounds like memory or visual processing speed. However, these advanced cognitive models are typically implemented as non-differentiable simulators, leading to two primary challenges:

  1. Incompatibility: They cannot be easily integrated into modern gradient-based machine learning pipelines (e.g., PyTorch or TensorFlow).
  2. Computational Cost: Inferring user goals via these simulators often requires Likelihood-Free Inference (LFI), which is extremely slow. For instance, modeling a single user's menu-searching behavior can take up to 700 CPU hours, making real-time assistance impossible.

Methods: Amortized User Modeling

We propose a method for amortized user modeling via meta-learning. Instead of executing a heavy simulator during real-time interaction, we train a differentiable "surrogate" model to mimic the simulator's behavior.

The Surrogate Model

We utilize Neural Processes (NPs) and Attentive Neural Processes (ANPs) as surrogates. These models combine the flexibility of neural networks with the uncertainty quantification of Gaussian Processes.

Meta-Learning Workflow

  • Offline (Meta-training): Thousands of simulated user trajectories are generated using the expensive cognitive model. The surrogate learns to map these observed behaviors to a latent representation ($z$) capturing specific user traits.
  • Online (Meta-testing): During real-time interaction, the surrogate performs a simple forward pass. It updates its belief about the user instantly, providing a differentiable path to predict future actions or provide assistance.
Gridworld environment used to test the system's ability to handle uncertainty in user rewards.

To handle model misspecification, we introduce a fine-tuning step where the surrogate is adjusted using small amounts of real-world data, correcting for discrepancies between the simulator and actual human behavior.

Experimental Setup

The approach was evaluated across three experimental setups:

  1. Gridworld: A benchmark where agents (modeled using Monte Carlo Tree Search) navigate to goals, testing the handling of reward uncertainty.
  2. Rational Menu Search: A cognitive model based on human eye-movement data, simulating how people search dropdown menus under visual constraints.
  3. AI-Assistant Task: A scaled-up menu search where an AI must infer a user's target sub-menu and proactively suggest it.

Results

Our findings highlight the efficiency and accuracy of the proposed surrogate models.

Accuracy and Speed

In the Menu Search task, the ANP surrogate achieved 95.5% accuracy in predicting user actions, nearly matching the theoretical "Oracle" limit of 97%. Crucially, while traditional methods like BOLFI are computationally prohibitive, the ANP surrogate performed modeling updates in just 8.46 milliseconds.

Accuracy comparison across different models and episodes. Attentive Neural Processes (ANP) significantly outperform standard NPs and approach Oracle performance.

Key Insights

  • The Power of Attention: ANPs significantly outperformed standard NPs. The attention mechanism allows the model to better weigh specific past actions that are most indicative of future intent.
  • Bypassing Likelihoods: By using meta-learning to learn a latent representation ($z$), we effectively "amortize" the inference, turning a complex search problem into a fast prediction problem.
  • Assistant Performance: In the AI-assistant experiment, the ANP-based system saved users 45.7% of their search time, performing almost as well as an assistant with full knowledge of the user's goals.

Discussion and Limitations

While this approach represents a major step forward, several hurdles remain. The model is amortized, meaning it provides a latent vector $z$ rather than a "true" Bayesian posterior in the original parameter space, which can limit interpretability. Furthermore, while the method handles action noise well, future work is needed to address systematic biases where simulator logic fundamentally differs from human logic. Finally, integrating privacy-preserving techniques like differential privacy is essential for responsible deployment in real-world user modeling.

Summary updated

BibTeX
@inproceedings{hamalainen2023differentiable,
  author = {Alex Hämäläinen and Mustafa Mert Çelikok and Samuel Kaski},
  title = {{Differentiable user models}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2023},
  url = {https://openreview.net/forum?id=88UtbxMxXK},
}
Figure