HESPERN
New rwml 1.0 is on PyPI: pip install rwml

Read-Write Machine Learning

Models that learn by changing their weights and their data. A read-write model writes to the data it trains on, in the same run that trains its weights, so it learns from the data that helps it forecast. Faulty sensors and wrong entries are where it shows most.

labelled faultforecast with writingforecast without writingvalue the model searched forReal hourly meter and forecasts, LEAD 1.0. The search is illustrative: on this meter the model stopped learning from the faulty hours.

What is Read-Write ML

How it works

Every model learns by changing its weights. In Read-Write Machine Learning (RWML), the model also changes its data: in the same training run, it writes to the values it learns from, correcting them, giving them less weight or reshaping them, whatever helps it forecast better. On real data that often means a frozen sensor or a wrong entry stops bending the forecast.

Model-centric AI

The data is held fixed. Training changes the weights.

Data-centric AI

The model is held fixed. The data is improved, often with AI tools, before training.

Read-Write ML

Nothing is held fixed. Training changes the weights and the data together. Every value it writes is logged for you to review.

93%lower error on a real building meter with faults10.3% and 8.4% on average, in two tests on 464 meters
#1of 9 forecasters on real building meters3.2% below ARIMA, in two tests on 600 meters
36%lower error on a public benchmark series1.7% on average, over 709 fresh series
No harmto ARIMA, ETS or Theta trained on written datastandard cleaners made them up to 20% worse

3,210 real series · 1,055 real building meters · 9 tests, each fixed in advance and run once · 39 of 47 pre-registered claims hold

Same model with and without writing, everything else equal. Real meters: Building Data Genome 2 (891 buildings, 2017) and LEAD 1.0 (164 buildings, faults labelled by its authors; Gulati and Arjunan), CC BY-SA 4.0. Benchmark: M4 and FRED-MD series never used to build the method.

A real meter, with and without writing

All ten examples

Where it pays off

Bring your use case

Sensors and machines

Dropouts, frozen readings and calibration spikes stop leaking into your predictions.

Energy and utilities

Meter faults and outage days no longer bend load and demand forecasts.

Retail and operations

Stock-outs and one-off events stop being learned as normal demand.

AI agents

Agent payments checked against what the customer asked, with Plenipo.

Peer-reviewed research

All papers

To apply Read-Write Machine Learning to your own data or models, contact us.

The research behind every product. Each idea is published first. The version we ship is rebuilt, then tested once on data it has never seen.

Results and papers

What comes next

Work with us on it

Images

Networks that fix wrong labels while they train.

Decision trees

Tree models that correct the data they split on.

Any neural network

A read-write layer for the models you already run.

Agent actions

Read-write learning for agent behaviour and payment disputes.

Results are published here only after they pass the same test on fresh data.

To apply Read-Write Machine Learning to your own data or models, contact us.

Three products, one principle. rwml is the open-source library, the Hesperon Engine runs read-write models in production, and Plenipo checks agent payments for banks.

rwmlHesperon EnginePlenipo
ForML engineers and researchersData and ML teams in productionIssuing banks
What you getConfirmed read-write methods in PythonRead-write models at scale, audit log, supportAn intent score before payment, and evidence after a dispute
StatusOpen sourcePilots with design partnersEarly access
Startpip install rwmlContactRequest access

To apply Read-Write Machine Learning to your own data or models, contact us.

Hesperon Engine. Read-write models in production. The Engine trains read-write models on your data at scale and keeps an audit log of everything they write. Available today for time series; other model families follow as each is confirmed.

ContactSee the evidence

Real output of rwml on a demo series with two values broken on purpose. The Engine interface is in design.

Your data stays untouched

Models fix their own copy; your source data never changes.

Every change auditable

Everything the model writes is logged, so a reviewer can trace any prediction back to its data.

Built for many series

Trains many series at once, in batches on GPUs.

Expert support

Direct access to the researchers who built the methods.

How a pilot works

Contact
1. Scope, one call

Pick one dataset and the model you rely on today.

2. Run, side by side

Read-write models next to yours, on the same data split.

3. Report

Every value changed, where and why, and the error series by series, losses included.

4. Production

Read-write models run on the Engine, with the same log of every change.

To apply Read-Write Machine Learning to your own data or models, contact us.

Early access for banks

Plenipo. Intent assurance for agentic payments. Networks verify who the agent is. Plenipo verifies it did what the customer asked.

Contact

Customergives a requestAI agentshops and paysAgent protocolsAP2, Visa, MastercardPlenipochecks the intentIssuing bankapproval and disputesCustomergives a requestAI agentshops and paysAgent protocolsAP2, Visa, MastercardPlenipochecks the intentIssuing bankapproval and disputes

The agent was authorised. The purchase was wrong.

What the customer asked

“Flights to Porto under €500, direct, in the morning.”

What the agent bought

€480 · one stopover · 06:10 departure

Not fraud: the card and the agent are real.

No network rule decides who pays.

The issuing bank takes the customer’s call.

One intent score, used at two moments

Before payment

Is the cart what the customer asked for?

Checks every constraint in the request, and whether the agent behaved normally.

ApproveAsk the customerBlock
After a dispute

Who is right, with proof, in seconds

Builds the case from the request, the agent’s steps, the cart and the customer’s history.

RefundCharge backReject

Built for banks

Neutral across protocols

Works with AP2, Visa and Mastercard, so the bank does not bet on one.

Fits your fraud stack

Complements the tools that stop criminals, by API: they check who pays, Plenipo checks what was asked.

Runs on premise

Customer data stays inside the bank.

Availability

Plenipo is in development with issuing banks. For an introduction, write to partners@hesperon.com.

rwml

Check every claim on this site on your own data. rwml is our open-source Python library for Read-Write ML. Each method ships only after it passes a test on fresh data.

pip install rwml
MethodWhat it fixesStatus
RWLSTM()Lowers the weight of training values that do not fit; the defaultConfirmed on fresh data; in rwml 1.0
CorrectorLSTM()Writes better values in place of training values that do not fitConfirmed on fresh data; in rwml 1.0
RWLSTM(read="gradient", write="input")Rewrites training inputs through the gradient of the lossAs published (IEEE ICDM 2025); in rwml 1.0
RW-CNNWrong labels and corrupted imagesIn research

Why you can trust a method in rwml

Code checked

Reviewed against the method and tested.

Known faults found

On synthetic data it must find planted faults and leave clean data alone.

Built apart from the test

Design choices are made on data the test never sees.

Tested once, on fresh data

One claim, written down first, against the same model with writing off.

Need it at scale, with support and an audit log? See the Hesperon Engine.

Evidence you can check. Each method is tested once, on public data it has never seen, against the same model without writing. The claim is written down before the test, and losses are shown with the gains.

Faults injected into the training data · 631 series

What is Read-Write ML

Every pre-registered claim

Every claim we have written down before a test, . How much lower the test error is, with its 95% interval; right of the line is better. Filled dots hold after correction for multiple claims; hollow dots do not. Values are as pre-registered; for BDG2, leaving out 4 meters whose score is undefined gives 3.2% for Trim + ARIMA vs ARIMA.

Every series, sorted

RW-LSTM Trim against the same model without writing, one bar per series. The more faults the data holds, the larger the gains; the few losses are shown too.

How every method is tested

Same model, writing off

Same architecture, settings and seeds, so the difference is the writing.

Fresh public data

M4, FRED-MD, Melbourne pedestrian counts and real building meters (LEAD 1.0, Building Data Genome 2), never used in development.

Claim fixed first

Written before the test; several claims corrected with Holm.

Everything shown

Every series, significance tests, the worst losses and strong statistical baselines.

Best forecaster on real building meters

Protocol

Averaging the read-write LSTM with ARIMA gave the lowest error of every forecaster we tested, in two separate tests on 600 fresh meters, about 7% lower than simply copying the last hour. The same average built without writing does not beat ARIMA: the gain comes from the writing.

forecastererror, first 300 meterserror, next 300 meters
Read-write LSTM + ARIMA (average)read-write0.3040.303
ARIMAstatistical0.3140.312
Same LSTM without writing + ARIMA (average)control, no writing0.3180.317
Copy the last hourbaseline0.3290.326

Error: geometric mean over meters of (test MASE + 0.01); lower is better. First test: 296 meters (4 with an undefined error scale left out), 3.2% to 4.0% lower error than ARIMA; second test: 3.16%. Pre-registered, each run once. Building Data Genome 2, CC BY-SA 4.0. All nine forecasters of both tests are in the protocols.

Benchmark details on mostly clean public series (M4, FRED-MD, pedestrian counts)

On mostly clean series the read-write models still beat the same LSTM without writing; classical statistical models are strong on this kind of data, and we show them as they rank.

CorrectorLSTM benchmark · 675 series

Read the result

RW-LSTM benchmark · 709 series

Read the result

Mean rank per series (1 is best) and Bradley-Terry rating with 95% intervals; the LSTM without writing is anchored at 1000. MASE is the shifted geometric mean. Data: M4 (Makridakis, Spiliotis, Assimakopoulos); Melbourne Pedestrian Counts (City of Melbourne, CC BY 4.0); FRED-MD (McCracken and Ng, CC BY 4.0); via the Monash forecasting archive.

To apply Read-Write Machine Learning to your own data or models, contact us.

We make AI that learns by reading and writing its data. Hesperon was founded by the researcher who introduced Read-Write Machine Learning, to take it from papers to production.

Why now

Models are trained on more data than anyone can clean by hand, and AI agents now act on data directly. Data that can correct itself is becoming a requirement, not a research topic.

Founder

Yassine Baghoussi

Founder

Yassine started from a simple question: why should a model take its training data as given? His PhD at the University of Porto, with Carlos Soares and João Mendes-Moreira as advisors, answered it with Read-Write Machine Learning: models that improve the data they learn from. The work is published in top-tier venues, including an A* conference and a Q1 journal.

A researcher at INESC TEC’s Laboratory of Artificial Intelligence and Decision Support (LIAAD) since 2017, he is also a member of its Digital Transformation Group, where he designed and built TECA, the institute’s AI assistant.

Hesperon is where his research meets real-world data.

How we work

Fix, never overwrite. Models change their own copy; your data stays as it is.

Log everything. Every change can be reviewed.

Prove it first. Fresh test data, claims fixed in advance, losses shown.

Contact

hello@hesperon.com

To apply Read-Write Machine Learning to your own data or models, contact us.

Contact. Tell us about your data, your payments or your research question. We read every message and reply in person.

Who we work with

Data and ML teams

Read-write models trained on your own data, run next to the model you use today, with a log of everything the model wrote. Time series today; other model families as they are confirmed. Hesperon Engine

Issuing banks

Intent assurance for payments made by AI agents. Plenipo

Researchers

Collaboration on Read-Write Machine Learning, its methods and its evaluation. Research

Direct

General: hello@hesperon.com
Partnerships: partners@hesperon.com

Your message is ready

Send it from your email app to partners@hesperon.com, or copy it.

Open in mail

Read-Write Machine Learning (RWML). Models that change their weights and their training data together, to learn better.

How it works

1. Read

The model trains on your data as usual.

2. Weigh

Its own errors show which values help it learn and which mislead it: a frozen meter, a spike, a stock-out day, a wrong entry.

3. Write

It writes to those values, correcting them, giving them less weight or reshaping them, while its weights train.

4. Log

Every write is recorded: where, the value recorded and the value written.

What it means for you

See the evidence

No separate cleaning project

The model decides what to write in the data you already have. No rules to write and maintain for every new failure.

Changes you can audit

You see every value the model changed and why, so your team stays in control of its data.

Safe for the models you run

In our tests, ARIMA, ETS and Theta trained on the fixed data were never made worse; standard cleaners made them up to 20% worse.

Three ways to build AI

Model-centric AIData-centric AIRead-Write ML
Held fixedThe dataThe modelNothing
What changesThe weightsThe data, in a separate stepThe weights and the data, together
Who changes the dataNo oneA separate cleaning step, with AI tools, rules or peopleThe model, as it learns
WhenNeverBefore trainingDuring training
What you getA model fitted to faults in your dataCleaner data, at the cost of a cleaning projectA model that learns from the data that helps it, with a log of every write

Where it came from

All papers
2019

Yassine Baghoussi starts his PhD at the Faculty of Engineering, University of Porto, on models that correct the data they learn from.

August 2020

First paper on the method: PastProp-RNN, at MiLeTS '20, the KDD workshop on Mining and Learning from Time Series, with André Baptista, whose master's thesis Yassine supervised.

March 2021

Andrew Ng starts speaking about data-centric AI ("MLOps: From Model-centric to Data-centric AI"), which made the term widely known.

2024

PhD thesis introducing the term Read-Write Machine Learning (RWML) for this family of methods. Corrector LSTM published in Neural Computing and Applications.

2025

Read-write LSTM published at IEEE ICDM.

2026

Hesperon. rwml 1.0 released. The read-write model is confirmed on over 1,000 real building meters in four tests, each fixed in advance and run once.

Related ideas exist in other fields, such as robust statistics and learning with noisy labels in image classification. Read-Write ML makes writing to the training data a general part of how a model learns.

Writing is not cleaning

A cleaner asks: is this value wrong? A read-write model asks: does this value help me learn? The answers are not the same.

In our fault-injection test on 631 series, the values CorrectorLSTM wrote made its own network 23% more accurate. Yet for ARIMA, a standard cleaner worked better than those same written values. The writes were made for the learner, not as a clean copy of the data for any model.

Can a value that passes every statistical test still mislead a network? We are testing it, model by model. Our first pilot says that for CorrectorLSTM the gain comes from the values a detector would also flag; the writes on normal-looking values neither help nor hurt. The read-write LSTM (Trim) tells a richer story. On injected faults its gain also comes from values a detector would flag. But on real building meters, it also sets aside some normal-looking hours, mostly the steepest ramps of the daily cycle, the hardest to learn, and forecasts better for it. Those values are not faults, so this is not cleaning; trimming at random instead makes it worse, so it is reading its data. Where the ramps are the signal, on strict on/off schedules, it can hurt. Confirmed on 291 fresh meters, fixed in advance.

See the fault-injection results

Questions we tested

Can a read-write model over-write its data?

Models can overfit their weights; a model that also writes to its data could over-write it. Tested on about 700 fresh series, fixed in advance: no over-writing found, even when the model is pushed to drop half its training targets. Read the answer.

Do writes on normal-looking values help?

If read-write models only removed outliers, a cleaner could do the same job. First pilots: for CorrectorLSTM, and for the read-write LSTM on injected faults, the gain comes from values a detector would also flag. On real building meters, the read-write LSTM also gains by setting aside steep but normal daily ramps. Confirmed on fresh meters.

Do writes help models that did not make them?

If writes only served the model that made them, other models trained on the written data would gain nothing. Our first test found they do no harm to ARIMA, ETS or Theta; the next tests other neural models.

Founder's note: why models never wrote to their data

Machine learning grew up when data was scarce and the people building it were mostly mathematicians and statisticians. The natural question was how to fit a model to the data you had. The data itself was taken as given; cleaning it was preprocessing, done before learning, often by someone else.

That habit stayed. Benchmarks fixed the dataset and ranked the models, so decades of progress went into how models read data: better architectures, better ways to extract what matters for the prediction. Data-centric AI rightly turned attention back to the data, but kept the split the other way round: hold the model fixed and clean the data, often with AI, before training. In Read-Write Machine Learning nothing is held fixed; the model and its data work together.

In 2019 I started from a different question: what if the model itself could write to the data it learns from? It sees, better than any rule written in advance, which values its own errors say don't fit. Our first answer, PastProp, was published in August 2020. Read-Write Machine Learning is that question taken seriously: a model with write access to its training data, and a log of everything it changes.

Yassine Baghoussi, founder

To apply Read-Write Machine Learning to your own data or models, contact us.

QuestionsConfirmed

Is a read-write model just a data cleaner?

On injected faults, CorrectorLSTM's writing is cleaning done inside the model; Trim's is mostly cleaning. On real building meters, Trim also sets aside normal values, mostly the edges of daily switching, and forecasts better for it.

22.6%lower error from CorrectorLSTM’s own writes631 series with injected faults
80%more error when ARIMA uses those writes instead of a cleaning filterthe claim that failed, reported
3.7%lower error from setting aside normal-looking values291 real meters

The question

A read-write model changes two things while it trains: its weights, like any neural network, and its own training data. Our models do this to time series. They give no weight to training values they cannot explain, or they write new values in their place. Faulty sensor data is the main use case, so a natural question follows: is this just data cleaning done inside the model? If it were, you could get the same result by running a cleaning filter first and then training an ordinary model.

What we expected

If writing were cleaning, two things would follow. First, the writes would only matter on data with faults; on clean data there would be nothing to write and no gain. Second, the written data would be better data for any model, not only for the model that wrote it. A cleaned series should help a classical forecaster too.

What we found

Both predictions fail, in our confirmed experiments.

Writing helps on data that is mostly clean. On 709 M4 and FRED-MD series, real benchmark data with no injected faults, the read-write LSTM (Trim) has 1.66% lower error than the same LSTM with writing switched off (95% interval 1.29% to 2.06%; better on 86 series, worse on 37, the rest tied). The gain is small, as it should be on data that is mostly clean. A pure cleaner would have nothing to do here.

The writes are made for the model that makes them. In our fault-injection experiment we put spikes, level shifts, stuck values and dropouts into the training part of 631 series. The improved CorrectorLSTM, which writes new values into its copy of the series, has 22.63% lower error than the same LSTM without writing (95% interval 20.57% to 24.78%). So its writes clearly help its own learning. We then gave its written series to ARIMA, a classical forecaster, and compared that with ARIMA on the same faulty series after a standard cleaning filter (Hampel). If the writes were cleaning, ARIMA should do at least as well on them. It does not: ARIMA on the written series has 80% more error than ARIMA after the filter, and is worse on 438 of the 631 series. This was one of our pre-registered claims, and it failed. We report it because it is informative: what the model writes is useful to the model, not a cleaned dataset for anyone.

Where the writes fall: the confirmation

Many writes fall on values that look normal: no standard outlier detector flags them. So we let each model write only where a detector (Hampel, or a seasonal decomposition with an interquartile rule) or the data owner would also flag a value, or only where none would, and compared, on fresh series with three seeds, pre-registered.

CorrectorLSTM: writing is cleaning. On series with injected faults, writing only where a detector agrees is not worse than all its writes (0.45% lower error, 95% interval 0.24% to 0.67%), and 99.4% of its writes on injected faults move the value toward the clean one (2,318 of 2,331). On real meters its writes are not reliably better than the same number of writes at random positions (0.19% lower error, interval -0.02% to 0.42%). For this model, writing is cleaning done inside the model, with the two differences above: no separate cleaning step, and the written data is not a cleaned dataset for other forecasters.

Trim on injected faults: mostly cleaning. Its trims on normal-looking values, used alone, make the forecast worse than no trimming (3.91% higher error, interval 1.93% to 5.97%). Together with its trims on the faults they still add a little: all its trims beat trimming only what a detector flags by 1.47% (interval 0.52% to 2.54%).

Trim on real building meters: more than cleaning. Here its trims on normal-looking values, used alone, make the forecast better than no trimming: 3.70% lower error (interval 2.30% to 5.07%) on 291 fresh meters. By a rule fixed before the run, 92.6% of these trims (4,752 of 5,132) sit on the edges of switching: an hour whose change from the previous hour is among the largest 20% for that meter, or next to one. Those values are not faults; the model learns better without the sharpest edges. On strict on/off schedules, where the edges are the signal, this can hurt, so compare with writing off there.

Are Trim's trimmed series a cleaned dataset? Partly. Gradient-boosted trees (LightGBM) trained on them gain 2.95% (interval 1.16% to 4.78%, a secondary result), but another LSTM with a different seed does not gain reliably (1.03%, interval -1.23% to 2.78%).

What would change our mind

  • For CorrectorLSTM the confirmation agrees with the pilot: on such data it behaves like an adaptive cleaner built into the model, and we describe it that way.
  • If a cleaning filter tuned per series matched the read-write model on faulty data, the case for writing inside the model would rest on convenience (one step instead of two), not on results.
  • If the clean-data gain disappeared on a fresh, untouched set of series, the first finding above would not hold.

Further reading

Every number on this page comes from a pre-registered test, run once on fresh data. Open work is described without numbers until its test has run.

To apply Read-Write Machine Learning to your own data or models, contact us.

QuestionsConfirmed

Can a read-write model over-write its data?

No. Pushed to its most aggressive setting, our read-write model still forecasts better than the same model without writing.

10.8%lower error than writing off, at the most aggressive setting291 real meters
12.1%lower error than the same number of writes at random placesbetter on 239 of 291 meters
10 of 11pre-registered claims holdfresh series, tested once

The question

A neural network can overfit its weights: it learns its training data so closely that it does worse on new data. A read-write model also changes its training data while it trains. So it could over-write: drop or change the values it finds hard, which lowers its training error without teaching it anything. We wanted to know whether this happens, and how to prevent it if it does.

Definitions

  • Write: a training value the model replaces with a new value, or a training target it gives no weight. Trim, our default model (RWLSTM()), gives no weight to the targets it cannot explain; CorrectorLSTM writes new values.
  • Over-writing: writes that lower the error on the model's own training data while raising its error on new data, compared with the same model with writing switched off.

How we tested it

We ran small pilots first, then wrote down eleven claims, their tests and the number of series each needed, and ran them once on series no experiment had used: 291 raw building electricity meters, 140 benchmark series that are mostly clean, 173 with faults we injected into the training part, and 96 synthetic series with no faults at all, each with 3 seeds. A claim counts only if it survives a correction for testing eleven claims at once.

What we found

Pushing the model to write more did not make it over-write. At its most aggressive setting Trim set aside more than half of its training targets (57% on the meters, 58% on the clean benchmark series). Its error on the targets it kept fell sharply, as expected, but its forecasts did not get worse than without writing: on the meters they had 10.78% lower error than the same model without writing (95% interval 8.05% to 13.36%), and on the clean series 5.00% lower. The default setting gave 11.29% and 2.11% (descriptive).

291 real building meterserror lower than writing off0%20%40%60%80%0%20%40%60%10.8% lower test error72% lower training error140 mostly clean benchmark serieserror lower than writing off0%20%40%60%80%0%20%40%60%5.0% lower test error64% lower training error
Error on the training values it kept Error on new data, both against the same model with writing off. Horizontal axis: share of training values the model set aside, from writing off to its most aggressive setting. Training error keeps falling; error on new data never gets worse than writing off.

Where it writes matters, not how much. Setting aside the same number of targets at random instead of where the model chooses lost: the model's own choice had 12.07% lower error on the meters (95% interval 10.33% to 13.85%; better on 239 of 291 meters).

No harm on clean data. On synthetic series with no faults, Trim was not worse than writing off (0.86% lower error, 95% interval 0.17% to 1.56%); CorrectorLSTM tied with writing off on all 96 series.

It finds the faults. On series with injected faults, the targets Trim set aside were injected faults 32 percentage points more often than their share of the data (95% interval 30.5 to 33.4).

The usual controls are not needed, and do no harm. A budget of writes (at most 10% of the targets) or dropping 30% of the writes at random kept the forecasts better than writing off (2.96% and 2.09% lower error), but the unrestricted setting was already safe.

What did not hold. Another LSTM, trained on the series with Trim's set-aside targets removed, was not reliably better than on the recorded series: 1.03% lower error, but the 95% interval (-1.23% to 2.78%) includes no difference. Gradient-boosted trees (LightGBM) did gain from the same series (2.95% lower error, a secondary result).

Why the pilot looked different

Our first pilot, on 60 mostly clean benchmark series and one seed, suggested that forecasts got worse once the model ignored more than half of its targets. On 140 fresh series with three seeds this did not happen. The pilot was too small to tell; that is why we confirm before we publish.

What it means

On these data, a read-write model that decides from its own residuals what to learn from does not drift into fitting only what is easy. The question stays open for other kinds of writing: models that write new values far from what they read, or that keep writing throughout training, could behave differently, and each new model in rwml will be tested for it before it is added.

Further reading

Every number on this page comes from a pre-registered test, run once on fresh data. Open work is described without numbers until its test has run.

To apply Read-Write Machine Learning to your own data or models, contact us.

Questions we are testing. What a read-write model really does, asked as plainly as we can, with the experiment that answers it, and what would change our mind.

To apply Read-Write Machine Learning to your own data or models, contact us.