Home

Awesome

HINT

PyTorch implementation for the paper:

HINT: Hierarchical Neuron Concept Explainer, CVPR 2022.

We propose HIerarchical Neuron concepT explainer (HINT) to effectively build bidirectional associations between neurons and hierarchical concepts in a low-cost and scalable manner. HINT enables us to systematically and quantitatively study whether and how the implicit hierarchical relationships of concepts are embedded into neurons, such as identifying collaborative neurons responsible to one concept and multimodal neurons for different concepts, at different semantic levels from concrete concepts (e.g., dog) to more abstract ones (e.g., animal).

Pipeline

<p align="center"> <img src="figs/fig_central_illustration.png" width="100%" /> </p>

Dependencies

Run

Datasets

I put ImageNet dataset under /data/ImageNet_ILSVRC2012/

/data/ImageNet_ILSVRC2012/
    /ILSVRC2012_train
        /n07715103
            n07715103_8433.JPEG
            ...
        ...
    /val
        ILSVRC2012_val_00040001.JPEG
        ILSVRC2012_val_00040001.xml
        ...
    ...

I put it under /data/imagenet_sample_5000/

I put Pascal VOC dataset under /data/Pascal_VOC_dataset/VOCdevkit/VOC2007$ (the path name may seem wired...)

/data/Pascal_VOC_dataset/VOCdevkit/VOC2007
    /Annotations
        009279.xml
        ...
    /ImageSets
        /Layout
        /Main
        /Segmentation
    /JPEGImages
        009279.jpg
        ...
    /SegmentationClass
        001457.png
        ...
    /SegmentationObject
        009654.png
        ...

I put CUB-200-2011 dataset under /data/CUB-200-2011$

/data/CUB-200-2011
    /CUB_200_2011
        /attributes
        bounding_boxes.txt
        classes.txt
        image_class_labels.txt
        /images
            /001.Black_footed_Albatross
                Black_Footed_Albatross_0001_796111.jpg
                ...
            ...
        images.txt
        /parts
        README
        train_test_split.txt
    /segmentations
        /001.Black_footed_Albatross
            Black_Footed_Albatross_0001_796111.png
            ...
        ...
    attributes.txt
    README.txt

Results

Responsible neurons for hierarchical concepts

<p align="center"> <img src="figs/fig_responsible_neurons_for_hierarchical_concepts.png" width="100%" /> </p>

Object localization

<p align="center"> <img src="figs/fig_localization.png" width="100%" /> </p>

Contact

If you have any questions, please contact wangad@connect.hku.hk.