Discovering Object Attributes by Prompting Large Language Models with Perception-Action APIs

Angelos Mavrogiannis, Dehao Yuan, Yiannis Aloimonos · DOI

Abstract

Traditional Vision-Language Models (VLMs) excel at object identification but struggle with attributes that require physical interaction or contextual reasoning, such as weight or relative distance. This paper introduces a framework that leverages Large Language Models (LLMs) to generate and execute Python programs using a Perception-Action API. By treating attribute discovery as a programmatic reasoning task, robots can perform "active perception"—physically probing the environment to ground linguistic concepts in sensory data. Experimental results demonstrate significant performance gains over standard VLMs in spatial reasoning and physical attribute estimation.

Introduction

Modern AI has made remarkable strides in visual recognition. However, for a robot to truly understand its environment, it must go beyond labeling pixels. It needs to understand "grounded" attributes: Is this box heavier than that one? Which mug is the second from the left? These questions often baffle standard Vision-Language Models (VLMs) because they require either multi-step logical reasoning or physical interaction that a static image cannot provide.

The Grounding Problem

The core issue is that many object attributes are either contextual or non-visual. A "large" apple is only large relative to other apples in the scene. "Weight" is a physical property that cannot be seen; it must be felt. Standard "disembodied" models lack the common-sense reasoning to perform counting or the physical embodiment to probe their surroundings. This research addresses this gap by transforming attribute detection into a structured process of reasoning and action.

Methodology: The Perception-Action API

The researchers propose a system where an LLM (such as GPT-4) acts as the central reasoning engine. Instead of directly answering a query, the LLM generates a Python script that utilizes a specialized Perception-Action API.

The Perception-Action API architecture bridges natural language instructions and physical robot actions through LLM-generated code.

The workflow follows a four-step process:

  1. Code Generation: The LLM interprets a natural language query and writes a program using functions for object detection (Open-Vocabulary Detection), VLM-based patch querying, and robot control.
  2. Programmatic Reasoning: The code can implement loops to iterate through objects, conditionals to filter candidates, and mathematical operations to compare values.
  3. Active Perception: For non-visual traits like weight, the code triggers physical actions. The robot navigates to an object, picks it up, and records data from force/torque sensors.
  4. Execution and Feedback: The program runs in a simulated (AI2-THOR) or real-world environment, returning a final answer grounded in actual sensor data.
The framework enables robots to solve complex queries by generating code that combines visual search with physical measurements like distance and weight.

Key Insights: Attributes as Programs

A pivotal realization of this work is that attributes are programs. By expressing attribute detection as code, the system handles the complexity of superlatives (e.g., "tallest," "heaviest") naturally. Superlatives require a comparison across a set, which a loop and a min() or max() function handle perfectly.

Furthermore, the system utilizes Vision-Informed Language Reasoning. If a robot sees a "feather" and a "car," the LLM can use its internal common-sense knowledge to predict that the car is heavier without even touching it. When visual cues are insufficient, the system falls back on Active Perception, using physical sensors to resolve ambiguity.

Experimental Results

The programmatic approach was tested against several benchmarks, including the Odd-One-Out ($O^3$) dataset and custom spatial queries.

  • Spatial Reasoning: The framework improved location-based query accuracy by 134% over standard open-vocabulary detectors (GLIP). For size-related queries, it saw a 67% improvement.
  • Weight Estimation: In simulated environments, the Perception-Action API achieved 96% accuracy in identifying the heaviest/lightest objects, whereas standard VQA models reached only 64% and vanilla VLMs just 14%.
  • Distance Grounding: By actively using distance sensors, the system reached 94% accuracy, overcoming the depth-perception limitations of 2D VLMs.

Conclusion and Future Directions

By moving from simple classification to programmatic reasoning, this framework allows robots to discover and ground complex object attributes. While highly effective, the system currently faces challenges with error propagation—if the initial object detector fails, the entire program may fail. Future work aims to expand the sensor suite to include tactile and temperature sensors and to improve the efficiency of the LLM-VLM "internal dialogue" for real-time robotics.

Summary updated

BibTeX
@inproceedings{mavrogiannis2025discovering,
  author = {Angelos Mavrogiannis and Dehao Yuan and Yiannis Aloimonos},
  title = {{Discovering Object Attributes by Prompting Large Language Models with Perception-Action APIs}},
  booktitle = {IEEE International Conference on Robotics and Automation},
  year = {2025},
  doi = {10.1109/icra55743.2025.11127632},
}
Figure