📖

LexiLift Research Dashboard

Neural text simplification to A2, B1 and B2 reading levels. Six models trained and evaluated across quality, safety and speed.

6 trained models SARI · ChrF · BERTScore T5-small (60M) & BART-base (139M) Newsela · ASSET · TurkCorpus · ESS Chrome Extension MV3 Bootstrap · human eval · corpus · ASSET benchmark

What LexiLift Does

LexiLift simplifies complex English web pages to a target CEFR level: A2 (elementary), B1 (intermediate), or B2 (upper-intermediate). A Chrome MV3 extension sends page text to a FastAPI backend, which routes it through the appropriate model and returns the rewritten text in-place.

The central research question: does filtering training data by NLI entailment or BERTScore similarity improve simplification quality, and which filter produces safer outputs?

Verdict

T5-NLI deployed as default SARI 56.43, number drift 0.60%, Meaning 4.93/5 from 38 human raters. Best safety of any model tested.
BART-NLI as secondary option SARI 55.69, drift 2.59%, more aggressive rewriting. Best overall human score (4.04 avg across M+S+F).
BART-BERTScore not deployed Highest SARI (58.56) but 9.58% number drift (15× T5-NLI). Unsafe for factual web content.
T5-Raw
43.46
SARI · 5 epochs · unfiltered
T5-BERTScore
52.22
SARI · 28 epochs · BS filter
BART-NLI (deployed)
55.69
SARI · 11 epochs · NLI filter
T5-NLI (deployed)
56.43
SARI · 19 epochs · NLI filter
BART-BERTScore
58.56
SARI · 50 epochs · BS filter
BART-Raw
44.36
SARI · 13 epochs · unfiltered

SARI Test Scores

All six models at their best checkpoint on the held-out test split. NLI-filtered models sit above 55. Raw ablations (43 to 44) confirm data quality, not architecture, drives the gap.

SARI vs Number Drift: Central Tradeoff

Top-left is ideal: high quality, low drift. T5-NLI achieves the best balance. BART-BERTScore leads on SARI but has the worst safety.

Key Findings

Filtering adds 13 to 15 SARI points T5-Raw scores 43.46. BART-BERTScore reaches 58.56. Data quality matters more than architecture.
NLI filtering is the safest by a wide margin T5-NLI: 0.60% number drift. NLI entailment directly suppresses corruption of numerical facts.
BERTScore trades safety for SARI BART-BERTScore leads on SARI (58.56) but drifts 9.58%. This is the central tradeoff of the project.
BART needs nearly twice as many epochs T5-NLI converged in 19 epochs. BART-BERTScore ran 50 on an A100 without early stopping.
NLI generalises better out-of-domain T5-NLI beats T5-BERTScore by 3 SARI on ASSET Wikipedia despite lower in-distribution SARI.
Architecture cannot substitute for data quality BART-Raw (44.36) barely beats T5-Raw (43.46) despite 2.3× more parameters.

Validation SARI Per Epoch

Toggle models on or off. T5-Raw peaks at epoch 1 and degrades from there. BART-BERTScore kept climbing across all 50 epochs on the A100.

T5-Raw peaks at epoch 1 and stays flat: noisy training pairs produce contradictory gradients the model cannot resolve. BART-BERTScore kept improving across all 50 epochs because its larger capacity extracts more from BERTScore-filtered data over time.

Epochs to Best Checkpoint

Early stopping fires after 4 consecutive epochs without improvement on validation SARI. BART-BERTScore hit the 50-epoch maximum on the A100 without triggering it.

ModelTotalBestVal SARITest SARIFilter
T5-Raw 5143.1043.46 None
T5-BERTScore 282452.2252.22 BERTScore
BART-NLI 11755.5655.69 NLI
T5-NLI 191556.0756.43 NLI
BART-BERTScore 504958.6858.56 BERTScore
BART-Raw 13945.2644.36 None
T5-Raw's best checkpoint is epoch 1. The unfiltered data has too many contradictory pairs, so copying is the only safe strategy and extra epochs make things worse.

Test Set Quality Metrics

All metrics on held-out test data. SARI is primary. ChrF measures character n-gram overlap with references. BERTScore uses contextual embeddings. FKGL delta is reading grade reduction (positive = simpler output). Copy rate is the fraction of outputs identical to the input.

ModelSARIChrFBERTScoreLENSFKGL DropCopy Rate
T5-Raw 43.4653.690.73458.872.1842.0%
T5-BERTScore 52.2264.700.81865.222.8326.5%
BART-NLI 55.6971.900.88468.252.5817.5%
T5-NLI 56.4373.320.88067.801.7435.5%
BART-BERTScore 58.5666.530.83767.133.876.4%
BART-Raw 44.3651.180.72263.954.0914.1%

FKGL delta: positive means the output is simpler (lower grade level). BERTScore for raw ablations computed post-hoc from saved test predictions.

Multi-Metric Radar

SARI, ChrF, BERTScore and safety (inverted number drift) each normalised to 0 to 100. T5-NLI leads on safety and ChrF. BART-BERTScore leads on SARI but the safety axis reveals its 9.58% number drift.

Absolute SARI Gain from Filtering

How much each model improves over the unfiltered T5-Raw baseline (43.46).

T5-Raw (baseline)43.46
T5-BERTScore (+8.76)52.22
BART-NLI (+12.23)55.69
T5-NLI (+12.97)56.43
BART-BERTScore (+15.28)58.56
BART-Raw (+0.90)44.36
NLI filtering gives similar gains to BERTScore filtering on T5 T5-NLI (56.43) versus T5-BERTScore (52.22) is a 4.21 point gap in favour of NLI. On BART the direction reverses: BART-BERTScore (58.56) beats BART-NLI (55.69) by 3.05 points. BART's larger capacity appears to benefit more from the more diverse BERTScore-filtered pairs.

Reliability and Faithfulness

These metrics check whether simplification corrupts factual content. Number drift counts sentences where a number in the source was dropped or altered in the output.

ModelNumber DriftRisk LevelToken JaccardCompressionFKGL SourceFKGL Output
T5-NLI 0.60% Minimal 79.6%96.8%11.149.41
BART-NLI 2.59% Low 70.4%93.9%11.148.56
T5-Raw 5.33% Moderate 76.5%79.4%12.119.93
T5-BERTScore 5.81% Moderate 70.0%78.5%11.568.73
BART-BERTScore 9.58% High 53.0%71.9%11.567.69
BART-Raw 10.32% Highest 55.8%67.6%12.118.02

Token Jaccard: word-level overlap between source and output (higher = more faithful). Compression: output words / source words. T5-NLI retains 96.8% of source length; BART-BERTScore cuts 28%.

Number Drift by Model

T5-NLI at 0.60% is the deployed safety floor. BART-BERTScore at 9.58% requires the backend safety gate to operate on factual web content without corrupting numbers.

Why NLI Suppresses Number Drift

NLI filtering keeps only training pairs where the simplified sentence logically entails the source. For entailment to hold, specific facts including numbers must be preserved. "Scientists identified 42 species" does not entail "Scientists identified many species", so that pair gets rejected.

BERTScore checks embedding similarity, not factual accuracy. Contextual embeddings treat "42 species" and "many species" as similar because they appear in the same contexts. This is why BART-BERTScore has 15x more number drift than T5-NLI despite training on the same base dataset.

Backend safety gate Protected spans (numbers, URLs, citations, emails) are extracted before generation and verified after. Any span missing from the output triggers a fallback: primary model → M0-Lexical → ECHO.

High Bias, Low Variance

T5-NLI and BART-NLI

NLI-filtered training rewards safe, entailment-preserving edits. T5-NLI copies 35.5% of outputs verbatim because the training data teaches it to prioritise preservation over transformation.

The low variance shows as 0.60% number drift. The model almost never produces surprising or factually wrong outputs.

Best for medical, scientific, financial and legal content where factual accuracy is critical.

Low Bias, High Variance

BART-BERTScore

BERTScore-filtered training rewards fluent rewrites that are semantically similar to the reference, even if specific details differ. BART-BERTScore copies only 8.2% of outputs, rewriting almost everything, which produces the highest SARI (58.56).

The high variance shows as 9.58% number drift: roughly one in eleven sentences with a number has that number corrupted.

Use for general news and entertainment. Always enable safety gates.

Maximum Variance, No Filter

T5-Raw and BART-Raw (ablations)

Without filtering, training data contains contradictory gradients. Some pairs are genuine simplifications; others are near-copies or paraphrases that change meaning. The model cannot learn a consistent strategy.

BART-Raw (10.32% drift) is worse than T5-Raw (5.33%) despite more parameters: bigger capacity amplifies bad gradients.

Ablation baselines only. The answer: filtering adds 12 to 15 SARI points.

Copy Rate vs Number Drift

Each model plotted by copy rate (y) versus number drift (x). T5-NLI sits closest to the safe corner: selective copying, minimal drift.

Why T5-NLI Has a 35% Copy Rate and Still Scores High

SARI rewards keeping words that should be kept. When a sentence is already at the target level, copying earns a high keep-component score. T5-NLI identifies these cases correctly.

BART-BERTScore rewrites everything regardless, inflating add/delete scores but introducing more errors including number drift.

T5-NLI: moderate copying (35.5%), minimal drift (0.60%). BART-BERTScore: aggressive rewriting, 9.58% drift.

Reliability and Faithfulness Metrics

These metrics measure whether simplification corrupts factual content. Number drift counts sentences where at least one number in the source is absent or altered in the output. For medical dosages, scientific measurements or financial figures, a drifted number is a dangerous error regardless of how fluent the rewrite is.

ModelNumber DriftRisk LevelToken JaccardCompressionFKGL SourceFKGL Output
T5-NLI 0.60% Minimal 79.6%96.8%11.149.41
BART-NLI 2.59% Low 70.4%93.9%11.148.56
T5-Raw 5.33% Moderate 76.5%79.4%12.119.93
T5-BERTScore 5.81% Moderate 70.0%78.5%11.568.73
BART-BERTScore 9.58% High 53.0%71.9%11.567.69
BART-Raw 10.32% Highest 55.8%67.6%12.118.02

Token Jaccard: word-level intersection over union between source and output. Higher means more vocabulary overlap (more faithful to source). Compression ratio: output words divided by source words. A ratio of 0.97 means T5-NLI retains almost all words from the source; 0.74 means BART-BERTScore retains 74% of source word count on average.

Number Drift by Model

Green bars indicate acceptable safety levels. Orange is moderate risk. Red (BART-BERTScore) is mitigated by the backend safety gate.

Why NLI Suppresses Number Drift

NLI (Natural Language Inference) filtering keeps only training pairs where the simplified sentence logically entails the source. For entailment to hold, specific facts (especially numbers) must be preserved. "Scientists identified 42 species" entails nothing if simplified to "Scientists identified many species"; that pair is rejected by the NLI filter and excluded from training.

BERTScore filtering checks whether contextual embedding similarity exceeds a threshold. High BERTScore does not guarantee number preservation. Contextual embeddings treat "42 species" and "many species" as semantically similar because they appear in the same kinds of sentences. This is why BART-BERTScore has 15 times more number drift than T5-NLI despite both being fine-tuned on the same base dataset.

Backend safety gate: numbers extracted before generation, verified after Protected spans (numbers, URLs, citations, emails) are regex-extracted from the source block. After generation, each protected span is verified to appear in the output. If a number disappears, the backend falls back: BART-BERTScore to T5-NLI, T5-NLI to M0-Lexical.

ASSET External Benchmark (Wikipedia)

ASSET has 359 Wikipedia sentences with 10 human references each. These HuggingFace SARI values are not directly comparable to EASSE-based literature scores (MUSS 42.53, ACCESS 40.68). Use for relative comparison within this project only.

ModelASSET SARIFKGL DropIn-Dist SARIOOD GapNotes
M0-Lexical52.120.11n/an/aRule-based, domain-agnostic
M0-CEFR50.450.15n/an/aRule-based, CEFR vocab lookup
T5-NLI51.602.0256.434.83Best neural OOD score
BART-NLI51.273.7355.694.42NLI generalises well
T5-BERTScore48.593.4452.223.63Lower than NLI models
BART-BERTScore48.174.6358.5610.39Largest OOD gap

OOD Gap = in-distribution SARI minus ASSET SARI. Rule-based models have no gap because they are not trained on any domain.

T5-NLI beats T5-BERTScore on ASSET by 3 points despite scoring 4 points lower in-distribution The ranking reverses out-of-domain: NLI filtering builds constraints (preserve facts, keep meaning) that transfer across domains. BERTScore filtering learns Newsela-specific embedding patterns that do not transfer as cleanly.
BART-BERTScore has the largest domain gap: 10.39 points It leads in-distribution (58.56) but drops furthest on Wikipedia. Aggressive rewriting that works on news text produces mismatched outputs on encyclopaedic writing.
NLI filtering produces more robust simplifications Logical entailment is a property of language itself, not of a specific writing style. A model trained on entailment-preserving pairs learns to keep facts, tense and meaning consistent across different text types.

Bootstrap Significance (n=60, 10,000 iterations)

Bootstrap resampling on 60 exported test predictions with 10,000 iterations. Detecting a 4 to 5 SARI difference at 80% power requires 250 to 400 examples. At n=60 all intervals overlap. The deployment choice rests on safety: T5-NLI at 0.60% number drift versus BART-BERTScore at 9.58% is operationally decisive regardless of SARI significance.

ModelBootstrap SARI95% CIPairwise
T5-BERTScore 49.77[43.90, 55.83] No sig. diff
BART-NLI 51.43[47.57, 55.23] No sig. diff
T5-NLI 50.59[47.87, 53.32] No sig. diff
BART-BERTScore 55.13[48.04, 62.50] No sig. diff
At 60 samples all confidence intervals overlap. T5-NLI's 0.60% number drift versus BART-BERTScore's 9.58% is operationally decisive; the SARI gap does not justify 15 times the factual risk on real web content.

Human Evaluation: 38 Raters, 15 Examples

38 university students (ages 18 to 26) rated four blinded system outputs per example on Meaning (is the original meaning preserved?), Simplicity (is it easier to read?), and Fluency (does it sound natural?) on a 1 to 5 Likert scale. Examples covered 10 domains at three CEFR levels (A2 / B1 / B2). Inter-rater reliability: Krippendorff's α = 0.51 (M), 0.48 (S), 0.44 (F).

Best Meaning
4.93 / 5
T5-NLI: conservative rewrites preserve facts
Best Balance
4.04 avg
BART-NLI: best M+S+F combined score
Best Simplicity
4.33 / 5
BART-BERTScore: aggressive rewrites, lower meaning

Meaning Preserved

Simplicity Gained

Fluency

All Three Criteria: Radar View

Summary Table (mean ± SD)

Model M ↑ S ↑ F ↑ Avg
T5-NLI 4.93 ±0.26 2.53 ±0.74 4.80 ±0.56 4.09
BART-NLI 4.33 ±0.98 3.60 ±0.83 4.20 ±0.86 4.04
T5-BERTScore 2.33 ±0.72 3.80 ±0.56 4.47 ±0.99 3.53
BART-BERTScore 2.20 ±0.77 4.33 ±0.82 4.33 ±0.98 3.62

NLI-filtered models score dramatically higher on Meaning (4.93 / 4.33) vs BERTScore-filtered (2.33 / 2.20). BERTScore models truncate key content to achieve high simplicity, which raters penalise heavily. BART-NLI best balances all three criteria.

Deployed: T5-NLI (M1) and BART-NLI (M2)

T5-NLI is the default: best safety (0.60% drift), highest ChrF (73.32), SARI 56.43. BART-NLI is the M2 option: more active rewriting (17.5% copy rate), FKGL drop 2.58 vs 1.74, drift 2.59%. BART-BERTScore is not deployed: 9.58% drift makes it unsafe for factual web content.

Why T5-NLI is the Default

BART-BERTScore leads on SARI (58.56 vs 56.43) but has 15x more number drift. On real web pages with statistics, dates and dosages, corrupting a number is a serious failure regardless of how fluent the rewrite is.

T5-NLI also has the highest ChrF (73.32 vs 66.88) and the best Wikipedia generalisation (ASSET SARI 51.60 vs 48.17), which matters since the extension runs on all types of pages.

Safety Pipeline (all models)

  1. Protected spans extracted: numbers, URLs, citations, emails
  2. Model generates best-of-3 candidates via beam search
  3. Candidates ranked by FKGL distance to target, repetition penalty, length inflation
  4. Optional meaning gate via all-MiniLM-L6-v2 (cosine similarity)
  5. Output verified: all protected spans must appear unchanged
  6. Fallback: primary model → M0-LEX → ECHO
If a number disappears from the output, the block falls back silently. The extension status bar shows a fallback count when this happens.

Which Model for Which Content?

Content TypeRecommendedReason
Medical or clinicalT5-NLI0.60% drift, dosages preserved
Scientific papersT5-NLIHighest ChrF (73.32), faithful to source
Financial or legalT5-NLILow drift protects figures and dates
Wikipedia articlesT5-NLIBest OOD generalisation (ASSET 51.60)
General newsBART-NLIMore active rewriting, acceptable drift
No backend availableM0-LexicalRule-based, instant, works offline

ONNX Export

The T5-NLI checkpoint has been exported to ONNX format. This is a partially implemented future feature that would remove the backend dependency.

What is done experiments/onnx/export_t5_nli_onnx.py exports three ONNX graphs (encoder, decoder, merged decoder). Optional INT8 quantisation reduces size ~4x with under 0.5 SARI degradation. Output is numerically identical to PyTorch within float32 tolerance.
Next step (future) The ONNX files work with @xenova/transformers (transformers.js). Moving them to extension/assets/m1_t5_onnx/ would enable fully offline simplification with no localhost backend needed.

Sentence Splitting

Both deployed models split segments over 28 words into individual sentences before generation, then concatenate. This prevents the model from copying long complex sentences verbatim.

Implementation Terminal-punctuation boundary detection with abbreviation protection (Dr., Fig., et al.). Each sentence simplifies independently. Protected spans are preserved across splits.
Why it matters for B2 B2 targets upper-intermediate readers and receives longer sentences. Without splitting, beam search often copies long B2 sentences because the full complexity exceeds what it can reliably handle in one pass.

Safety Architecture Summary

Protected Span Extraction URLs, emails, citations, numbers and currency extracted before generation and verified after. Missing span triggers a fallback.
Best-of-3 Ranking 3 candidates per segment ranked by FKGL distance to target, repetition penalty, length inflation, semantic similarity.
Fallback Chain Neural model → M0-Lexical → ECHO. Every block reaches the user even if the model fails entirely.

Human Evaluation: 38 Raters, 15 Examples

38 university students (ages 18 to 26) rated four blinded system outputs per example on Meaning (is the original meaning preserved?), Simplicity (is it easier to read?), and Fluency (does it sound natural?) on a 1 to 5 Likert scale. Examples covered 10 domains at three CEFR levels (A2 / B1 / B2). Inter-rater reliability: Krippendorff's α = 0.51 (M), 0.48 (S), 0.44 (F).

Best Meaning
4.93 / 5
T5-NLI: conservative rewrites preserve facts
Best Balance
4.04 avg
BART-NLI: best M+S+F combined score
Best Simplicity
4.33 / 5
BART-BERTScore: aggressive rewrites, lower meaning

Meaning Preserved

Simplicity Gained

Fluency

All Three Criteria: Radar View

Summary Table (mean ± SD)

Model M ↑ S ↑ F ↑ Avg
T5-NLI 4.93 ±0.26 2.53 ±0.74 4.80 ±0.56 4.09
BART-NLI 4.33 ±0.98 3.60 ±0.83 4.20 ±0.86 4.04
T5-BERTScore 2.33 ±0.72 3.80 ±0.56 4.47 ±0.99 3.53
BART-BERTScore 2.20 ±0.77 4.33 ±0.82 4.33 ±0.98 3.62

NLI-filtered models score dramatically higher on Meaning (4.93 / 4.33) vs BERTScore-filtered (2.33 / 2.20). BERTScore models truncate key content to achieve high simplicity, which raters penalise heavily. BART-NLI best balances all three criteria.

System Architecture

LexiLift is built across five layers. The presentation layer is the Chrome extension. The API layer is the HTTP REST boundary between browser and server. The application and safety layer is the FastAPI backend, which handles model routing, protected-span checking, and the fallback chain. The inference runtime layer is where PyTorch or ONNX runs model forward passes. The model layer holds the trained weights and rule-based logic.

User Journey

End-to-end flow from a user encountering a complex page to reading the simplified version. Each step shows what the user sees or does.

🌐
Open page
Encounters complex article, medical guidance, or news page
→
⚙️
Configure
Opens popup, selects CEFR level (A2 / B1 / B2) and model (T5-NLI or BART-NLI)
→
▶
Click Simplify
Progress panel shows elapsed time and estimated completion during inference
→
🔄
Page rewrites
Simplified text replaces each paragraph in-place; layout, links and images unchanged
→
📊
Status bar
Shows latency, blocks processed, model used, protected spans found, fallback count
→
🖊
Read and annotate
Uses multi-colour highlighter to mark key passages; toggles dark mode if needed
→
↩
Restore original
One click restores all paragraphs from lossless pre-simplification snapshots

Five-Layer Architecture

Layer 1: Presentation
Chrome MV3 Extension
popup.html/js/css
Level picker, model selector, status bar, dark mode, annotation highlighter
content.js
DOM injection, page rewrite, @mozilla/readability extraction
sw.js (service worker)
Orchestration, HTTP fetch, 5s keep-alive ping
HTTP at 127.0.0.1:8000 · page text stays on the machine · no external network call
Layer 2: API Boundary
HTTP REST Interface
POST /simplify
JSON blocks in, simplified blocks + diagnostics out
GET /health
Liveness check for extension connection state
POST /freeze   POST /log
Corpus snapshot and event logging endpoints
In-process call · PyTorch tensors or ONNX session · no network hop
Layer 3: Application & Safety Logic
FastAPI Backend  backend/main.py
Model router
Dispatches by modelPreference field
Protected-span checker
Numbers, URLs, citations, emails
Fallback chain
Neural → M0_CEFR → ECHO
Meaning gate
MiniLM cosine sim, τ=0.86 · user-toggleable in popup
LRU cache
512 entries, skips re-inference
Loads weights on first request · checkpoint path from env var or default directory
Layer 4: Inference Runtime
PyTorch / ONNX Runtime
PyTorch (always active)
Default path for all models. Used on GPU and CPU.
ONNX Runtime (CPU only, M1_T5 only)
Activated only when: (1) no GPU is detected, and (2) models/m1_t5_onnx/ directory exists. Not available for M2_BART. Gives 1.5–2× faster CPU inference with numerically identical outputs.
Batch pre-pass
One generate() call across all blocks per page. Avoids N sequential GPU invocations.
Layer 5: Simplification Models
Rule-Based and Neural Checkpoints
M0_LEX
Zipf-frequency swap, ~5ms
M0_CEFR
CEFR vocab + WordNet, ~10–39ms
M1_T5 (T5-NLI)
60M params, SARI 56.43, drift 0.60%, ~200ms/block
M2_BART (BART-NLI)
139M params, SARI 55.69, drift 2.59%, ~150ms/block
MiniLM (meaning gate)
all-MiniLM-L6-v2, cosine similarity, ~15ms

Simplification Pipeline

End-to-end flow from raw page block to simplified output. Protected spans are masked before generation and restored verbatim afterwards; any violation triggers the fallback chain.

LexiLift simplification pipeline diagram

What Happens When You Click "Simplify"

Each step below runs in sequence. The coloured badges show which component is responsible.

1
content.js

User selects level and model in the popup, then clicks Simplify. content.js uses @mozilla/readability to extract the main article body, stripping navigation, ads, cookie banners, and footers. The remaining text is split into paragraph blocks above a minimum character threshold (MIN_CHARS).

2
sw.js

The service worker collects the blocks and POSTs a SimplifyRequest (level, blocks, modelPreference, kCandidates, meaningGate) to 127.0.0.1:8000/simplify. A 5-second keep-alive ping prevents Chrome MV3 from terminating the worker mid-inference.

3
backend/main.py

The backend routes the request to the chosen model. For each block, it runs a six-step pipeline: sentence split (segments ≥28 words) → mask protected spans → generate k=3 beam candidates → rank by FKGL distance to target anchor → meaning gate (optional, see below) → restore spans.

Best-of-k=3 candidate selection (example at B1, target FKGL 6.9)
Candidate 1 ✓ "Scientists found that exercise cuts heart disease risk by 35 percent." FKGL 6.8
Candidate 2 "Researchers discovered exercise reduces heart disease." FKGL 5.1
Candidate 3 "The longitudinal study demonstrated that cardiovascular outcomes improve with physical activity." FKGL 11.2
Candidate 1 selected: closest FKGL to target 6.9. Ranked second by repetition rate and length inflation as tiebreakers. If all three candidates copy the source verbatim, a retry with encoder_no_repeat_ngram_size=3 is triggered.
4
Safety check

If the output alters any number, URL, email, or citation, the block falls back to M0_CEFR. If M0_CEFR also produces a violation, the original block is returned unchanged. Every block either simplifies correctly or returns the original text verbatim.

5
Response

The backend returns all simplified blocks with per-block diagnostics: model actually used, fallback count, protected spans found, violations, and latency in ms.

6
content.js

content.js re-injects each simplified block into the DOM in place of the original paragraph. The popup status bar updates showing total latency, number of blocks processed, model used, protected spans found, and how many blocks fell back.

Fallback Hierarchy

Two independent fallback paths ensure the page is never left in a broken state. Safety gates always override metric performance.

Path A: Meaning Gate Failure
Neural model generates k=3 candidates
strict check: all candidates below cosine similarity 0.86
Soft threshold retry at 0.65
Short sentences with full vocabulary replacement score lower even when semantically equivalent. The softer threshold handles these cases.
still no candidate clears 0.65
M0_CEFR (rule-based fallback)
M0_CEFR output also fails the gate
Original text returned (ECHO)
Path B: Protected-Span Violation
Neural model (M1 or M2)
number, URL, citation, or email altered in output
M0_CEFR (rule-based fallback)
M0_CEFR also produces a violation or fails
Original text returned (ECHO)

Annotation Highlighter

The extension includes a multi-colour annotation tool for active reading. Select a colour swatch in the popup, then click any text on the simplified page to highlight it. One-click clear removes all highlights. State persists for the session.

Example annotated paragraph

Researchers found that regular exercise reduces the risk of heart disease by up to 35 percent in adults over 50. The study, which tracked 12,000 participants over 10 years, also noted that diet quality was a stronger predictor than exercise intensity alone.

Colour swatches: Clear all

Key Design Choices and Justifications

DecisionChoice MadeWhy
Extension manifestChrome MV3Current Chrome security standard. Separates service worker from content script, reducing attack surface. MV2 is being phased out.
Backend locationLocal FastAPI at 127.0.0.1:8000Page text never leaves the machine. GPU inference at full speed. ONNX export creates a future path to fully browser-local inference with no Python dependency.
Default modelT5-NLI (M1)Lowest number-drift rate (0.60%). Safety gates before SARI. BART-BERTScore has higher SARI but 9.6% drift, which disqualifies it for factually sensitive content.
Aggressive modelBART-NLI (M2)Drift 2.59%, below the 3% deployment threshold. Clear CEFR level differentiation: A2 produces 7.5 FKGL reduction, B2 produces 3.5. BART restructures sentences, T5 tends to substitute words.
Inference accelerationONNX export for T5-NLIAuto-detected at startup. 1.5–2x faster on CPU with numerically identical outputs. Path to transformers.js browser-local inference in future.
Training data filterNLI entailment (deployed)Bidirectional check catches dropped meaning (forward) and added content (reverse). Produces 77k high-fidelity pairs versus 296k for BERTScore. Stricter data, safer model.
FKGL anchorsA2=3.5, B1=6.9, B2=8.5Midpoints of CEFR-aligned FKGL bands. Used for candidate ranking only. Runtime parameter, no retraining needed to adjust.
k candidatesk=3Minimum for meaningful beam diversity. k=1 is greedy. k=5 roughly doubles latency. Auto-downgrades to k=1 on high-block-count pages.
Protected spansPlaceholder masking before generationNumbers, URLs, and citations are replaced with opaque tokens before the model sees the text. Restored verbatim after generation. Any failure triggers fallback rather than silent corruption.
Readability proxyFKGLComputed in microseconds from sentence length and syllable count. No external model needed. Used for both candidate ranking at inference and direction filtering during dataset build.

Offline Research Pipeline

The deployed system is the end product of an offline pipeline that is not active during normal use. It produced all six trained checkpoints.

Dataset Pipeline
5 corpora → custom parsers per source → whitespace normalisation → dedup → alignment filtering → FKGL direction filter → BERTScore or NLI semantic gate → 80/10/10 source-grouped splits with ESS upweighting
Training
Optuna search (15 trials, T5-NLI config) → best hyperparameters transferred to all 6 runs → early stopping patience=4 on validation SARI → best checkpoint saved per run
Evaluation
In-distribution test set → ASSET external benchmark → 46-page frozen corpus (4 models × 3 levels) → 38-rater blinded human evaluation
Safety Diagnostics
Number-drift rate per model → deployment gate at 3% → protected-span violation rate across full corpus → fallback activation counts per page

Live Demo

Make sure the backend is running at http://127.0.0.1:8000 before using this. The rule-based models (M0_CEFR, M0_LEX) work without the backend when called directly, but this demo always routes through the backend for consistency.

⚠ Dataset Quality Limitation

The core reason T5-NLI copies or makes trivial edits is training data quality. The dominant source (Newsela Auto, 55.6% of NLI pairs) treats "simplification" as word deletion and truncation. The reference is shorter, but it has not been genuinely rephrased. That is the shortcut the model learns. ESS is the exception: its references are full sentence rewrites that read like something a human teacher would write. But ESS is only 8.6% of training data (28% after upweighting), not enough to outweigh the Newsela signal.

−2.1
Newsela Manual avg FKGL Δ
mostly a few words removed
−3.6
Newsela Auto avg FKGL Δ
machine-aligned, often just cuts sentences short
−9.8
ESS avg FKGL Δ
full rewrites, every pair is a genuine simplification
Why this matters: A model trained mostly on Newsela picks up a shortcut. It learns that "simplify" means "remove words". When it cannot find anything to cut, it copies instead. ESS data teaches it to actually rephrase. The fix is more ESS-quality data, either curated or generated with LLM paraphrasing verified by an NLI filter.

Training data quality: FKGL reduction per dataset

Average FKGL delta (reference minus source) for each corpus. A more negative value means the reference is noticeably easier to read than the source, which is what you want from a training pair. ESS references are full sentence rewrites so they drop the furthest. Newsela Manual pairs are mostly minor word swaps, which is why their bar barely moves.

Genuine simplification rate per dataset

% of reference pairs where FKGL dropped by more than 1 grade level (i.e., a non-trivial simplification). Newsela Manual: only 63% of pairs qualify. ESS and TurkCorpus: 100%. This is the signal the model actually learns from.

Does the model hit its target reading level?

Each dot is one test sentence. X-axis: source FKGL. Y-axis: output FKGL. Dots below the diagonal got easier. Dashed lines show CEFR targets (A2=3.5, B1=6.9, B2=8.5).

Points clustered near a target line mean reliable level achievement. A cloud above the target means consistent under-simplification.

How much does each model shorten text?

Compression ratio = output words divided by source words. A value of 1.0 means the output is the same length as the input. Below 1.0 means the model produced a shorter output. For example, 0.72 means the output is 28% shorter than the source. Higher compression generally indicates more aggressive rewriting or sentence shortening. T5-NLI (0.968) barely shortens text at all, preferring to rephrase in place. BART-BERTScore (0.719) cuts the most, which contributes to its high SARI score but also its higher risk of losing meaning.

Training data: do simplifications shorten sentences?

Each dot is one source-reference pair. Points below the diagonal were shortened by the annotator. Newsela clusters tightly below the line. TurkCorpus and ASSET are more spread out.

Training data: source vs reference reading level

Average source FKGL versus reference FKGL per dataset. A bigger gap means the dataset pairs harder originals with simpler targets.

Dataset EDA

This section breaks down the five training corpora used to build LexiLift. Each tab shows how many pairs survived each filter, what got dropped and why, and real examples of kept and removed pairs. The Combined tab summarises the full picture across all three filter variants.

556,568
Raw aligned pairs (pre-filter)
77,415
NLI-filtered training pairs
5 corpora
ASSET · ESS · Newsela × 2 · TurkCorpus

Kept vs Dropped by Filter Variant

NLI is the strictest filter, keeping 77k of the 556k aligned pairs. BERTScore keeps 295k and the raw FKGL check keeps 456k.

Dataset Composition by Filter

Newsela Auto makes up 74% of raw pairs. NLI filtering cuts that to 47% because most Newsela Auto pairs fail the entailment check. This shifts the training signal significantly toward cleaner corpora like ASSET and ESS.

Mean FKGL Δ of Dropped Pairs

Average FKGL delta (source minus target) for pairs rejected by each filter, using the same convention as the rest of the page where a negative value means the target was harder to read than the source. Raw-dropped pairs show the largest negative delta (−1.54): these were removed specifically because the target was harder. NLI-rejected pairs have a smaller magnitude (−0.86) because NLI also rejects semantically misaligned pairs that happen to have a modest FKGL drop.

FKGL Direction Filter Drop Rate (within each variant's candidate pool)

Of the pairs each variant was run on, what percentage were rejected by the FKGL direction check (target not simpler than source). Raw: 18% of 556k rejected. BERTScore: 21.6% of its 377k candidates rejected. NLI: 32.2% of its 114k candidates rejected. These percentages only reflect the FKGL step within each filter, not the total reduction. Final dataset sizes are 456k, 295k, and 77k respectively.

Corpus Comparison

Corpus Total pairs NLI kept NLI drop% Avg FKGL Δ Source type Notes
Newsela Auto505,78236,49192.8%-1.8Auto-aligned newsLargest source, noisiest. NLI rejects 93% due to topical not semantic alignment.
Newsela Manual2,8971,73940.0%-2.1Human-edited newsHighest FKGL drop rate of any corpus; editors often expand sentences.
ASSET22,73519,57613.9%-1.410-ref WikipediaClean; NLI/BERTScore pass all. Only FKGL direction check removes pairs.
TurkCorpus15,36110,91229.0%-0.9Crowd-sourced WikipediaVariable quality; bracket glosses and RTF artefacts caught by FKGL check.
ESS9,7938,69711.2%-9.8Professional editorsHighest quality. Full structural rewrites. Upweighted 4x in training.

Filter Summary Table

Filter Variant Total Candidates Kept Dropped Drop % Mean FKGL Δ (dropped) % Target Longer
Raw556,568456,142100,42618.0%−1.5433.9%
BERTScore377,242295,62981,61321.6%−1.4236.5%
NLI114,26177,41536,84632.2%−0.8626.9%
Key finding: The final dataset sizes tell the real story. Raw keeps 456k pairs, BERTScore keeps 295k, and NLI keeps only 77k. NLI ends up with the smallest training set not just because it has the highest within-filter rejection rate (32.2%) but because it also runs on the smallest candidate pool (114k). NLI entailment checking is directional: it rejects pairs where the target drops key information or shifts meaning, even when the two sentences look broadly similar.
46
frozen pages evaluated
12
model × level runs
0.00%
neural violations (all 46 pages)
7.50
max FKGL reduction (BART A2)

Rule-Based Baselines

Model Lvl FKGL Δ % Chg Lat. Viol.
M0_LEXA20.33473.1%7.6 ms0.05%
M0_LEXB10.13744.8%5.1 ms0.00%
M0_LEXB20.09533.3%4.8 ms0.00%
M0_CEFRA20.50786.2%37.0 ms0.25%
M0_CEFRB10.21764.3%14.6 ms0.06%
M0_CEFRB20.16851.6%9.6 ms0.06%

No GPU required, sub-20 ms latency. CEFR substitutions drive larger gains than Zipf lookup at a slightly higher violation rate.

Neural Models (NLI variants)

Model Lvl FKGL Δ % Chg Lat. Viol.
M1_T5A24.04499.7%~215 ms0.00%
M1_T5B14.03399.4%~204 ms0.00%
M1_T5B24.03099.0%~204 ms0.00%
M2_BARTA27.50199.6%~158 ms0.00%
M2_BARTB15.79499.4%~158 ms0.00%
M2_BARTB23.49899.0%~93 ms0.00%

Zero violations across all 46 pages. BART achieves larger FKGL reductions with clear level differentiation (A2 7.50, B1 5.79, B2 3.50). T5 reduces FKGL uniformly by ~4 grade levels across all targets. Neural latencies are approximate (GPU inference).

FKGL Δ by Domain

Avg FKGL reduction per domain, across all CEFR levels.

GOV.UK and NHS pages target FKGL 8 to 10 by design; near-zero gains there are expected. BART achieves its largest reductions on Wikipedia and BBC News, where passive voice and technical vocabulary suit its denoising pre-training.

FKGL Δ by Level (Neural Only)

Does the <A2>/<B1>/<B2> token change behaviour on real web content?

T5-NLI: Delta stays 1.47 to 1.52 across all levels. Weak level sensitivity; copies when source is near the target FKGL.
BART-NLI: A2 gives 3.12 reduction vs 1.45 at B2. Strong level sensitivity. 1.5 to 4x faster than T5-NLI per block.

Example Outputs from Real Pages

Deployed models on real page blocks at B1. GOV.UK is already plain English; NHS and Wikipedia show the T5-NLI (conservative) vs BART-NLI (aggressive) contrast.