articulate-rules

Can large language models explain their own classification behavior?

https://github.com/danesherbs/articulate-rules

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.7%) to scientific vocabulary
Last synced: 8 months ago · JSON representation ·

Repository

Can large language models explain their own classification behavior?

Basic Info
  • Host: GitHub
  • Owner: danesherbs
  • License: mit
  • Language: Python
  • Default Branch: main
  • Size: 63.5 KB
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • Open Issues: 0
  • Releases: 0
Created about 2 years ago · Last pushed about 2 years ago
Metadata Files
Readme License Citation

README.md

Overview

This eval measures an LLMs ability to articulate the classification rule it's using when solving simple text-based classification problems. Specifically, it contains two categories of tasks:

| Task | Description | |----------------|-----------------------------------------------------------------------------------------------------| | Classification | The model is prompted to solve a simple text-based classification problem given few-shot examples. | | Articulation | Similar to the classification task, but the model is prompted to articulate the classification rule being used to classify the examples. |

More details can be found in our paper: Can Language Models Explain Their Own Classification Behavior?

Setup

To run our eval, please clone the OpenAI evals repo and follow the installation instructions.

Within the OpenAI evals repo, you can run the in-distribution variant of Articulate Rules with:

bash oaieval <model> articulate-rules.<task>.in-distribution.<rule>

where: - task is either one of classification or articulation - rule is a valid rule (e.g. contains_a_digit)

Similarly, the out-of-distribution variants can be run with:

bash oaieval <model> articulate-rules.<task>.out-of-distribution.<rule>.<attack>

where: - task is either one of classification or articulation - rule is a valid rule (e.g. contains_a_digit) - attack is a valid adversarial attack (e.g. SynonymAttackBehaviour)

The list of valid task, rule and attack combinations are defined in the Articulate Rules yaml file.

Customiziation

We've provided two scripts, scripts/create-eval.py and scripts/create-eval-spec.py, which allow you to create custom variants of our eval in the format of an OpenAI eval. This may be useful if you wish to increase the number of few-shot examples, for example. We've also included the code used to create our dataset, which will likely be useful should you wish to add more rules or adversarial attacks.

Owner

  • Name: Dane
  • Login: danesherbs
  • Kind: user
  • Location: Melbourne, Australia

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this work in your research, please cite it as follows."
authors:
  - family-names: "Sherburn"
    given-names: "Dane"
  - family-names: "Chughtai"
    given-names: "Bilal"
  - family-names: "Evans"
    given-names: "Owain"
title: "Can Language Models Explain Their Own Classification Behavior?"
version: 1.0.0
date-released: 2024-03-30
url: "https://github.com/danesherbs/articulate-rules"

GitHub Events

Total
  • Watch event: 1
  • Fork event: 1
Last Year
  • Watch event: 1
  • Fork event: 1

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 13
  • Total Committers: 2
  • Avg Commits per committer: 6.5
  • Development Distribution Score (DDS): 0.154
Past Year
  • Commits: 13
  • Committers: 2
  • Avg Commits per committer: 6.5
  • Development Distribution Score (DDS): 0.154
Top Committers
Name Email Commits
Dane d****s 11
Dane d****s@g****m 2

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Dependencies

requirements.txt pypi
  • backoff *
  • diskcache *
  • jupyter *
  • matplotlib *
  • openai ==0.28.1
  • pandas *
  • plotly *
  • python-dotenv *
  • tiktoken *
  • transformers *
  • typeguard *
  • wandb *