Discovering Intrinsic Spatial-Temporal Logic Rules to Explain Human Actions

Chengzhi Cao, Chao Yang, Ruimao Zhang, Shuang Li

TL;DR

Researchers have developed a logic-informed framework that automatically discovers spatial-temporal rules to explain and predict human actions from raw trajectory data. By combining the interpretability of symbolic logic with the power of deep learning via an Expectation-Maximization (EM) algorithm, the model outperforms black-box approaches in predicting movements for pedestrians and NBA players.

What Problem Does This Paper Address?

Predicting human movement is a staple of modern AI, essential for everything from autonomous driving to sports analytics. However, most state-of-the-art models (like Graph Neural Networks or LSTMs) act as "black boxes"—they might predict where a person will go, but they cannot explain why.

Spatial-temporal trajectories of multiple entities.

The challenge lies in the gap between low-level data (raw GPS or XY coordinates) and high-level reasoning (intentions and environmental constraints). For instance, a basketball player doesn't just move randomly; they move because a defender is blocking their right side or because a teammate is open for a pass. Existing symbolic logic methods often struggle with noisy, irregularly spaced spatial-temporal data, while deep learning models lack the transparency needed for human experts (like coaches or safety engineers) to trust them.

Methods

The authors propose a logic-informed, knowledge-driven modeling framework. Instead of just mapping past coordinates to future ones, they introduce a set of spatial-temporal logic rules as latent variables.

The proposed logic-informed framework featuring rule generation and logic reasoning.
  1. Spatial-Temporal Predicates: The model uses "soft" predicates to describe relationships. These include static properties (e.g., is_carrying_ball), temporal relations (e.g., Before), and dynamic spatial relations (e.g., Left_of or In_front_of). Crucially, these are modeled as differentiable kernel functions, allowing the model to handle uncertainty in the data.
  2. The EM Learning Algorithm: Since the "true" rules governing a person's behavior aren't labeled in the data, the authors treat the rule set as a latent variable and solve it using an Expectation-Maximization (EM) approach:
  3. E-Step (Rule Generation): A Transformer-based rule generator proposes high-quality logic rules based on the observed trajectories.
  4. M-Step (Optimization): The model parameters and the rule generator are jointly optimized to maximize the likelihood of the observed actions.
  5. Logic Reasoning Evaluator: A log-linear model takes the discovered rules and uses them as features to calculate the probability of a specific action (like "shoot," "pass," or "turn around").

Datasets

The model was evaluated on three distinct types of data:

  • Synthetic Datasets: Used to verify if the algorithm could correctly recover known "ground truth" rules and weights from generated events.
  • Stanford Drone Dataset (SDD): A large-scale dataset of pedestrians, bikers, and cars on a university campus. Since SDD doesn't have explicit action labels, the authors encoded actions based on speed and orientation (e.g., "turn around").
  • NBA SportVU Dataset: Real-world tracking data from professional basketball games, including player trajectories and the ball's movement. This dataset provided complex, strategy-heavy scenarios with clear actions like "pass" or "shoot."

Key Insights and Ideas

  • Bridging the Symbolic-Neural Gap: The paper demonstrates that you don't have to choose between interpretability and performance. By treating logic rules as latent variables in a neural framework, the model gains the flexibility of deep learning while maintaining a human-readable output.
  • Rules as "Soft" Constraints: Unlike traditional logic, which is binary (True/False), this framework treats rules as probabilistic. This allows the model to handle the inherent "noisiness" of human behavior—people don't always follow the same rule 100% of the time.
  • Automatic Feature Engineering: Usually, experts have to manually define features for trajectory models. Here, the "Rule Generator" effectively automates this by discovering which spatial relationships (like being "defended by two players") are statistically significant for predicting the next action.

Key Results

The proposed model consistently outperformed several state-of-the-art baselines (including Y-Net and MID) across multiple metrics:

  • Trajectory Prediction: On the NBA dataset, the model achieved an Average Displacement Error (ADE) of 0.30 at 1.0s, significantly lower than Y-Net's 0.38.
  • Action Accuracy: In the SDD dataset, it achieved an F1 score of 0.59, outperforming the next best model (NSP-SFM at 0.58) and significantly beating standard deep learning approaches.
  • Qualitative Success: The model successfully "explained" NBA plays. For example, it generated rules like: “If Player A is defended by C and D, and Player B is to the left, then Player A passes to B.” This matches the actual logic of a basketball double-team.

Limitations and Future Work

While powerful, the framework currently relies on a predefined set of simple predicates (left, right, front, behind). Defining more complex or abstract predicates for different domains remains a manual task.

The authors also note that while the model understands spatial logic, it doesn't yet incorporate "hard" physical laws, such as the conservation of momentum or energy. Future work aims to integrate these physical constraints to make the trajectory predictions even more robust, especially in high-speed scenarios like autonomous driving.

Summary updated

BibTeX
@inproceedings{cao2023discovering,
  author = {Chengzhi Cao and Chao Yang and Ruimao Zhang and Shuang Li},
  title = {{Discovering Intrinsic Spatial-Temporal Logic Rules to Explain Human Actions}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=avuRopYsCg},
}
Figure