How Secure Are Large Language Models (LLMs) for Navigation in Urban Environments?

Congcong Wen, Jiazhao Liang, Shuaihang Yuan, Hao Huang, Yi FangarXiv 2024 · DOI · arXiv

Abstract

As Large Language Models (LLMs) are increasingly deployed in robotics for high-level reasoning, their robustness in complex, real-world scenarios becomes a critical concern. This paper exposes significant security vulnerabilities in LLM-based navigation systems operating in urban environments. The authors introduce the Navigational Prompt Attack, demonstrating that subtle, gradient-guided perturbations to text instructions can cause robots to deviate from their paths or fail tasks entirely. To address these risks, the study proposes Navigational Prompt Engineering (NPE) as a preliminary defense strategy.

Introduction: The Vulnerability of "Common Sense"

Integrating LLMs into robotics allows systems to leverage "common sense" for following natural language instructions in city streets. However, most research focuses on performance under ideal conditions, overlooking the potential for adversarial manipulation. In an urban context, a robot receives text instructions like "Turn left at the McDonald's." If an attacker subtly alters this prompt—by appending a nonsense string or swapping a key word—they could hijack the robot's decision-making. This study investigates whether these models are robust enough to handle such adversarial "noise" in outdoor settings, which are far more complex than typical indoor simulations.

Adversarial Attack Framework

The authors propose two primary attack vectors based on discrete gradient optimization:

  1. Navigational Prompt Insert (NPI) Attack: This involves appending a carefully crafted "adversarial affix" (a string of tokens) to the end of the original navigation prompt to mislead the model.
  2. Navigational Prompt Swap (NPS) Attack: This method identifies the most "important" word in the prompt via gradient magnitude and replaces it with an adversarial token to maximize the likelihood of an incorrect action.

To counter these attacks, the researchers introduced Navigational Prompt Engineering (NPE). This defense uses specialized prompting techniques to "shield" the LLM without retraining:

  • NPE-CoT (Chain of Thought): Forces the model to "think step-by-step."
  • NPE-PS (Plan-and-Solve): Requires the model to extract landmarks and create a plan first.
  • NPE-RP (Role-Play): Instructs the model to act as a "skilled navigator" to filter out irrelevant or malicious information.

Experimental Setup and Datasets

The study utilizes two established real-world street-view datasets based on New York City:

  • Touchdown: 9,326 examples of English instructions paired with 360-degree RGB panoramas.
  • Map2Seq: 7,672 navigation instructions derived from OpenStreetMap data in Manhattan.

These datasets are significantly more challenging than indoor benchmarks because they involve long-distance navigation across real urban road networks.

Key Results and Insights

The experiments revealed several critical findings:

  • Universal Fragility: Even state-of-the-art models like GPT-4 are highly susceptible. In some tests, performance metrics dropped by up to 150%. On the Map2Seq dataset, the Key Point Accuracy (KPA) for the VELMA-LLaMa2 model plummeted from 43.2% to 15.4% under a white-box NPI attack.
  • Transferability: Adversarial affixes generated against a white-box model (like LLaMa) can effectively "break" black-box models (like GPT-4), suggesting shared linguistic vulnerabilities in spatial processing.
  • Semantic Sensitivity: The NPS attack is most effective when targeting words describing intersections or landmarks.
  • Defense Efficacy: The NPE-RP (Role-Play) strategy showed the strongest recovery. For the VELMA-RBL model on Touchdown, it helped increase KPA from a post-attack low of 14.9% back up to 32.0%, though it still did not reach the original un-attacked performance of 55.1%.

Conclusion and Future Work

While NPE defenses provide a moderate offset to performance degradation, they are not a complete solution. The defense relies on the LLM's internal ability to follow complex meta-instructions, which can itself be brittle. Future work should focus on developing adversarial training specifically for navigation tasks—retraining models on perturbed data to build inherent robustness. Additionally, exploring lightweight network structures for local execution on robots could reduce latency and costs associated with cloud-based APIs.

Summary updated

Abstract

In the field of robotics and automation, navigation systems based on Large Language Models (LLMs) have recently demonstrated impressive performance. However, the security aspects of these systems have received relatively less attention. This paper pioneers the exploration of vulnerabilities in LLM-based navigation models in urban outdoor environments, a critical area given the widespread application of this technology in autonomous driving, logistics, and emergency services. Specifically, we introduce a novel Navigational Prompt Attack that manipulates LLM-based navigation models by perturbing the original navigational prompt, leading to incorrect actions. Based on the method of perturbation, our attacks are divided into two types: Navigational Prompt Insert (NPI) Attack and Navigational Prompt Swap (NPS) Attack. We conducted comprehensive experiments on an LLM-based navigation model that employs various LLMs for reasoning. Our results, derived from the Touchdown and Map2Seq street-view datasets under both few-shot learning and fine-tuning configurations, demonstrate notable performance declines across seven metrics in the face of both white-box and black-box attacks. Moreover, our attacks can be easily extended to other LLM-based navigation models with similarly effective results. These findings highlight the generalizability and transferability of the proposed attack, emphasizing the need for enhanced security in LLM-based navigation systems. As an initial countermeasure, we propose the Navigational Prompt Engineering (NPE) Defense strategy, which concentrates on navigation-relevant keywords to reduce the impact of adversarial attacks. While initial findings indicate that this strategy enhances navigational safety, there remains a critical need for the wider research community to develop stronger defense methods to effectively tackle the real-world challenges faced by these systems.
BibTeX
@misc{wen2024how,
  author = {Congcong Wen and Jiazhao Liang and Shuaihang Yuan and Hao Huang and Yi Fang},
  title = {{How Secure Are Large Language Models (LLMs) for Navigation in Urban Environments?}},
  year = {2024},
  eprint = {2402.09546},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2402.09546},
}
Figure