And-Or Graphs for Hierarchical Compositional Modeling

214 concepts165 papers1 proposal

The visual world is a masterclass in variation. Consider a simple object category like a horse: it can be standing, galloping, or bucking; viewed from the front or the side; and its individual limbs can move independently into countless configurations. If a computer vision system attempts to model this category using a single, rigid template for every possible global appearance, it quickly encounters a combinatorial explosion. The number of templates required to capture every permutation of pose, viewpoint, and style scales exponentially, making flat representations computationally intractable and data-inefficient.

To bypass this bottleneck, a powerful paradigm treats objects not as monolithic patterns, but as recursive, grammatical structures. By decomposing complex entities into a multi-level hierarchy of shared, reusable parts, Hierarchical Compositional Modeling provides a mathematically elegant solution to the problem of visual variance. At the heart of this approach is the And-Or Graph (AOG), a framework that models both how parts assemble into wholes and how those parts can vary.


The Core Mechanism: AND and OR Nodes

An And-Or Graph represents an object category as a directed, hierarchical network that alternates between two distinct types of logical operations:

  • AND Nodes (Composition): These nodes represent the deterministic assembly of smaller components into a larger whole. For example, an AND node for a "human body" dictates that it must be composed of a head, a torso, arms, and legs, arranged according to specific geometric and spatial constraints. As Seyoung Park et al. demonstrate, these nodes capture both the structural breakdown of an entity and the kinematic dependencies between its components.
  • OR Nodes (Variation/Choice): These nodes represent structural choices, alternative configurations, or different viewpoints. An OR node for a "torso" might branch into several alternative sub-nodes: a torso wearing a jacket, a torso wearing a t-shirt, or a torso viewed from a $45^\circ$ angle.
                [ Human Body ] (AND)
               /      |       \
              /       |        \
      [ Head ]    [ Torso ]     [ Legs ]
                   (OR)
                  /    \
                 /      \
     [ With Jacket ]   [ With T-Shirt ] (AND)

By embedding these choice points directly into the hierarchy, a single model can reconfigure its topology dynamically. Yuanhao Chen et al. show that incorporating choice nodes enables a compact set of reusable components to represent millions of distinct topological variations and articulated poses. Instead of maintaining separate models for every variation, the grammar absorbs the variance internally. As a result, a stochastic grammar can represent diverse object appearances within a unified probabilistic framework, a property leveraged by Long Zhu et al. to learn object structures without manual supervision.


Why It Works: Part Sharing and Combinatorial Efficiency

The fundamental reason hierarchical compositional modeling works so well boils down to reusability. In a flat model, learning a new pose or a new sub-category requires entirely new data and parameters. In a hierarchical model, different configurations share the exact same lower-level sub-components.

Data Efficiency via Part Sharing

Ross B. Girshick et al. demonstrate that decomposing objects allows individual part models to be shared across completely different global configurations and visibility patterns. For instance, the visual model for a "wheel" can be trained once and reused across models for sedans, trucks, and bicycles. This shared vocabulary dramatically increases data efficiency: a single part detector functions within multiple higher-level contexts, meaning the system requires far fewer training examples to achieve robust generalization.

Generalization to Unseen Configurations

Because the model operates on a modular vocabulary of parts, it can recognize or synthesize global configurations it has never encountered before. Jiongxin Liu shows that by maintaining exemplars at every level of a part hierarchy, a system can synthesize novel global poses by recombining plausible local configurations—such as pairing a known leg orientation with a rare arm position. This combinatorial power allows the model to break free from the limitations of its training distribution.

Cross-Category Efficiency

The benefits of part sharing extend beyond a single object class. Abram L. Friesen et al. demonstrate that sharing sub-parses across entirely different object categories yields massive gains in computational and memory efficiency. The system does not need to relearn basic geometric primitives or functional parts for every new category it encounters; it simply learns a new way to compose its existing vocabulary.


Taming Inference Complexity

Searching through millions of potential part combinations in an image sounds like a recipe for computational disaster. If every part could be anywhere, the search space would explode exponentially. Hierarchical compositional modeling avoids this trap by enforcing top-down and bottom-up constraints simultaneously.

  Top-Down Context       [ Expected Object Structure ]
  (Prunes Search)                     |
                                      v
                              Message Passing
                                      ^
                                      |
  Bottom-Up Cues         [ Primitive Image Features ]
  (Proposes Parts)

Inference typically relies on bi-directional message passing or dynamic programming over the graph structure. Bottom-up cues (like edge fragments or local textures) propose candidate locations for low-level parts. Meanwhile, top-down structural constraints prune the search space by dictating where parts should be relative to one another.

Leo Zhu et al. show that this bi-directional architecture allows a compositional system to detect complex, deformable objects in cluttered scenes in fractions of a second—orders of magnitude faster than traditional flat graphical models. By grounding the hierarchy in primitive image features and using the "summarization principle" at OR nodes, the algorithm maintains polynomial complexity where flat methods face exponential explosions (Yuanhao Chen et al.).


Beyond Images: A Universal Structural Language

The intuition behind And-Or graphs and hierarchical decomposition is not restricted to 2D image parsing; it serves as a general framework for structural reasoning across diverse domains.

3D Shape Programs and CAD

The same principles that govern 2D part assembly apply to 3D geometry. Boyang Deng et al. decompose 3D shapes into a two-level hierarchy where a geometry level defines unique, repeatable parts via latent vectors and a pose level determines their spatial occurrences. Similarly, in computer-aided design (CAD), Xiang Xu et al. structure boundary representations as hierarchical trees, ensuring that lower-level geometric details (like edges and vertices) remain logically and spatially constrained by higher-level components (like faces and solids).

Physical Dynamics

When simulating physical interactions, treating an object as a flat collection of independent particles often causes simulations to drift or fall apart. To preserve structural integrity, Amaury Wei introduces hierarchical combinatorial complexes that organize points, edges, and faces into higher-order cells representing the entire body. This hierarchical constraint forces the neural network to respect the global cohesion of a rigid body during simulation.

Symbolic and Generative Systems

Hierarchical compositionality also bridges the gap between deep learning and symbolic reasoning. For example, Yuyi Zhang et al. decompose complex Chinese characters into hierarchical binary trees of radicals and layouts, enabling zero-shot recognition of unseen characters by analyzing their compositional logic. On the generative side, Tianfu Wu et al. demonstrate that by applying sparsity constraints to standard generator networks, neural models can be forced to induce an explicit, interpretable image grammar, organizing pixels into a structured hierarchy of primitives, parts, and scenes.

Ultimately, hierarchical compositional modeling works because it mirrors the structure of the physical world. By organizing knowledge into a recursive network of parts (AND) and choices (OR), these models achieve a rare combination of data efficiency, computational tractability, and structural interpretability.

History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_hierarchical_compositional_modeling_99a766fa,
  title = {hierarchical compositional modeling},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/hierarchical-compositional-modeling/rdr_99a766fa235d496ab0d9748afdd4abfb},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-24},
}

This exact version (version 1, frozen text):

@misc{lacuna_hierarchical_compositional_modeling_99a766fa_v1,
  title = {hierarchical compositional modeling},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/hierarchical-compositional-modeling/rdr_99a766fa235d496ab0d9748afdd4abfb/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-24},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake