rbroc / echo

A Scalable and Explainable Approach to Discriminating Between Human and Artificially Generated Text
https://cc.au.dk/en/clai/current-projects/a-scalable-and-explainable-approach-to-discriminating-between-human-and-artificially-generated-text
2 stars 1 forks source link

METRICS EXTRACTION + PERFORMANCE: Created one pipeline for standardising the extraction of both AI and human metrics + performance update. #57

Closed MinaAlmasi closed 5 months ago

MinaAlmasi commented 5 months ago

Extracting Metrics

Development on the extraction of metrics. See below for an overview of changes.

Creating a shared pipeline with standard formatting

A standard metrics pipeline for all data!

  1. Metrics pipeline has been updated to extract metrics for both human and AI datasets
  2. Rather than alphabetising all columns, the first columns in all datasets are now id and model for a better overview. The rest of the columns (text metrics) are alphabetised.
  3. As a result of point 1 and 2, human metrics files that were previously created have been updated so that files across human and AI have the same format. The only addition being the model column.

Performance updates

Metrics extraction for all data takes around 30 minutes on a 64 machine using all cores but one!

  1. Rather than relying on wrapper function td.extract_metrics from TextDescriptives, a custom pipeline with nlp.pipe() (as also presented in Quickstart) was created in utils/get_metrics.py to enable multi-processing.
  2. The functions that relied on td.extract_metrics in utils/get_metrics.py have not yet been phased out as they are still used around in the codebase (for prompt_select and analysis) but might be removed in the future.

Datasets with metrics extracted (NB. DailyDialog)

  1. Metrics have been extracted for all datasets (AI and Human), but DailyDialog needs another go, see #56.

Docs

  1. Readme in src/metrics/README.md has been updated for instructions on how to run the code (both with a bash script and a custom way with args).