LLM4PH / README.md
lihaogx's picture
Upload 12 files
9f50319 verified
|
Raw
History Blame Contribute Delete
2.26 kB

LLM4PH: Large Language Models as Topological Thinkers

This repository contains the benchmark code for our NeurIPS paper: "Large Language Models as Topological Thinkers: A Benchmark on Graph Persistent Homology".

Overview

LLM4PH is a comprehensive benchmark designed to evaluate the capabilities of Large Language Models (LLMs) in understanding and reasoning about topological concepts, specifically focusing on graph persistent homology.

Dataset

The benchmark consists of four difficulty levels of tasks:

llm4ph

Each level is designed to progressively challenge the model's understanding of topological concepts.

Code Structure

The codebase is organized as follows:

LLM4PH/
├── config.py           # Configuration settings for tasks and models
├── main.py            # Main entry point for running the benchmark
├── datasets/          # Dataset files for different difficulty levels
├── evaluate_code/     # Evaluation scripts and metrics
├── results/           # Directory for storing evaluation results
└── .env              # Environment variables for API keys (create if needed)

Key components:

  • config.py: Configure task parameters and model settings
  • main.py: Run the benchmark with specified configurations
  • evaluate_code/: Contains evaluation logic and scoring metrics
  • datasets/: Stores the benchmark datasets
  • results/: Output directory for evaluation results

Installation

Install dependencies:

pip install -r requirements.txt

Configuration

The benchmark can be configured through config.py:

  • Task configuration: Set difficulty levels and evaluation parameters
  • Model configuration: Choose between local and API-based models

API Key Setup

For closed-source models, create a .env file in the root directory:

touch .env

Add your API keys to the .env file:

OPENAI_API_KEY=your_key_here
ANTHROPIC_API_KEY=your_key_here

Usage

  1. Configure your desired task and model in config.py
  2. Run the benchmark:
python main.py

Citation

If you use this benchmark in your research, please cite our paper: