# GRAML: Goal Recognition As Metric Learning

arXiv: https://arxiv.org/abs/2505.03941 · HTML: https://mlsanity.com/paper/2505.03941/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 12 of its 37 references that are in the map.
- First posted on arXiv 6 May 2025.

## Builds on (most cited first, 12 of 12)

- [D4RL: Datasets for Deep Data-Driven Reinforcement Learning](https://mlsanity.com/paper/2004.07219/) (2020)
- [Minigrid & Miniworld: Modular & Customizable Reinforcement Learning Environments for Goal-Oriented Tasks](https://mlsanity.com/paper/2306.13831/) (2023)
- [Goal-Conditioned Reinforcement Learning: Problems and Solutions](https://mlsanity.com/paper/2201.08299/) (2022)
- [panda-gym: Open-source goal-conditioned environments for robotic learning](https://mlsanity.com/paper/2106.13687/) (2021)
- [Hardness-Aware Deep Metric Learning](https://mlsanity.com/paper/1903.05503/) (2019)
- [Classical Planning in Deep Latent Space](https://mlsanity.com/paper/2107.00110/) (2021)
- [Model-free, Model-based, and General Intelligence](https://mlsanity.com/paper/1806.02308/) (2018)
- [Goal Recognition as Reinforcement Learning](https://mlsanity.com/paper/2202.06356/) (2022)
- [Goal Recognition as a Deep Learning Task: the GRNet Approach](https://mlsanity.com/paper/2210.02377/) (2022)
- [Goal recognition via model-based and model-free techniques](https://mlsanity.com/paper/2011.01832/) (2020)
- [ODGR: Online Dynamic Goal Recognition](https://mlsanity.com/paper/2407.16220/) (2024)
- [Goal Recognition using Actor-Critic Optimization](https://mlsanity.com/paper/2501.01463/) (2024)

## Abstract (arXiv)

Goal Recognition (GR) is the problem of recognizing an agent's objectives based on observed actions. Recent data-driven approaches for GR alleviate the need for costly, manually crafted domain models. However, these approaches can only reason about a pre-defined set of goals, and time-consuming training is needed for new emerging goals. To keep this model-learning automated while enabling quick adaptation to new goals, this paper introduces GRAML: Goal Recognition As Metric Learning. GRAML uses a Siamese network to treat GR as a deep metric learning task, employing an RNN that learns a metric over an embedding space, where the embeddings for observation traces leading to different goals are distant, and embeddings of traces leading to the same goals are close. This metric is especially useful when adapting to new goals, even if given just one example observation trace per goal. Evaluated on a versatile set of environments, GRAML shows speed, flexibility, and runtime improvements over the state-of-the-art GR while maintaining accurate recognition.
