Human interaction is a complex dance of anticipation and response. When someone reaches out a hand, a person instantly categorizes the intent—is this a handshake, a high-five, or a push?—and reacts accordingly. For AI, however, predicting these reactions in real-time, known as "unconstrained online generation," has remained a significant hurdle. Traditional models often struggle with the ambiguity of early-stage movements and the physical drift that occurs over long sequences.
A new framework presented at ICLR 2025, Think-Then-React (TTR), introduces a "thinking" process for Large Language Models (LLMs) to better simulate these human-like social responses. By inferring intent through text before generating motion, TTR significantly improves the realism and coherence of AI-driven interactions.
The Challenge of Unconstrained Interaction
Generating a reaction to a human action is difficult because it is both unconstrained and online. In real-world scenarios, such as a robot interacting with a person, the AI does not have a pre-defined text prompt explaining the scene, nor does it know how the partner's action will conclude.
The researchers identified two primary challenges:
- Semantic Ambiguity: The initial frames of a handshake look nearly identical to the start of a high-five. Without understanding intent, models often pick the wrong reaction, leading to "accumulated errors" where the AI's movements become physically nonsensical over time.
- Complex Representation: LLMs are optimized for text, but representing multi-person motion requires tracking both how a body moves (egocentric pose) and where it is located in a shared environment (absolute space).
The Think-Then-React Pipeline
The core philosophy of TTR is that a model should understand why someone is moving before it decides how to respond. Instead of a direct motion-to-motion mapping, TTR employs a two-step inference process:
- Thinking: The model observes the input action and generates a textual description (e.g., "The person is reaching out for a handshake"). This serves as a semantic anchor.
- Reacting: Conditioned on this "thought," the model generates the corresponding reaction tokens.
- Re-thinking: To prevent the model from losing track of the interaction, it periodically "re-thinks" every few timesteps (approximately every 0.5 seconds), updating its understanding as the partner's action unfolds.
Decoupled Motion Tokenization
To enable an LLM (specifically Flan-T5-base) to process motion, the researchers developed a dual-tokenizer system that separates the "physics" of the body from the "geometry" of the social space.
- Egocentric Pose Tokenizer: Uses a Vector Quantized-Variational AutoEncoder (VQ-VAE) to turn 3D skeleton movements into discrete "pose tokens."
- Absolute Space Tokenizer: Encodes the 2D position ($x, z$) and orientation ($r$) into "space tokens."
By decoupling these elements, the model can learn how specific poses (like stepping forward) correlate with spatial changes without conflating the two, leading to more stable and physically grounded generations.
Training and Results
The model was trained using a multi-stage regimen on the Inter-X dataset, which contains ~9K action-reaction pairs with textual descriptions. It also utilized HumanML3D for pre-training to establish basic human kinematics.
Key findings from the evaluation include:
- Superior Realism: TTR achieved a Frechet Inception Distance (FID) of 1.942, a massive improvement over the previous state-of-the-art, ReGenNet (3.988).
- Semantic Stability: The "thinking" stage proved vital. Without it, the FID score nearly doubled, suggesting that explicit semantic grounding is what prevents the model from generating irrelevant or "floaty" movements.
- The 0.5-Second Sweet Spot: Testing revealed that "re-thinking" every 4 tokens (approx. 0.5s) provides the best balance. Faster updates don't allow enough context for a coherent thought, while slower updates lead to disconnected reactions.
Conclusion
Think-Then-React demonstrates that for AI to interact naturally with humans, it needs more than just a mapping of physical coordinates; it needs a stream of consciousness. By giving LLMs the ability to reason about intent in real-time, TTR moves us closer to robots and digital avatars that can engage in the complex, nuanced social dance of human interaction.
Summary updated