Upload SIMPLE checkpoint (converted from paper checkpoint)
Browse filesFiles changed (8)
- README.mdAdded+99
- config.jsonAdded+98
- model.safetensorsAdded+3
- tokenizer/added_tokens.jsonAdded+3
- tokenizer/special_tokens_map.jsonAdded+51
- tokenizer/spm.modelAdded+3
- tokenizer/tokenizer.jsonAdded
- tokenizer/tokenizer_config.jsonAdded+59
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899---license: mitlanguage: - enlibrary_name: simple-metricbase_model: microsoft/deberta-v3-largetags: - text-simplification - evaluation - metric - reference-free---
# SIMPLE-large
**SIMPLE** (SImplicity Metric via Preference LEarning) is a reference-free learned metricfor sentence simplification. For a source sentence and a candidate simplification it returns
- a **score** `mu` in (-1, 1): +1 = highly successful simplification, 0 = verbatim copy of the source, -1 = unrelated or degenerate text (negative = unsuccessful, including complexifications);- an **uncertainty** `sigma` (> 0.05): the model's confidence in that score. Lower sigma means more reliable; it is a confidence signal, not an estimate of human disagreement.
This is the `large` model (microsoft/deberta-v3-large cross-encoder). Sizes: small, base, large.
## Usage
```bashpip install simple-metric```
```pythonfrom simple_metric import SIMPLE
metric = SIMPLE.from_pretrained("large") # = "mpapucci/simple-metric-large"out = metric.score( ["The feline perched upon the mat in a state of repose."], ["The cat sat on the mat."],)print(out.mu, out.sigma)```
From the command line: `simple-metric score --model large --sources src.txt --candidates sys.txt`.With Hugging Face `evaluate`: `evaluate.load("mpapucci/simple", "large")`.
## Results
SimpEval 2022 (Maddela et al., 2023): pairwise accuracy and Kendall tau over 484 humanpreference pairs; Pearson/Spearman with 360 human ratings; adversarial beat-rate (genuinesimplification scored above a copy / truncation / shuffle / random sentence /over-deletion of the source, averaged).
| Pairwise acc. | Kendall tau | Pearson | Spearman | Beat-rate ||---|---|---|---|---|| 0.814 | 0.628 | 0.391 | 0.454 | 0.989 |
Pearson correlation with human ratings on Simplicity-DA (Alva-Manchego et al., 2021) andStructural Simplicity (Sulem et al., 2018):
| SDA fluency | SDA meaning | SDA simplicity | SS grammaticality | SS meaning | SS simplicity | SS structural ||---|---|---|---|---|---|---|| .665 | .588 | .695 | .374 | -.069 | .531 | .461 |
Mean (std) score on SimpEval 2022: genuine simplifications +.66 (.25), complexifications(source and simplification swapped) -.68 (.19), adversarial candidates -.56 (.34).
The checkpoint was selected by pairwise accuracy on SimpEval 2022, the same data as thefirst table, so those numbers are optimistic; the other benchmarks were not used forselection.
## Training
A cross-encoder over `[CLS] source [SEP] candidate [SEP]` with two linear heads,`mu = tanh(W h)` and `sigma = softplus(W' h) + 0.05`, trained with
- a Thurstone (Case III) pairwise loss, `-log Phi((mu_pos - mu_neg - m) / sqrt(sigma_pos^2 + sigma_neg^2))`, on 507,940 preference pairs built from ASSET, OneStopEnglish, Newsela and SimpEval PAST (original vs. simplification, more vs. less simplified, human-preferred vs. dispreferred with rating margin `m`, simplification vs. unrelated sentence);- a Gaussian negative log-likelihood (weight 0.7) on 2,400 SimpEval PAST human ratings plus synthetic anchors (copies = 0, degenerate rewrites < 0, unrelated text = -1).
Hyperparameters: AdamW, learning rate 1e-5, batch 8, 5 epochs over a random quarter of thepairs per epoch, linear warmup over 6% of steps, max length 512. The training code and arecipe to rebuild the data from the original sources are in the[simple-metric repository](https://github.com/michelepapucci/simple-metric).
## Limitations
- Sentence-level, English, mostly news and Wikipedia; behaviour may differ in other domains or for other reader populations.- Insertion/elaboration-heavy simplifications are rare in the training data; both `mu` and `sigma` are less reliable on them.- `sigma` is reasonably but not perfectly calibrated (temperature scaling helps).
## Citation
Citation will be added upon publication.1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798{ "encoder": { "add_cross_attention": false, "architectures": [ "DebertaV2Model" ], "attention_probs_dropout_prob": 0.1, "bad_words_ids": null, "begin_suppress_tokens": null, "bos_token_id": null, "chunk_size_feed_forward": 0, "cross_attention_hidden_size": null, "decoder_start_token_id": null, "diversity_penalty": 0.0, "do_sample": false, "dtype": "float32", "early_stopping": false, "encoder_no_repeat_ngram_size": 0, "eos_token_id": null, "exponential_decay_length_penalty": null, "finetuning_task": null, "forced_bos_token_id": null, "forced_eos_token_id": null, "hidden_act": "gelu", "hidden_dropout_prob": 0.1, "hidden_size": 1024, "id2label": { "0": "LABEL_0", "1": "LABEL_1" }, "initializer_range": 0.02, "intermediate_size": 4096, "is_decoder": false, "is_encoder_decoder": false, "label2id": { "LABEL_0": 0, "LABEL_1": 1 }, "layer_norm_eps": 1e-07, "legacy": true, "length_penalty": 1.0, "max_length": 20, "max_position_embeddings": 512, "max_relative_positions": -1, "min_length": 0, "model_type": "deberta-v2", "no_repeat_ngram_size": 0, "norm_rel_ebd": "layer_norm", "num_attention_heads": 16, "num_beam_groups": 1, "num_beams": 1, "num_hidden_layers": 24, "num_return_sequences": 1, "output_attentions": false, "output_hidden_states": false, "output_scores": false, "pad_token_id": 0, "pooler_dropout": 0.0, "pooler_hidden_act": "gelu", "pooler_hidden_size": 1024, "pos_att_type": [ "p2c", "c2p" ], "position_biased_input": false, "position_buckets": 256, "prefix": null, "problem_type": null, "pruned_heads": {}, "relative_attention": true, "remove_invalid_values": false, "repetition_penalty": 1.0, "return_dict": true, "return_dict_in_generate": false, "sep_token_id": null, "share_att_key": true, "suppress_tokens": null, "task_specific_params": null, "temperature": 1.0, "tf_legacy_loss": false, "tie_encoder_decoder": false, "tie_word_embeddings": true, "tokenizer_class": null, "top_k": 50, "top_p": 1.0, "torch_dtype": "float32", "torchscript": false, "type_vocab_size": 0, "typical_p": 1.0, "use_bfloat16": false, "vocab_size": 128100 }, "format_version": 1, "max_length": 512, "model_type": "simple", "sigma_floor": 0.05, "simple_metric_version": "0.1.0"}123version https://git-lfs.github.com/spec/v1oid sha256:c3d178da39127c5b4cc7ea06f08a0816b033f1efcfcd0ead884a013bf1ae4fb6size 1736106048123{ "[MASK]": 128000}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051{ "bos_token": { "content": "[CLS]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "cls_token": { "content": "[CLS]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "eos_token": { "content": "[SEP]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "mask_token": { "content": "[MASK]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "pad_token": { "content": "[PAD]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "sep_token": { "content": "[SEP]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "unk_token": { "content": "[UNK]", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false }}123version https://git-lfs.github.com/spec/v1oid sha256:c679fbf93643d19aab7ee10c0b99e460bdbc02fedf34b92b05af343b4af586fdsize 24646161234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859{ "added_tokens_decoder": { "0": { "content": "[PAD]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "1": { "content": "[CLS]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "2": { "content": "[SEP]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "3": { "content": "[UNK]", "lstrip": false, "normalized": true, "rstrip": false, "single_word": false, "special": true }, "128000": { "content": "[MASK]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true } }, "bos_token": "[CLS]", "clean_up_tokenization_spaces": false, "cls_token": "[CLS]", "do_lower_case": false, "eos_token": "[SEP]", "extra_special_tokens": {}, "mask_token": "[MASK]", "model_max_length": 1000000000000000019884624838656, "pad_token": "[PAD]", "sep_token": "[SEP]", "sp_model_kwargs": {}, "split_by_punct": false, "tokenizer_class": "DebertaV2Tokenizer", "unk_token": "[UNK]", "vocab_type": "spm"}README.mdAdded+99
config.jsonAdded+98
model.safetensorsAdded+3
tokenizer/added_tokens.jsonAdded+3
tokenizer/special_tokens_map.jsonAdded+51
tokenizer/spm.modelAdded+3
tokenizer/tokenizer.jsonAdded
tokenizer/tokenizer_config.jsonAdded+59