Skip to main content
QUICK REVIEW

[Paper Review] Explaining Patterns in Data with Language Models via Interpretable Autoprompting

Chandan Singh, John X. Morris|arXiv (Cornell University)|Oct 4, 2022
Topic ModelingComputer Science14 citations
TL;DR

This paper introduces iPrompt, a method that uses a pre-trained language model to automatically generate human-interpretable natural language explanations for data patterns through iterative prompt generation and reranking. iPrompt outperforms human-written prompts on GPT-3 using only a smaller model (GPT-J), achieves high accuracy in explaining diverse datasets—including scientific and NLP tasks—and enables interpretable, generalizable prompts for downstream applications.

ABSTRACT

Large language models (LLMs) have displayed an impressive ability to harness natural language to perform complex tasks. In this work, we explore whether we can leverage this learned ability to find and explain patterns in data. Specifically, given a pre-trained LLM and data examples, we introduce interpretable autoprompting (iPrompt), an algorithm that generates a natural-language string explaining the data. iPrompt iteratively alternates between generating explanations with an LLM and reranking them based on their performance when used as a prompt. Experiments on a wide range of datasets, from synthetic mathematics to natural-language understanding, show that iPrompt can yield meaningful insights by accurately finding groundtruth dataset descriptions. Moreover, the prompts produced by iPrompt are simultaneously human-interpretable and highly effective for generalization: on real-world sentiment classification datasets, iPrompt produces prompts that match or even improve upon human-written prompts for GPT-3. Finally, experiments with an fMRI dataset show the potential for iPrompt to aid in scientific discovery. All code for using the methods and data here is made available on Github.

Motivation & Objective

  • To develop a method that automatically discovers and generates human-interpretable natural language explanations for patterns in data using pre-trained language models.
  • To address the limitation of existing autoprompting methods, which produce uninterpretable prompts, by enforcing semantic meaningfulness in generated explanations.
  • To enable the discovery of generalizable, transferable prompts that can be used across different LLMs and tasks.
  • To evaluate the method on diverse datasets, including synthetic, NLP, and scientific data, to demonstrate its robustness and utility.
  • To explore the potential of LLMs not just for prediction, but for scientific insight generation and data pattern explanation.

Proposed method

  • iPrompt uses a pre-trained language model to iteratively generate candidate natural language explanations (prompts) for a given dataset.
  • Each candidate prompt is evaluated via zero-shot inference on the dataset, and performance is measured using a running average of zero-shot loss.
  • The method employs a population-based search with diversity enforcement by ensuring each candidate starts with a different token to avoid local optima.
  • Prompts are generated using greedy decoding with temperature=1 and repetition penalties tuned per task (e.g., 2.0 for Math and NLI, 1.0 for sentiment).
  • A modified version of AutoPrompt is used to optimize prompt quality, with key changes: random position selection for edits, loss-based acceptance criteria, and support for special and non-English characters.
  • The final top-performing prompt is selected based on lowest average loss and minimum frequency (≥3 evaluations), ensuring stability and reliability.

Experimental results

Research questions

  • RQ1Can a pre-trained language model generate natural language explanations for data patterns that are both accurate and interpretable?
  • RQ2Can iPrompt discover prompts that outperform human-written prompts on downstream LLMs like GPT-3, despite using only a smaller model?
  • RQ3How well does iPrompt generalize across different data types, including synthetic, NLP, and scientific datasets?
  • RQ4To what extent can iPrompt’s generated explanations support scientific discovery, such as in fMRI or protein data analysis?
  • RQ5Can the generated prompts be audited and reused across different models and tasks due to their semantic clarity?

Key findings

  • On two of four classification datasets, iPrompt discovered a prompt that outperformed human-written prompts when used with GPT-3, despite only using the smaller GPT-J model for generation.
  • iPrompt achieved high accuracy in explaining ground-truth patterns across a diverse set of datasets, including mathematical operations, natural language inference, and sentiment classification.
  • The generated explanations were consistently interpretable, enabling human auditing and facilitating prompt transferability across different LLMs.
  • In scientific applications, iPrompt successfully extracted meaningful, spatially localized concepts from fMRI data, with brain maps showing smooth, clustered representations of concepts like 'material' and 'color'.
  • The method demonstrated strong generalization: individual voxel models in fMRI data achieved high prediction accuracy (correlation with measured responses), and concept localization was significantly more spatially coherent than random shuffling.
  • iPrompt’s performance was robust across multiple data types, including Swiss-Prot protein keywords and narrative speech fMRI data, indicating broad applicability.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.