Amine Elhafsi

Stanford University
2 previous affiliations
9Machine learning papers tracked by Lacuna
Is this you?

Research Overview

Amine Elhafsi focuses on autonomous navigation, semantic anomaly detection, and the integration of foundation models into robotic control systems. Early work addressed motion planning and trajectory forecasting in unknown or dynamic environments. More recently, the research emphasizes using large language and vision models to detect edge cases and enable reactive planning for embodied agents.

Research Trajectory

Amine Elhafsi’s early research focused on the intersection of perception, prediction, and motion planning for autonomous systems operating in uncertain environments. Traditional algorithms for navigating unknown spaces often rely on heuristic methods to select intermediate objectives along frontiers, limiting their ability to reason about unobserved structures. In 2020, Elhafsi led the development of Map-Predictive Motion Planning in Unknown Environments, proposing a unified, data-driven approach. By using a robot's local observations as context to predict the layout of unobserved areas, the system could plan safer and more time-efficient trajectories for dynamically constrained robots.

During this same period, Elhafsi also investigated how autonomous systems model and respond to other agents. As a co-author of MATS: An Interpretable Trajectory Forecasting Representation for Planning and Control (2020), the research explored representations for human motion prediction, a critical component for safe human-robot interaction. This work aligned with the broader research direction of Integrating Static Environmental Constraints for Trajectory Prediction and contributed to themes such as Trajectory-Conditioned World Models for Interactive Driving, where the focus is on moving beyond simple historical coordinate tracking to understand how agents interact with their environments and each other.

By 2023, Elhafsi’s focus expanded from geometric and kinematic planning to the higher-level cognitive challenges of autonomy, specifically addressing system-level failures caused by "semantic anomalies." These anomalies—such as an autonomous vehicle misinterpreting a stop sign printed on a billboard—are often simple for humans to resolve but cause catastrophic failures in traditional autonomy stacks. As first author of Semantic anomaly detection with large language models, Elhafsi demonstrated how the zero-shot reasoning capabilities of large language models (LLMs) could be leveraged to disentangle complex, out-of-distribution edge cases that fall outside standard training paradigms.

Transitioning these large models from offline analysis to online robotic control requires overcoming significant computational bottlenecks. In 2024, Elhafsi co-authored Real-Time Anomaly Detection and Reactive Planning with Large Language Models, which introduced a two-stage reasoning framework to make foundation models viable for real-time application. The system utilized a fast binary anomaly classifier operating within an LLM embedding space, allowing the robot to detect failures and safely adjust its control framework on the fly. This approach advanced the broader area of Closed Loop Reasoning for Embodied Task Planning, moving LLMs from static text environments into dynamic, physical decision-making loops.

Parallel to this work in semantic reasoning, Elhafsi has also contributed to complex embodied control problems. In SkillBlender: Towards Versatile Humanoid Whole-Body Control via Skill Blending (2024), the research addressed the high-dimensional action spaces and inherent instability of bipedal humanoid robots. The proposed hierarchical reinforcement learning framework first developed primitive skills using dense rewards, then blended these skills to accomplish more complex tasks without relying on computationally expensive optimization or extensive task-specific reward tuning.

Most recently, Elhafsi’s work on anomaly detection has evolved to incorporate purely visual foundation models. In the 2025 collaborative paper Vision Foundation Model Embedding-Based Semantic Anomaly Detection, the research team proposed a framework that operates directly on images rather than relying on intermediate text or semantic representations. By comparing local vision embeddings from runtime images to a database of nominal, safe scenarios, the system can identify contextually invalid visual elements using both raw grid-based embeddings and object-centric instance segmentation.

Current Directions

The most recent papers in the evidence indicate a continuing focus on adapting multi-modal foundation models for highly unstructured and extreme environments. Recent collaborative work investigates the application of these models to space-based tasks, addressing core challenges such as the scalability of ground-in-the-loop operations, the need to generalize prior knowledge to novel planetary environments, and the integration of multi-modal sensor data.

As autonomous systems are deployed in these increasingly complex domains, the research aligns with the area of Physics Augmented Machine Learning for Robust Extrapolation. Standard deep learning models often struggle to extrapolate beyond their training distributions, making physics-informed approaches necessary for reliable control. Furthermore, the integration of vision foundation models points toward the research direction of Visual Inference of Latent Physical Properties, where systems must move beyond merely identifying objects to understanding their physical constraints and behaviors in the real world.

Profile updated

See something wrong? Report a mistake