FFFF
Skip to content

Repository files navigation

IESTA - Ineffective-effective Style Transfer for Arguments

This repository is the code base for the paper "Improving Argument Effectiveness Across Ideologies using Instruction-tuned Large Language Models" Accepted at EMNLP2024 Findings.

Data Links

  • Generated effective arguments: [link]
    • Format: {ideology}_{model-type}_{n}shot{_steered}.jsonl (for example: conservative_chatgpt_0shot.jsonl)
      • 86BB ideology: refers to the target reader's ideology - it has one of these values: liberal or conservative
      • model-type: refers to the Instruction-tuned LLM used: either chatgpt or llamav2 referring to Llama-2-7b-chat-hf
      • n: refers to Zero- or One-shot prompting with values 0 or 1 resepctively
      • _steered: Empty if the LLM is not steered; otherwise it has the value of steered_meanl0.5 and steered_meanl0.2 where 0.5 and 0.2 refers to the $lambda$ value
  • Dismissed arguments list: [link]
  • Evaluation:[link]

Code Overview

1. Installation and Requirements

Install the required packages from the requirements file using pip install -r requirements.txt.

The code is a Python package that can be downloaded locally with the following command when you access the code folder locally: pip install .

2. General Structure

The main folder contains the following:

  • requirements.txt: contains all dependencies
  • pyproject.toml: contains the Python package information (e.g., version, dependencies, metadata)
  • LICENSE: MIT license
  • iesta: the python package that contains the main code for the paper (see below for more details)
  • data: contains the original and generated data
  • scripts and notebooks: execute the iesta code

3. Mapping Code to Paper Sections

PART I: Data Curation

  • Paper Section 3. Data and Appendix A: package:iesta.data
    • debateorg data exploration: iesta.data.debateorg.py [link]
    • From debateorg to IESTA: iesta.data.debateorg_processor.py [link]
    • Iesta to huggingface: iesta.data.huggingface_loader.py [link]
    • HuggingFace links: pending paper acceptance

PART II: Data Genration (ineffective -> effective)

  • Paper Section 5.1 Experiments: package:iesta.llms, iesta.evaluator
    • Steering the LLM: iesta.llms.steering.* [link] - Code taken from the Steering Vectors paper in the publication process.
    • ineffective-effective transfer using Zero- One-shot and steered LLMs: iesta.llms.generate.py [link ]
  • Paper Section 5.2 Experiments POSTPROCESSING: iesta.evaluator.generation_processor.py [link]

PART III: Evaluation

  • Paper Section 5.3 Automatic Evaluation: iesta.evaluator.evaluator.py [link]
  • Paper Section 6.1 LLM-Based Evaluation: notebooks/llm_evaluator.ipynb [link]
  • Paper Section 6.2 Human-Based Evaluation: notebooks/human_evaluation.ipynb [link]

APPENDIX

  • Appendix B. Style Analysis: package:iesta.data, iesta.stats
    • Features extraction: iesta.data.feature_extraction.py [link]
    • Style features significance:iesta.data.feature_score.py [link]
    • Style feature score: iesta.stats.significance.py [link]

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages

0