HindSight: A Graph-Based Vision Model Architecture For Representing Part-Whole Hierarchies

arXiv:2104.03722 · cs.CV, cs.AI, cs.LG · Submitted 2021-04-08 · Read on arXiv

Listen

Radio episode about this paper

Transcript

Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.

Tom: We're looking at the paper: "HindSight: A Graph-Based Vision Model Architecture For Representing Part-Whole Hierarchies".

Paper summary: Tom: We talked about the core concept of HindSight: encoding images as graphs to capture part-whole hierarchies using patches at different levels as nodes >. It’s trying to build a rich graph representation that encompasses that hierarchical information >.

Jane: Exactly, and they claim this approach enables the model to learn those relationships between objects and their parts, which is hard when scales vary so much in images >. They suggest using self-supervised training techniques to make this work as a general purpose vision encoder for tasks like classification or object detection >.

Lu: The paper argues that instead of relying on huge labeled datasets for every part-whole combination, you can train a single model that learns these hierarchies from the image itself >. It proposes learning individual representations of objects and their parts separately, which is a key challenge they tackle >.

Meng: But how they manage those different scales, as I asked, is crucial when you think about real data where things look wildly different in size >. What’s the mechanism for handling that scale issue in this graph setup?

Tom: They address this by suggesting that standard CNNs can get a little robustness to scale invariance through skip connections, but they admit that objects and parts usually have very different scales, which makes it worse >. So, they need a way to train on a huge labeled dataset of objects and their parts together to learn both sets of filters >.

Jane: That sounds like the necessary data requirement you mentioned earlier—a huge dataset containing images of both the whole object and its parts >. Does this mean the model has to be trained on that kind of massive paired data from the start?

Lu: Well, they suggest a single model can be constructed to achieve this goal >. They're looking at how information between different levels and adjacent locations propagates until it settles into clusters, where high-level representations for distinct objects converge in patches and low-level ones for parts of the same object >. This is what GLOM represented >.

Meng: That clustering idea sounds like a way to organize the learned knowledge, but how do you measure that convergence between those levels? Is there a specific loss function they use?

Tom: The paper focuses more on the architecture and how it propagates information, suggesting that this information flow through the graph is what learns the part-whole hierarchies >. It doesn't really get into deep loss function specifics in this summary >.

Jane: So, for someone just listening, it sounds like they are proposing a framework where images are broken down hierarchically, and the structure of how those parts connect across levels is what teaches the model about objects >.

Lalam: I'm confident that the core idea here is using this graph structure to enforce learning those hierarchies because it forces the connections between patches to form meaningful clusters based on what they represent >. It’s pretty sure this direction will be valuable for representation learning >.

Conclusion: Tom: So, looking at "HindSight: A Graph-Based Vision Model Architecture For Representing Part-Whole Hierarchies," the authors are proposing this graph-based approach as a way to encode part-whole hierarchies in images >. They’re building a model that uses patches and a fully connected graph structure for learning those relationships >.

Jane: And the implication is that this architecture could serve as a general purpose vision encoder, meaning it can be used across many different computer vision tasks after being trained correctly >. It’s about making the representation itself richer >.

Lu: The main thing to remember is that they are focusing on how to learn those hierarchies from images using a self-supervised training setup, which is a solid way to build a model without needing massive labeled datasets for every part-whole combination >.

Meng: From an engineering view, the main challenge remains making sure this system can run efficiently at scale when you move it out of the lab and onto real traffic >. The complexity of those attention layers needs to be managed properly on production hardware >.

Tom: So, the authors are building a model architecture that uses patches and graph nodes to learn structural relationships within images, which is a significant step toward models that are more structurally aware of visual data >.

Jane: It’s about moving beyond just recognizing objects to understanding how those objects are actually composed >. That's the bigger picture they're aiming for with HindSight >.

cs.CV, cs.AI, cs.LG

Submitted: 2021-04-08

Updated: 2026-11-24

License: http://creativecommons.org/licenses/by/4.0/

Importance score: 65/100

The gist: This paper presents a model architecture for encoding the representations of part-whole hierarchies in images in form of a graph.<ref:2104.03722#pg1…

Key concepts

Graph Representation
The image is broken into patches of varying scales, which are then treated as nodes in a fully connected graph. This structure helps the model learn how different image parts relate to each other, capturing the part-whole hierarchy within the visual data.
Patch Generator
This module takes an image and breaks it down into patches at different levels. It uses techniques like Static Regular Grids or Dynamic Grid Projection to generate these patches efficiently, allowing the model to explore multiple hierarchical levels without creating an exponentially large number of patches.
Attention Graph Module
This component uses a transformer-like mechanism where the patch features act as tokens. It allows the model to explore relationships between patches at different levels (inter-level and intra-level), refining the overall graph representation by understanding global structure and local details.

Terminology

Summary

This paper presents a model architecture for encoding the representations of part-whole hierarchies in images in form of a graph. p. 0

Where the paper says it

rafae@gmail. com ABSTRACT This paper presents a model architecture for encoding the representations of part-whole hierarchies in images in form of a graph.

<ref:2104.03722#pg1, This paper presents a model architecture for encoding the representations of part-whole hierarchies in images in form of a graph>. p. 0
Where the paper says it

rafae@gmail. com ABSTRACT This paper presents a model architecture for encoding the representations of part-whole hierarchies in images in form of a graph.

The idea is to divide the image into patches of different levels and then treat all of these patches as nodes for a fully connected graph. p. 0
Where the paper says it

com ABSTRACT This paper presents a model architecture for encoding the representations of part-whole hierarchies in images in form of a graph. The idea is to divide the image into patches of different levels and then treat all of these patches as nodes for a fully connected graph.

<ref:2104.03722#pg1, The idea is to divide the image into patches of different levels and then treat all of these patches as nodes for a fully connected graph>. p. 0
Where the paper says it

com ABSTRACT This paper presents a model architecture for encoding the representations of part-whole hierarchies in images in form of a graph. The idea is to divide the image into patches of different levels and then treat all of these patches as nodes for a fully connected graph.

This enables us to learn a rich graph representation of the image that encompasses the inherent part-whole hierarchical information. p. 0
Where the paper says it

A dynamic feature extraction module is used to extract feature representations from these patches in each graph iteration. This enables us to learn a rich graph representation of the image that encompasses the inherent part-whole hierarchical information.

<ref:2104.03722#pg1, A dynamic feature extraction module is used to extract feature representations from these patches in each graph iteration >. p. 0
Where the paper says it

The idea is to divide the image into patches of different levels and then treat all of these patches as nodes for a fully connected graph. A dynamic feature extraction module is used to extract feature representations from these patches in each graph iteration.

Utilizing proper self-supervised training techniques, such a model can be trained as a general purpose vision encoder model which can then be used for various vision related downstream tasks (e. p. 0
Where the paper says it

This enables us to learn a rich graph representation of the image that encompasses the inherent part-whole hierarchical information. Utilizing proper self-supervised training techniques, such a model can be trained as a general purpose vision encoder model which can then be used for various vision related downstream tasks (e.

g., Image Classification, Object Detection, Image Captioning, etc. p. 0
Where the paper says it

Utilizing proper self-supervised training techniques, such a model can be trained as a general purpose vision encoder model which can then be used for various vision related downstream tasks (e. , Image Classification, Object Detection, Image Captioning, etc.

).<ref:2104.03722#pg1, This enables us to learn a rich graph representation of the image that encompasses the inherent part-whole hierarchical information >. p. 0
Where the paper says it

A dynamic feature extraction module is used to extract feature representations from these patches in each graph iteration. This enables us to learn a rich graph representation of the image that encompasses the inherent part-whole hierarchical information.

Pruning redundant reasoning tokens

The main goal of HindSight is to create a model with the capacity to represent images in form of a graph which encompasses part-whole hierarchies and the structural relationships (both inter-objects and intra-object) present in the images.<ref:2104.03722#pg3, In order to learn the part-whole hierarchies, first the individual representations of objects (whole) and their parts have to be learned by a model >. p. 2

Where the paper says it

3 Basic Intuition The main goal of HindSight is to create a model with the capacity to represent images in form of a graph which encompasses part-whole hierarchies and the structural relationships (both inter-objects and intra-object) present in the images. In order to learn the part-whole hierarchies, first the individual representations of objects (whole) and their parts have to be learned by a model.

The issue in learning their representations together is that there is a large difference in scale between the objects and their parts. p. 2
Where the paper says it

In order to learn the part-whole hierarchies, first the individual representations of objects (whole) and their parts have to be learned by a model. The issue in learning their representations together is that there is a large difference in scale between the objects and their parts.

<ref:2104.03722#pg3, The model should be able to recognize objects in multiple scales since the same object can be of different scale in different images >. p. 2
Where the paper says it

The issue in learning their representations together is that there is a large difference in scale between the objects and their parts. The model should be able to recognize objects in multiple scales since the same object can be of different scale in different images.

Since almost all of our current state of the art model architectures are neither scale invariant nor do they capture the inherent structural relationship between objects and parts, hence the only method available to learn individual representation of objects as well as individual representation of their parts is to train a model on a huge labelled dataset comprising of objects and their parts. p. 2
Where the paper says it

For example, a car tyre in (A) a highway full of cars, (B) an individual car and (C) a close-up of single car tyre. Since almost all of our current state of the art model architectures are neither scale invariant nor do they capture the inherent structural relationship between objects and parts, hence the only method available to learn individual representation of objects as well as individual representation of their parts is to train a model on a huge labelled dataset comprising of objects and their parts.

<ref:2104.03722#pg3, A single model can be constructed to achieve this >. p. 2
Where the paper says it

This would enable us to train a model that can work on multiple scales without worrying about which scale the given input image belongs too. A single model can be constructed to achieve this.

How the training signal is built

The most straightforward method to train the model would be to use a supervised learning task of Image Classification using a sufficiently large dataset (like JFT-300M), which would require a large amount of computational resources.<ref:2104.03722#pg6>. A better approach to train HindSight would be to implement it as an image encoder for a pretext task in a self-supervised setting. p. 9

Where the paper says it

Size of dataset used in supervised training is also limited since it requires careful labelling by humans. Hence, a better approach to train HindSight would be to implement it as an image encoder for a pretext task in a self-supervised setting.

<ref:2104.03722#pg6>. As shown in Figure 5, it is first suggested to select uniformly at random any level k. p. 9
Where the paper says it

During self-supervised training, the model would have to predict contents of masked out regions in an image. As shown in Figure 5, it is first suggested to select uniformly at random any level k > 1 and then mask out the regions that 1/4 10

<ref:2104.03722#pg1>. This variation in masking at different levels would encourage the model to learn the part-whole hierarchies of objects and the inherent structural relationship between them. p. 2
Where the paper says it

We can then use a graph neural network to refine these node representations and learn the inherent structural relationship between objects and their parts. Another benefit of creating multiple levels of patches versus only a single grid is that they would enable model to converge to an understanding about the whole image in fewer graphs iterations, this is explained by the following example.

<ref:2104.03722#pg6>.

Where the gains come from

The model architecture consists of five main modules as shown in Figure 2.<ref:2104.03722#pg5>. The Patch Generator takes the image as input and breaks the image into patches of different levels. p. 4

Where the paper says it

Figure 2: HindSight - Model Architecture. Patch Generator takes the image as input and breaks the image into patches of different levels.

<ref:2104.03722#pg5, The final feature vectors are used as nodes for a fully connected graph using MHA (Multi-Head Attention) architecture for message passing between the nodes >. p. 4
Where the paper says it

Information about position (x and y coordinates) and area coverage of each patch is then added to form the final feature vector. The final feature vectors are used as nodes for a fully connected graph using MHA (Multi-Head Attention) architecture for message passing between the nodes.

The most important variables of the model architecture are k (number of patch levels and feature extractors), N (number of attention graph layers), dmodel (size of latent dimension) and H (size of re-scaled image patch). p. 4
Where the paper says it

The final graph representation can be used for various vision related tasks like Image Classification, Object Detection, Set Detection, Image Captioning, Visual Question Answering, Scene Graph Generation etc. The most important variables of the model architecture are k (number of patch levels and feature extractors), N (number of attention graph layers), dmodel (size of latent dimension) and H (size of re-scaled image patch).

<ref:2104.03722#pg6>.

The Patch Generator takes the image as input and breaks the image into patches of different levels.<ref:2104.03722#pg6>. Static Regular Grids is a simple technique that can be applied to square images with input dimensions IxI. p. 4

Where the paper says it

Dynamic Grid Generation techniques are discussed in Section 5. Static Regular Grids This simple technique can be applied to square images with input dimensions IxI.

<ref:2104.03722#pg6>. The patch generation process consists of simply projecting a grid of 1, 4, 16, 64, and 256 squares for each level k. p. 4
Where the paper says it

The patch generation process consists of simply projecting a grid of {1, 4, 16, . , 4 k−1} squares for each level k and then re-scaling all the resulting patches into same dimension of HxH.

<ref:2104.03722#pg6, All of these patches are then concatenated to get the first output of this module >. p. 5
Where the paper says it

In this example, H = 64 and hence all the resulting patches are re-scaled to 64x64 (where 64x64 is also the k th level patch dimension). All of these patches are then concatenated to get the first output of this module.

The overall number of patches (P) grow exponentially with number of levels. p. 5
Where the paper says it

All of these patches are then concatenated to get the first output of this module. The overall number of patches (P) grow exponentially with number of levels.

<ref:2104.03722#pg6>.

The Dynamic Grid Projection method allows us to explore more levels without the exponential growth in number of patches.<ref:2104.03722#pg9>. This method allows us to explore more levels without the exponential growth in number of patches. p. 9

Where the paper says it

Figure 4 is an examples of grid generation using this method, here the number of patches is equal to number of patches in the static grid generator (Figure 3) however we have allowed the model to explore one more level (i. This method allows us to explore more levels without the exponential growth in number of patches.

<ref:2104.03722#pg9>. Constructing a Quadtree with whole image as the first node and divide the node into 4 child nodes by dividing the image patch into 4 equal patches is how this algorithm works. p. 9
Where the paper says it

P (number of overall patches) is related to D by the following simple equation: P = 1 + 4D The algorithm for dynamic grid generation is quite straightforward. Construct a Quadtree with whole image as the first node and divide the node into 4 child nodes by dividing the image patch into 4 equal patches.

<ref:2104.03722#pg9>.

The Multi-Feature Extractor generates k many feature vectors from each given patch of image.<ref:2104.03722#pg6>. Hence, the suggested backbone to achieve this is a CNN. p. 6

Where the paper says it

Sub-Module The key property that should be present in the sub-module is translation in-variance. Hence, the suggested backbone to achieve this is a CNN.

p. 6
Where the paper says it

Sub-Module The key property that should be present in the sub-module is translation in-variance. Hence, the suggested backbone to achieve this is a CNN.

<ref:2104.03722#pg6>. The output of this module is simply a concatenation of the outputs of all these sub-modules and is denoted as Multi-Feature Vector (MFV). p. 6
Where the paper says it

k many architecturally identical sub-modules are created with independent parameter weights. The output of this module is simply a concatenation of the outputs of all these sub-modules and is denoted as Multi-Feature Vector (MFV).

<ref:2104.03722#pg6>. Hence, the suggested backbone to achieve this is a CNN.<ref:2104.03722#pg6, Let FV (j) in R dmodel denote the j-th Feature Vector in Multiple Feature Vector (MFV) such that for each patch: MFV = [F V (1), F V (2),. p. 6
Where the paper says it

Layer Dimensions Filters/Channels Input 64 x 64 3 Conv (5,5) 60 x 60 32 Conv (5,5) 56 x 56 32 MaxPool (2,2) 28 x 28 32 Conv (3,3) 26 x 26 64 Conv (3,3) 24 x 24 64 MaxPool (2,2) 12 x 12 64 Conv (3,3) 10 x 10 128 Conv (3,3) 8 x 8 128 Conv (3,3) 6 x 6 128 MaxPool (2,2) 3 x 3 128 Conv (3,3) 1 x 1 256 The idea is that each sub-module would learn a different representation of the patch. Let F V (j) ∈ Rdmodel denote the j-th Feature Vector in Multiple Feature Vector (MFV).

.., F V (k)] >.

The Dynamic Feature Aggregator provides a mechanism to query the multiple feature representations and receive an Aggregated Feature Vector (AFV) for each patch.<ref:2104.03722#pg8>. If GQ is not provided, it is initialized as a zero vector (0 dmodel). p. 6

Where the paper says it

The module takes the MFV as input by default, an additional input of Graph-Query (GQ ∈ Rdmodel ) is provided inside the Attention Graph Module. If GQ is not provided, it is initialized as a zero vector (0 dmodel ).

<ref:2104.03722#pg8>. All k feature vectors in MFV (from Multi-Feature Extractor) along with GQ (from Attention Graph) are passed through the same feed-forward network. p. 6
Where the paper says it

If GQ is not provided, it is initialized as a zero vector (0 dmodel ). The whole module can be described as: ηgq = ReLu(W1GQ + b1) η (j) 1 = ReLu(W2,fvF V (j) + W2,gqηgq + b2) η (j) 2 = W3η (j) 1 + b3 C (j) = exp(η (j) 2 ) Pk i=1 exp(η (i) 2 ) AF V = X k j=1 C (j)F V (j) All k feature vectors in MFV (from Multi-Feature Extractor) along with GQ (from Attention Graph) are passed through the same feed-forward network.

<ref:2104.03722#pg8>.

The Position and Scale Encoder provides each patch a sense of its location and coverage with respect to the overall image.<ref:2104.03722#pg8, The vector M is first transformed into an Encoding Vector (EV) and then added to AFV, the result is denoted by Final Feature Vector (FFV) >. p. 7

Where the paper says it

4 Position and Scale Encoder The purpose of this module is to provide each patch a sense of its location and coverage with respect to the overall image. In this module, the vector M is first transformed into a Encoding Vector (EV) and then added to AFV, the result is denoted by Final Feature Vector (FFV).

Non-Trainable Periodic Encoding is a popular encoding technique which is implemented using sine and cosine functions. p. 7
Where the paper says it

Due to only a few number of unique values of each variable, this method may find it difficult to inter/extrapolate for previously unseen values using testing. Non-Trainable Periodic Encoding Another popular encoding technique which is implemented using sine and cosine functions is also applicable here.

<ref:2104.03722#pg8, EV var(node, 2i) = sin(var node \lambda i/dmodel) where i ranges from 0 to (pre-determined encoding dimension)/2 for that given var and \lambda is a hyper-parameter >. p. 7
Where the paper says it

Here EV is given by concatenating [EV x , EV y , EV area]. Where EV for each variable (var) is defined as: EV var (node,2i) = sin(varnodeλ i/dmodel ) EV var (node,2i+1) = cos(varnodeλ i/dmodel ) Where i ranges from 0 to (pre-determined encoding dimension)/2 for that given var and λ is a hyper-parameter.

This method allows the model to better interpolate the unseen values encountered during testing. p. 7
Where the paper says it

Non-Trainable Periodic Encoding Another popular encoding technique which is implemented using sine and cosine functions is also applicable here. Because of its continuous nature, it should allow the model to better interpolate the unseen values encountered during testing.

<ref:2104.03722#pg8, The resultant vector is then added to AFV >. p. 7
Where the paper says it

A simple way to remedy this is to first construct an intermediate encoding vector by using the non-trainable periodic encoding method and then pass the it through a small feed-forward network. The resultant vector is then added to AFV.

The Attention Graph module explores the relationship between patches (both inter-level and intra-level) and refine the overall graph representation of the image.<ref:2104.03722#pg9, The module can be constructed using any GNN mechanism, however recent research has demonstrated great performance of transformers for vision tasks >. p. 8

Where the paper says it

5 Attention Graph The purpose of this module is to explore the relationship between patches (both inter-level and intra-level) and refine the overall graph representation of the image. The module can be constructed using any GNN mechanism, however recent research (Dosovitskiy et al.

Hence, the transformer encoder module is proposed for this task with a small modification as shown in Figure 2. p. 8
Where the paper says it

[2021]) has demonstrated great performance of transformers for vision tasks. Hence, the transformer encoder module is proposed for this task with a small modification as shown in Figure 2.

<ref:2104.03722#pg9, The inputs (FFVs) are used as tokens for the Multi-Head Attention module >. p. 8
Where the paper says it

Hence, the transformer encoder module is proposed for this task with a small modification as shown in Figure 2. The inputs (FFVs) are used as tokens for the Multi-Head Attention module, the outputs from the MHA (after residual connection and layernorm) are then used as Graph-Query (GQ) to the Dynamic Feature Aggregator.

The outputs from the MHA (after residual connection and layernorm) are then used as Graph-Query (GQ) to the Dynamic Feature Aggregator. p. 8
Where the paper says it

Hence, the transformer encoder module is proposed for this task with a small modification as shown in Figure 2. The inputs (FFVs) are used as tokens for the Multi-Head Attention module, the outputs from the MHA (after residual connection and layernorm) are then used as Graph-Query (GQ) to the Dynamic Feature Aggregator.

<ref:2104.03722#pg9, This small modification allows model to explore and utilize the multiplicity of Multi-Feature Extractor >. p. 8
Where the paper says it

The returned FV is concatenated to the MHA output and passed through the feedforward network. This small modification allows model the to explore and utilize the multiplicity of Multi-Feature Extractor.

The resulting refined graph, each node would contain the information about its own content, how is it related to the overall global structure and what finer details can be found within it. p. 9
Where the paper says it

So even if the original node representation of a patch may not exactly encompass the true representation of its contents and the complete context, this information (if it exists in the image) could always be gathered by querying the feature extractors or by interacting with other higher, same or lower level patches in the graph. In the resulting refined graph, each node would contain the information about its own content, how is it related to the overall global structure and what finer details can be found within it.

<ref:2104.03722#pg9>.

Green — the paper says it, and the page is printed. Red — no passage carries it, so treat that sentence as unverified. The same check runs on your own text: check a summary against its source, $5.

Improvements for AI systems

  1. The model can learn a rich graph representation of an image that encompasses part-whole hierarchical information by treating patches as nodes for a fully connected graph during dynamic feature extraction.

  2. The system can achieve better scale invariance by training on a huge labelled dataset comprising both objects and their parts, allowing the model to recognize objects in multiple scales without needing separate models for each scale.

  3. The improved system can process images of higher resolution without losing valuable information or fine details by implementing dynamic grid generation techniques to focus exploration on regions of high information content.

  4. The AI system can perform image classification, object detection, set detection, image captioning, and visual question answering by utilizing the final graph representation as input for downstream vision tasks.

Abstract

This paper presents a model architecture for encoding the representations of part-whole hierarchies in images in form of a graph. The idea is to divide the image into patches of different levels and then treat all of these patches as nodes for a fully connected graph. A dynamic feature extraction module is used to extract feature representations from these patches in each graph iteration. This enables us to learn a rich graph representation of the image that encompasses the inherent part-whole hierarchical information. Utilizing proper self-supervised training techniques, such a model can be trained as a general purpose vision encoder model which can then be used for various vision related downstream tasks (e.g., Image Classification, Object Detection, Image Captioning, etc.).

Sources

Related papers