ZSL-KG is a general-purpose zero-shot learning framework with a novel transformer graph convolutional network (TrGCN) to learn class representation from common sense knowledge graphs.
This is the codebase for all the experiments mentioned in Zero-shot Learning with Common Sense Knowledge graphs.
The code is organized by task, namely:
intent_classification
fine_grained_entity_typing
object_classification
graph_utils
Refer to the individual directories (intent_classification
, fine_grained_entity_typing
, and object_classification
) to run the zero-shot experiments.
In the graph_utils
directory, we include example code to query and preprocess the 2-hop neighbourhood for the ImageNet classes from the conceptnetdb.
While the preprocessing the graph is relatively simple, setting up the initial ConceptNet database with the official guide could be time-consuming.
To easily reproduce our experiments, we're releasing the all the knowledge graph-related data for the experiments on google drive.
conda create --name zsl_kg python=3.7
conda activate zsl_kg
pip install -r zsl-kg-requirements.txt
You can go to the respective directory and run the experiments.
We include all the knowledge graph-related data for the experiments on google drive.
Please cite the following paper if you are using our framework.
@article{nayak:tmlr22,
Author = {Nayak, N. V. and Bach, S. H.},
Title = {Zero-Shot Learning with Common Sense Knowledge Graphs},
Journal = {Transactions on Machine Learning Research (TMLR)},
Year = {2022}}