Learning to Act Properly: Predicting and Explaining Affordances From Images

Ching-Yao Chuang, Jiaman Li, Antonio Torralba, Sanja Fidler

Abstract

We address the problem of affordance reasoning in diverse scenes that appear in the real world. Affordances relate the agent’s actions to their effects when taken on the surrounding objects. In our work, we take the egocentric view of the scene, and aim to reason about action-object affordances that respect both the physical world as well as the social norms imposed by the society. We also aim to teach artificial agents why some actions should not be taken in certain situations, and what would likely happen if these actions would be taken. We collect a new dataset that builds upon ADE20k, referred to as ADE-Affordance, which containing annotations enabling such rich visual reasoning. We propose a model that exploits Graph Neural Networks to propagate contextual information from the scene in order to perform detailed affordance reasoning about each object. Our model is showcased through various ablation studies, pointing to successes and challenges in this complex task.

Introduction: Beyond Functional Affordance

In computer vision, "affordance" traditionally refers to the functional potential of an object—a chair is for sitting, a handle is for grasping. However, for a robot to navigate the human world, functional knowledge isn't enough. It needs to understand context-dependent constraints, such as physical obstacles (sitting on an occupied chair), social norms (running in a classroom), and legal/social prohibitions (grasping someone else's bag).

Examples of affordance reasoning in the ADE-Affordance dataset, showing predicted relationships, explanations, and consequences for actions like sitting and grasping.

This research moves beyond simple binary affordance reasoning to ask if an action is appropriate or safe right now. By introducing the ADE-Affordance dataset and a Spatial Gated Graph Neural Network (GGNN), the authors enable AI agents to predict not just the physical possibility of an action, but also the social norms and potential consequences of acting in a specific context.

Methods: Spatial Reasoning with Graph Neural Networks

The authors propose the Spatial GGNN to perform visual reasoning by treating a scene as a graph where each node represents an object instance.

  1. Graph Construction: Edges are created between objects that are spatially adjacent, capturing the topological structure of the scene.
  2. Feature Encoding: Nodes are initialized with object class information and visual features extracted via a ResNet-50, combining local object crops with a global scene view.
  3. Message Passing: The GGNN iteratively updates node states by aggregating information from neighbors. This allows the model to "realize," for example, that a chair is unavailable because a neighboring "person" node is already occupying it.
  4. Multi-Head Output: The final node states feed into three branches: a Relationship Classifier for action-object categorization, an Explanation Generator (LSTM) for natural language reasoning, and a Consequence Generator to predict outcomes.

The ADE-Affordance Dataset

To support this task, the authors introduced the ADE-Affordance Dataset, built on the ADE20k benchmark. It contains 20,000 images across 900 scene types, focusing on three elementary actions: sit, run, and grasp. Unlike previous datasets that treat affordances as static properties, this dataset marks specific instances as exceptions based on the surrounding scene. It includes 7 relationship categories and over 14,000 unique explanation/consequence sentence pairs.

Key Insights and Results

A core finding is that affordance is topological; spatial relationships are the primary drivers of social and physical exceptions. The GNN architecture excels at modeling these local dependencies compared to standard CNNs.

Exception signatures for various objects, showing how context dictates the type of affordance violation (e.g., roads being dangerous, chairs being physical obstacles).

The paper also identifies "social signatures" for different objects. For example, "Roads" frequently trigger "Dangerous" exceptions for running, while "Chairs" often trigger "Physical Obstacle" or "Socially Forbidden" exceptions.

Performance Metrics: * The Spatial GGNN outperformed all baselines in relationship prediction. On the mAcc-E metric, it achieved 0.461 for the action sit, significantly beating a Unary model (0.428) and a Knowledge Base-only baseline (0.281). * Ablation studies confirmed that while object class is the most critical feature, spatial graph propagation provides a vital performance boost. * Qualitatively, the model successfully generated nuanced explanations, such as identifying a floor as "not for sitting" because it's in a living room where furniture is available.

Conclusion and Future Work

While the model shows promise for Explainable AI (XAI) in robotics, several challenges remain. The diversity of generated language is currently limited by the dataset size. Furthermore, the model's performance is heavily dependent on high-quality instance segmentation; using predicted masks instead of ground-truth masks leads to a significant drop in accuracy. Future work will aim to expand the action vocabulary beyond sit, run, and grasp to encompass a broader range of human activities.

Summary updated

BibTeX
@inproceedings{chuang2018learning,
  author = {Ching-Yao Chuang and Jiaman Li and Antonio Torralba and Sanja Fidler},
  title = {{Learning to Act Properly: Predicting and Explaining Affordances From Images}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2018},
  url = {https://openreview.net/forum?id=BkVycaWdZB},
}
Figure