Skip to content

About

final project : hierarchical multi-label text classification

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

Repository files navigation

Taxonomy-Aware GNN for Hierarchical Multi-Label Classification

This repository provides a pipeline for classifying Amazon product reviews into a large-scale taxonomy of 531 hierarchical classes.

1. Project Overview

The system enforces hierarchy by using balanced sampling, top-down LLM path selection, and bidirectional GNN propagation, achieving stable supervision over 531 taxonomy classes.


2. Requirements & Installation

Python 3.8+ is required.
All dependencies can be installed with:

pip install torch numpy tqdm openai sentence-transformers scikit-learn matplotlib

3. Running the Pipeline

If silver labels have not yet been generated, first set your OpenAI API key:

export OPENAI_API_KEY="your-api-key-here"

⚠️ Silver Label Caching (Reproducibility Notice)

To ensure cost efficiency and fast reproduction, this pipeline includes an automatic caching mechanism:

  • Cache Check: The script checks for teacher_1k.json in the project root.
  • Skip API Calls: If the file exists, all OpenAI API calls are skipped and the pipeline directly proceeds to GNN training using the cached silver labels.
  • No API Key Required: When cached labels are present, the full pipeline can run without an OpenAI API key.

This enables deterministic experiments while avoiding unnecessary API costs.

Run the full pipeline by executing the following command in your terminal:
python gnn_pipeline_final.py

4. Contact

For any questions or inquiries regarding this repository, please contact:

Jiyun Kim (김지연)
Email: kimjiyun138@gmail.com

About

final project : hierarchical multi-label text classification

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages