Page MenuHomePhabricator

Baseline Experiments for SDS 1.2.1 B
Closed, ResolvedPublic

Assigned To
Authored By
Aitolkyn
Nov 22 2024, 10:04 AM
Referenced Files
F58086164: image.png
Dec 30 2024, 6:33 AM
F58086697: image.png
Dec 30 2024, 6:33 AM
F58011011: image.png
Dec 13 2024, 1:15 PM
F58011001: image.png
Dec 13 2024, 1:15 PM

Description

Build baselines to compare large language models for the three tasks of focus:

  1. Automatic Article Categorization,
  2. NPOV detection
  3. Peacock Detection

Event Timeline

Updates:

  • Train multiple models on Task 2 and Task 3
  • I used multilingual BERT and XLM-R Longformer in my experiments
  • I ran testing on the full evaluation dataset and reported the results in detail in the slides here
  • We also test the performance by topic in enwiki
  • Findings
    • Passing page title along with the content improves the accuracy
    • Increased context size of 4K tokens with XLM-R Longformer does not improve the performance significantly
    • mBERT trained on all wikis performs better on other languages than mBERT trained only on English samples
    • NPOV detection classification shows lower accuracy results
  • For peacock behavior detection and NPOV detection tasks, there are 15.5K and 22.5K positive samples localized within a section, respectively. This direction is left as a future improvement, where we could build a new dataset with in-section templates.

Next Steps:

  • Wrap up Task 2 & 3 experiments
  • Write a report

Updates

  • Baselines for tasks 2 and 3 were updated and evaluation of full data was reported
  • All plots & results are presented here: for npov, for peacock

Below I add baseline results on top of @Trokhymovych's LLM results.

Results for NPOV:
modelaccuracyf1precisionrecallis_nan_rate*
XLM-Roberta0.5690.5430.5780.511
XLM-R Longformer0.5150.6040.5110.739
mBERT - trained on all langs0.5640.4770.5950.397
mBERT - trained on enwiki0.5490.4360.5810.349
[LLM] Meta-Llama-3.1-8B-Instruct-Turbo0.5280.5660.4850.6790.105125
[LLM] Llama-3-70b-chat-hf0.5660.4140.6370.3070.0210477
[LLM] Meta-Llama-3-70B-Instruct-Lite0.5570.4010.6180.2970.0210477
[LLM] Mistral-7B-Instruct-v0.30.5250.3660.5510.2740
Results for Peacock:
modelaccuracyf1precisionrecallis_nan_rate*
XLM-Roberta 0.6150.5410.6690.454
XLM-R Longformer0.5720.6430.5510.771
mBERT - trained on all langs0.6080.5270.6630.437
mBERT - trained on enwiki0.6010.6010.6010.602
[LLM] Meta-Llama-3.1-8B-Instruct-Turbo0.5610.6560.5390.8380
[LLM] Llama-3-70b-chat-hf0.5920.4880.6550.3890.0114388
[LLM] Meta-Llama-3-70B-Instruct-Lite0.5930.5600.6100.5180.0114388
[LLM] Mistral-7B-Instruct-v0.30.5740.6240.5590.7050

Updates:

  • Additionally fine-tuned XLM-Roberta with max length of 512 for NPOV and Peacock. XLM-R performs slightly better than mBERT with the same max length.
  • Updated mBERT trained on enwiki - Peacock
  • The updates are reflected in the table above and in the notebooks at: for npov, for peacock

Next Steps:

  • Explore explainability strategies for our baselines

Updates:

  • Exploring the explainability of small language models with SHAP values
  • Writing a final report on data preparation and baseline experiments
  • Adding our reference need work as an additional use-case. Reran full-scale evaluation experiments on reference need data in the top 10 languages by active user count.
  • Examples of shape values for peacock behavior, in which words like "greatest" or "stunning beauty" appear to affect the model's positive label the most.

image.png (2,232×506 px, 327 KB)

image.png (2,236×322 px, 124 KB)

Great job @Aitolkyn ! Can you please share a link to the code you have used to generate these visualizations?

  • SHAP explanations for peacock behavior can be found at the end of this notebook. Additionally, I added bars with the top 20 words in the explanation for each class, where these are adjectives for the "positive" class, and there are mainly proper nouns for the "negative" class.

Note: My contract is finishing tomorrow. Thank you to everyone involved in this project! Below, I will report updates for the past week.

Updates:

  • We ran all baseline and LLM experiments for an additional use case, reference need detection, omitting latency comparison between slms and llms.
    • Train data included 100K sentences from en, es, de, fr, and ru wikis.
    • Eval data included 30K sentences from the top 10 language editions by active editors count.
  • Fine-tuned SLMs perform better than LLMs, see plots below for details.

image.png (1,138×592 px, 181 KB)

image.png (1,228×526 px, 101 KB)

  • Explanations for ref. need is a bit less informative/intuitive than peacock behavior, with more weight given to section names and the "period" presumably because the model learns the presence of preceding and subsequent sentences.

Possible future work:

  • Explore policy detection with the dataset including templates localized to a specific section.
  • There is a new BERT version (ModernBERT), which is available for English for now. We could later test it on our target tasks if they release a multilingual version.

Thank you @Aitolkyn for your work.

My understanding is that this task is completed. I'll resolve.