Documentation menu

Foundation models on Asense data

Guides to running and fine-tuning time-series foundation models (TimesFM, Chronos-2, MOMENT, TOTO) on Asense records, each compared with a simple baseline.

View as Markdown

Coming soon

The guides' repository, asense-tsfm, is not public yet. This page describes what it holds and the results so far.

What the guides are

Each guide asks one question about Asense data and answers it with a time-series foundation model, a model pre-trained on many kinds of time series that can forecast or score a new one without being trained on it first. Every guide also runs a simple baseline on the same data, and reports the result as it came out, including when the baseline wins.

The guides run on the public dataset of one reference sensor, ASENSE00000005, read from Parquet with DuckDB. They run locally on a laptop: Apple Silicon (MPS) or CPU, with the small model sizes. Model checkpoints are downloaded from Hugging Face on first use.

ASENSE00000005 is a stationary unit on a bench. Its tilt changes by thousandths of a degree, close to the sensor's resolution, and it was re-mounted several times, so the guides work on its longest stable stretches. That makes them tests of method: they show how to run each model on Asense records and what it does on a quiet sensor, not how it performs on a structure that moves.

The guides

GuideQuestionModelStatus and result
1Can a foundation model forecast a sensor's tilt from temperature?TimesFM 2.5, with temperature as a covariateRun. A straight line on temperature forecast best: 0.23 against 0.29 thousandths of a degree of mean error over 128 hours
2Which days in a tilt record look unusual?TimesFM 2.5 and Chronos-2 forecast error, against a rolling z-scoreRun. The two models agree closely and flag days whose shape changed; the z-score flags slow shifts in level
3Does fine-tuning Chronos-2 on your own sensor improve its forecasts?Chronos-2 with LoRA fine-tuningRun. No: about 1,400 hours of a quiet record were too few, and the fine-tuned model was worse than both zero-shot and "same hour yesterday"
4Which vibration records look odd?MOMENT reconstruction error, against an RMS threshold and an FFT peak ruleRun. The methods flag different records; MOMENT's top record falls on a day the unit was re-mounted
5Can one model learn a whole tilt chain at once?TOTO multivariate fine-tuneOutline. Uses simulated demo data, since one device is not a chain
6Does a model trained on one structure forecast another?TOTO refitOutline. Two mountings of ASENSE00000005 stand in for two structures
7Can a model forecast tomorrow's noise levels?Chronos-2 and TOTO 2 zero-shotOutline. Needs an Environmental Sensor's env records
8Does a small model trained from scratch match a fine-tuned one?TimesNetOutline, on the same data as guide 3

Each run guide has a notebook version with the question as its title, and saves its plots.

Running a guide

export ASENSE_DATA=/path/to/asense-dataset/data
cd guides
uv run --with-requirements ../requirements.txt python 01_tilt_from_temperature.py

Guide 4 uses the MOMENT package, which needs an older version of transformers, so it has its own requirements file, requirements-moment.txt.

What the results say so far

On a quiet sensor, simple methods are hard to beat. A line on temperature explains this unit's tilt better than any forecast model, and fine-tuning on a short record overfits. Where the models add something is in noticing records or days whose shape is unusual even when their level is not. That is worth having as a list of records to look at, rather than as alarms. The guides are meant to be re-run on longer records of structures that really move, where the models have more to learn.

Models and licences

ModelCheckpointLicence
TimesFM 2.5google/timesfm-2.5-200m-transformersApache-2.0
Chronos-2amazon/chronos-2Apache-2.0
MOMENTAutonLab/MOMENT-1-smallMIT

Licences are as stated on each model's Hugging Face model card. The models for guides 5 to 8 are added here when those guides are written.