← Writing LLM & Time Series

Teaching a Small LLM to Read Time Series: From ChatTS to LFM3-TS

A Visual Guide to Patch Encoders, Reading Losses, a Three-Stage Training Recipe, the ChatTS Benchmark, and Anomaly Detection on Real Series

November 2026 16 min read Nardi Xhepi

Language models are good with words and, let's be honest, not great with numbers. Paste a few hundred sensor readings into a chat window and ask what the trend is, or where the spike is, and you will usually get a confident, fluent, and wrong answer.

I wanted to find out how far a small model can get on this problem if it reads the series directly instead of reading digits. The result is LFM3-TS: LFM3-1.7B from Liquid AI with a time-series encoder in front, built on the ideas and the synthetic data of the ChatTS paper, with a training recipe of my own. You give it a series and a question, and it answers in text: what the trend is, whether there is a period, where a local change sits and how large it is, what the value is at a point, and whether something in the series is an anomaly.

(a) Trend · Time Series · 256 points

050100150200250

Question
“What is the trend of this series?”

LFM3-TS
“increase, the starting point value is around 52.08, and the trend change value from left to right is around 36.82.”

Reference answer
“increase, the starting point value is around 51.69, and the trend change value from left to right is around 37.44.”

(b) Periodicity · Click-Through Rates on Posts · 256 points

050100150200250

Question
“Is there a periodic fluctuation?”

LFM3-TS
“periodic fluctuation, each period is around 28.70 points, and the amplitude of the periodic fluctuation is around 11.80.”

Reference answer
“periodic fluctuation, each period is around 27.30 points, and the amplitude of the periodic fluctuation is around 11.70.”

(c) Local changes · gc buffer busy acquire · 256 points

050100150200250

Question
“What are the local changes of this series?”

LFM3-TS
“upward spike, position around point 165, amplitude 67.36; upward spike, position around point 226, amplitude 113.14”

Reference answer
“upward spike, position around point 165, amplitude 66.28; upward spike, position around point 226, amplitude 112.52”

(d) Noise · Time Series · 256 points

050100150200250

Question
“What are the noise characteristics of this series?”

LFM3-TS
“noisy, the overall noise standard deviation is around 1.50.”

Reference answer
“noisy, the overall noise standard deviation is around 1.48.”

Figure 1: Four questions of the ChatTS benchmark, with the answer of LFM3-TS and the reference answer. (a), (c), and (d) are real series from set A; (b) is a synthetic series from set B. I picked these four by hand and shortened the questions.

You might expect a 1.8B model to land well below ChatTS-8B, which is more than four times larger. On the benchmark of the ChatTS paper, which asks about trend, seasonality, noise, local changes, and the relations between several series, it does: LFM3-TS is 2 to 6 points behind. On anomalies in real series from sources that neither model was trained on, it is the other way around. LFM3-TS finds more of them (64% versus 53%), and it raises fewer than half as many false alarms (28 versus 61).

This article covers how the model reads a series, how it is trained, and the results in three parts: the benchmark of the ChatTS paper, anomalies in real series, and how well the model reads values and describes what it sees.

PS: This is a personal project, and I am not affiliated with Liquid AI or with the ChatTS authors, whose work made this one possible.

1. Why can't a language model just read the numbers?

A language model reads tokens, and a time series is a list of numbers. The obvious trick is to write the numbers as text, but it has two problems. It is expensive, because each number breaks into several tokens. And the model loses track of where it is: to say "the spike is at point 301", it would have to count commas. The figure below shows the alternative.

As text

0.42,0.45,0.51,3.12,0.48,0.44,0.39,0.41,…2,000+ tokensfor 512 points. To find point 301, count the commas.

Each number breaks into several tokens.

As patches

66 tokensfor 512 points. Each token holds 8 points and their positions.

One token for each group of 8 points.

Figure 2: Two ways to give a series to a language model. LFM3-TS uses the one on the right, like vision-language models do with image patches.

ChatTS applied this idea to time series, and LFM3-TS does the same on a much smaller language model.

2. The LFM3-TS architecture

A time-series encoder and a projector sit in front of the language model. The architecture of the language model is untouched, so the weights of LFM3-1.7B load without changes.

“Yes, around points 394 to 425. Four sharp bursts …” LFM3-1.7B language model 24 layers · width 2048 · all layers trained, token embeddings frozen prompt statistics as text question Projector MLP 1024 → 4096 → 2048, then normalization Rebuild the 8 points second loss, training only Patch encoder 4 feed-forward + 2 attention layers · width 1024 for each point: value, observed flag, position (sine and cosine) standardized series, cut into patches of 8 points (8 patches shown) offset · scale · min · max written in the prompt as text “Is there an anomaly?” series token (one for each patch) learned start and end tokens text token new, learning rate 2e-4 LFM3, learning rate 1e-5
Figure 3: The architecture of LFM3-TS. The encoder and the projector are new; they turn each patch of 8 points into one token of the language model. A series of 512 points thus costs 64 tokens, plus one start token and one end token.

2.1 Four design decisions

Most of the model is standard. Four decisions do the real work.

(a) About 30 times fewer tokens

The series as textmore than 2,000 tokensThe same series as patches66 tokens

The two bars are on the same scale, for a series of 512 points. One patch of 8 points makes one token.

(b) The model reads a position, it does not count

1041051061071081091101111 token

Every point enters the encoder with its index. So the model can answer “the spike is at point 105” without counting tokens.

(c) The scale travels as text

5,5504,870your seriesthe shape, from −1 to +1offset 5210 scale 340the scale, as text in the promptLFM3“… the value falls to 4,870.”

The encoder only sees the shape. The real scale goes into the prompt as text, so the answer can give real values.

(d) No new vocabulary

The prompt, as writtenThe prompt, as the model reads itThisThisseriesseries::<|ts|><|ts|><|ts|>..AnomalyAnomaly??

The text is unchanged. Each <|ts|> placeholder, a free row of the LFM3 vocabulary, is replaced by a series token.

Figure 4: The four design decisions of LFM3-TS.

2.2 What is trained

The model has 1,781 million parameters, and training updates 1,519 million of them: the new encoder and projector at a learning rate of 2e-4, and the whole language model at a much gentler 1e-5. Only the token embeddings (262 million) stay frozen.

3. A model can learn to talk without reading

The obvious way to train such a model is on the ChatTS training data alone. There is a trap in it. The loss goes down, the answers look great, and the numbers in them can still be wrong: the model learns to write like a model that reads time series. The cause is in the data.

An answer of the ChatTS data

Theseriesshowsanupwardtrend,withaspikeof4.2nearpoint301.phrasingdepends on the series

Most tokens are phrasing. The loss falls without reading.

An answer to a generated question

“Give the mean of each block of 8 points.”3.1,2.8,4.0,3.7,1.2,0.9,1.4,2.2,…phrasingdepends on the series

Every number is a fact from the series.

Figure 5: Why the loss can fall while the model ignores the series. The sentence on the left is an illustration, not a line of the dataset.

Two things fixed it.

Three questions for each token

points 104 to 111mean of the blockwhat is in the token0.39place of its highest valuewhere, inside the token2point of its highest valuewhere, in the series105

One target per series token, so no token can be ignored.

A second loss

linear8 pointstoken8 points, rebuiltdifference = second loss

A linear layer rebuilds each patch from its token. It is used in training only.

Figure 6: The two fixes: questions that give every series token a target, and a second loss that makes every token keep its patch.

3.1 Questions with one answer per token

I wrote a generator of questions on synthetic series, where the answer can come from the series and from nowhere else. Three types of question give one target for each series token (the left panel above).

Other questions are about a single event: a spike, a level shift, a trend, a period. Every number in these answers is a fact the model has to read.

A second family asks for values in the unit of the series: the value at a point, the mean of a block, the lowest and highest value of a stretch. The encoder only sees a standardized series, so the model has to combine what the tokens hold with the scale written in the prompt (panel (c) of Figure 4).

3.2 A second loss on the series tokens

The second fix (the right panel above) is a small linear layer that rebuilds the 8 points of a patch from its token. Its error is added to the answer loss, so the model is trained on a single number:

L = Lanswer + λ · Lrebuild

Lanswer is the usual cross-entropy on the tokens of the answer. Lrebuild is the error between the rebuilt points and the real ones (a Huber loss), and λ is 1 in all three stages.

The linear layer reads the tokens right after the projector, before the language model. So Lrebuild only reaches the encoder and the projector, and the language model is only updated by Lanswer. The encoder gets both signals: make tokens that help to answer, and make tokens that still hold every point. The linear layer is not part of the released model.

4. The three-stage training recipe

The recipe has three stages, and each one starts from the weights of the one before. Everything fits on one GPU with 95 GB of memory.

STAGE 1 Learn to read Generated questions only series of 64 to 512 points STAGE 2 Read long series Generated questions only series of up to 2,048 points STAGE 3 Learn to answer Mixture of five data types 20,000 steps ChatTS synthetic data: 48% of the examples Generated questions: 19% of the examples Plain chat: 15% of the examples Real series with labelled anomalies: 10% of the examples Real series with events put in: 8% of the examples 48% 19% 15% 10% 8% ChatTS synthetic data descriptions and questions Generated questions reading and verdicts Plain chat no series Real series labelled Real series with events put in
Figure 7: The three stages of the recipe, and the data mixture of stage 3. Stage 1 starts from LFM3-1.7B and a freshly initialized encoder.

4.1 The stages

  1. Learn to read. Generated questions only. At the end of this stage, the model gives the exact point of a spike.
  2. Read long series. The same questions, on series of up to 2,048 points. Without this stage, the positions go wrong after point 512.
  3. Learn to answer. A mixture of five data types, each with one job:
Data typeShareJob
ChatTS synthetic data48%Teaches the model to describe a series and to answer questions about it.
Generated questions19%Keeps the exact reading alive, and teaches the answer "this series is normal".
Plain chat15%Keeps the model a chat model. The answers come from the original LFM3-1.7B.
Real series, labelled10%Shows the model real anomalies with labels (section 4.2).
Real series with events put in8%Teaches that an anomaly is what a series does not usually do (section 4.3).

4.2 Adding real series

Synthetic data doesn't contain all the shapes of real signals, so I added windows from TSB-AD-U, a public benchmark of labelled series from web services, servers, ECG recordings, and motion sensors. The windows have 256 to 1,024 points.

The labels say where the anomaly is, but not what it looks like, and a chat model needs something to say. The figure below shows how each labelled window becomes a training answer.

A clear anomaly

A script measures: direction, size, level before and afterClaude Sonnet 5.5 writes one sentence from these valuesAnswer: “Yes”, the place, and the description

The description comes from measured values only.

A subtle anomaly

A script measures: nothing stands outNo measured value to describeAnswer: “Yes”, the place, “the shape differs”

No measurable change: the answer gives the place and one fixed sentence, with no number.

Figure 8: From a label to a training answer. The language model that writes the description sees the measured values and nothing else, so it cannot describe a shape that is not there.

The training file has 1,900 windows. Approximately half of them have no anomaly, and the correct answer is then simply "No".

4.3 An anomaly is what the series does not usually do

Labelled windows are few, and a model can take a shortcut: "a spike is an anomaly", full stop. In many real series, spikes are the normal behaviour, and a model that learned the shortcut cries wolf on every one of them.

The last 8% of the mixture is built against that. I take real windows without a labelled anomaly and put an event into them: a spike, a short drop, a shift of the level, or a stretch of larger swings, sized against what that series already does. Each window then becomes one of four cases.

(a) The event, once

“Yes, around points 255 to 257.” + what happens there

One spike in a series that has no other: an anomaly.

(b) The same event, recurring

“No. The spikes recur about every 100 points.”

The same spike at an even spacing: the pattern of the series, not an anomaly.

(c) Recurring events, and one that does not fit

“Yes, around points 255 to 257.” + what happens there

Four ordinary spikes and one much larger: the anomaly is that one.

(d) The window as it is

“No.”

Nothing put in: the real window, which has no labelled anomaly.

Figure 9: The same event, four ways. Only (a) and (c) are anomalies. The spike of (a) and the spikes of (b) are drawn in the same way, so the shape or the size of the event cannot give the answer. Only the rest of the series can.

The script that puts the event in knows its exact place and values, so every number in these training answers is true by construction. A third of these examples ask in two turns ("what are the notable events in this series?", then "is any of them an anomaly?"), so that describing and judging are two separate answers.

5. Part one: the ChatTS benchmark

Since LFM3-TS is built on ChatTS, I start with the benchmark of the ChatTS paper (the examples of Figure 1 come from it). It has two sets: set A, with 159 records on real series, and set B, with 400 records on synthetic series. Each record holds one or several series and asks several numbered questions about them: the trend, the seasonality, the noise, the local changes, and, when there are several series, which of them behave alike.

I ran both models on both sets and scored the answers with the scoring script of the ChatTS repository, unchanged. It gives two scores. The categorical score checks the kind of thing the answer names (an upward trend, a downward spike). The numerical score checks how close a position, an amplitude, or a period is. (A third score, for reasoning questions, needs a judge language model for most of its questions, and I left it out.)

Set A, categoricalSet A, numericalSet B, categoricalSet B, numerical
LFM3-TS (1.8B)82.0%77.5%79.5%76.8%
ChatTS-8B83.8%82.3%84.6%82.9%
LFM3-1.7B, numbers as text10.4%4.0%14.2%3.0%

Set A: 299 categorical and 273 numerical questions. Set B: 1,069 categorical and 708 numerical questions.

The last row is the starting point: LFM3-1.7B itself, with no encoder, given each series as a list of numbers in the prompt. It barely registers, so the scores of LFM3-TS come from the encoder and the training, not from the language model alone.

ChatTS-8B is ahead on all four scores: by 2 to 5 points on set A, and by 5 to 6 points on set B, with more than four times the parameters. The figure below splits set B, the larger of the two, by task.

LFM3-TS (1.8B)ChatTS-8BCategorical score: the right kind of trend, of noise, of local change…0%25%50%75%100%TrendLFM3-TS: 96.4% (trend, categorical score)96%ChatTS-8B: 97.6% (trend, categorical score)98%SeasonalityLFM3-TS: 100.0% (seasonality, categorical score)100%ChatTS-8B: 100.0% (seasonality, categorical score)100%NoiseLFM3-TS: 87.8% (noise, categorical score)88%ChatTS-8B: 90.2% (noise, categorical score)90%Local changesLFM3-TS: 79.0% (local changes, categorical score)79%ChatTS-8B: 88.0% (local changes, categorical score)88%Local changes, inductiveLFM3-TS: 78.0% (local changes, inductive, categorical score)78%ChatTS-8B: 87.0% (local changes, inductive, categorical score)87%Clusters by shapeLFM3-TS: 72.6% (clusters by shape, categorical score)73%ChatTS-8B: 87.6% (clusters by shape, categorical score)88%Correlation by shapeLFM3-TS: 73.9% (correlation by shape, categorical score)74%ChatTS-8B: 84.8% (correlation by shape, categorical score)85%Clusters by local changesLFM3-TS: 72.2% (clusters by local changes, categorical score)72%ChatTS-8B: 72.1% (clusters by local changes, categorical score)72%Correlation by local changesLFM3-TS: 71.5% (correlation by local changes, categorical score)72%ChatTS-8B: 66.4% (correlation by local changes, categorical score)66%Numerical score: how close a position, an amplitude, a period is0%25%50%75%100%TrendLFM3-TS: 96.5% (trend, numerical score)96%ChatTS-8B: 96.0% (trend, numerical score)96%SeasonalityLFM3-TS: 90.0% (seasonality, numerical score)90%ChatTS-8B: 88.0% (seasonality, numerical score)88%NoiseLFM3-TS: 44.6% (noise, numerical score)45%ChatTS-8B: 57.4% (noise, numerical score)57%Local changesLFM3-TS: 72.5% (local changes, numerical score)72%ChatTS-8B: 80.7% (local changes, numerical score)81%Local changes, inductiveLFM3-TS: 71.2% (local changes, inductive, numerical score)71%ChatTS-8B: 79.8% (local changes, inductive, numerical score)80%LFM3-TS (1.8B)ChatTS-8BCategorical score0%25%50%75%100%TrendLFM3-TS: 96.4% (trend, categorical score)96%ChatTS-8B: 97.6% (trend, categorical score)98%SeasonalityLFM3-TS: 100.0% (seasonality, categorical score)100%ChatTS-8B: 100.0% (seasonality, categorical score)100%NoiseLFM3-TS: 87.8% (noise, categorical score)88%ChatTS-8B: 90.2% (noise, categorical score)90%Local changesLFM3-TS: 79.0% (local changes, categorical score)79%ChatTS-8B: 88.0% (local changes, categorical score)88%Local changes, inductiveLFM3-TS: 78.0% (local changes, inductive, categorical score)78%ChatTS-8B: 87.0% (local changes, inductive, categorical score)87%Clusters by shapeLFM3-TS: 72.6% (clusters by shape, categorical score)73%ChatTS-8B: 87.6% (clusters by shape, categorical score)88%Correlation by shapeLFM3-TS: 73.9% (correlation by shape, categorical score)74%ChatTS-8B: 84.8% (correlation by shape, categorical score)85%Clusters by local changesLFM3-TS: 72.2% (clusters by local changes, categorical score)72%ChatTS-8B: 72.1% (clusters by local changes, categorical score)72%Correlation by local changesLFM3-TS: 71.5% (correlation by local changes, categorical score)72%ChatTS-8B: 66.4% (correlation by local changes, categorical score)66%Numerical score0%25%50%75%100%TrendLFM3-TS: 96.5% (trend, numerical score)96%ChatTS-8B: 96.0% (trend, numerical score)96%SeasonalityLFM3-TS: 90.0% (seasonality, numerical score)90%ChatTS-8B: 88.0% (seasonality, numerical score)88%NoiseLFM3-TS: 44.6% (noise, numerical score)45%ChatTS-8B: 57.4% (noise, numerical score)57%Local changesLFM3-TS: 72.5% (local changes, numerical score)72%ChatTS-8B: 80.7% (local changes, numerical score)81%Local changes, inductiveLFM3-TS: 71.2% (local changes, inductive, numerical score)71%ChatTS-8B: 79.8% (local changes, inductive, numerical score)80%
Figure 10: LFM3-TS and ChatTS-8B on set B of the ChatTS benchmark, task by task. The last four categorical tasks ask about several series at once.

Three things stand out:

  • The two models are level on trend and seasonality. On the categorical score, that's 96% versus 98% for the trend, and 100% for both on seasonality.
  • LFM3-TS is behind on local changes. It names the right kind of local change in 79% of the questions, versus 88% for ChatTS-8B.
  • The largest gap is on comparing several series by shape. Asked which series of a group have the same shape, LFM3-TS scores 73% and ChatTS-8B 88%.

6. Part two: anomalies in real series

A benchmark question tells the model what to look for; a real series doesn't. This is where the two models differ the most.

6.1 The test set

The test set has 350 windows of 512 points from TSB-AD-U, none of which the model saw during training. A "source" is one dataset of the benchmark, for example the Yahoo dataset. The test set has two parts:

Two parts

Known sourcesNew sourcesExathlonLTDBMITDB…YAHOOIOPSNABUCRSMAPMSLSWaTfiles used for trainingfiles and sources kept for the test

9 known sources give new recordings; 7 sources are new to the model.

When is an answer correct?

✓ correct✓ correct✗ wrong place

Yellow: the labelled anomaly. Pale yellow: 16 points on each side. A “yes” with a point in this zone is correct.

Figure 11: The two parts of the test set, and the scoring rule. The new sources are the fair comparison with ChatTS-8B; the known sources tell us if the model merely memorizes its training sources.

Both models get the same question: is there an anomaly, and where? For a window without an anomaly, the correct answer is "no".

6.2 LFM3-TS versus ChatTS-8B

First, four examples, one per case.

(a) A clear anomaly · source: IOPS · 512 points

LabelLFM3-TSChatTS-8B0100200300400500

LFM3-TS correct
“Yes, around points 394 to 425. Four repeated sharp bursts hit the series, the highest reaching 103.3 at point 405 against a baseline of 47.64, and the level settles at 50.03 once they pass.”

ChatTS-8B correct
“Yes, around point 395.”

(b) A subtle anomaly · source: UCR · 512 points

LabelLFM3-TSChatTS-8B0100200300400500

LFM3-TS correct
“Yes, around points 386 to 388. A one-point downward spike takes the value from about 100.3 to 70.2 at point 387, and it returns to about 101.5.”

ChatTS-8B correct
“Yes, around point 385.”

(c) A subtle anomaly, not found · source: UCR · 512 points

LabelLFM3-TSno anomalyChatTS-8B0100200300400500

LFM3-TS incorrect
“No. The shifts of the level near points 72, 246 and 428 recur about every 174 points with about the same size, so they are part of the pattern of this series.”

ChatTS-8B correct
“Yes, around point 243.”

(d) No anomaly · source: YAHOO · 512 points

Labelno anomalyLFM3-TSno anomalyChatTS-8B0100200300400500

LFM3-TS correct
“No, nothing in this time series stands out as an anomaly.”

ChatTS-8B incorrect
“Yes, around point 135.”

Figure 12: Four windows of real series from sources that are not in the training data, with the answers of LFM3-TS and ChatTS-8B. The yellow band is the labelled anomaly, and the marks below each series show the place each model gave. I picked these four by hand; (c) is a miss of LFM3-TS and (d) is a false alarm of ChatTS-8B. Random examples come in section 6.4.

The figure below shows the two models side by side on the whole test set, group by group.

LFM3-TS (1.8B)ChatTS-8BAnomaly found at the right place (higher is better)0%25%50%75%100%Clear anomaly,known source (new recordings) · 39 windowsLFM3-TS: 77% (clear anomaly, known source (new recordings), 39 windows)77%ChatTS-8B: 77% (clear anomaly, known source (new recordings), 39 windows)77%Clear anomaly,new source · 41 windowsLFM3-TS: 88% (clear anomaly, new source, 41 windows)88%ChatTS-8B: 83% (clear anomaly, new source, 41 windows)83%Subtle anomaly,known source (new recordings) · 10 windowsLFM3-TS: 60% (subtle anomaly, known source (new recordings), 10 windows)60%ChatTS-8B: 20% (subtle anomaly, known source (new recordings), 10 windows)20%Subtle anomaly,new source · 64 windowsLFM3-TS: 48% (subtle anomaly, new source, 64 windows)48%ChatTS-8B: 34% (subtle anomaly, new source, 64 windows)34%False alarms on windows with no anomaly (lower is better)0%25%50%75%100%No anomaly,known source (new recordings) · 67 windowsLFM3-TS: 21% (no anomaly, known source (new recordings), 67 windows)21%ChatTS-8B: 51% (no anomaly, known source (new recordings), 67 windows)51%No anomaly,new source · 129 windowsLFM3-TS: 22% (no anomaly, new source, 129 windows)22%ChatTS-8B: 47% (no anomaly, new source, 129 windows)47%LFM3-TS (1.8B)ChatTS-8BAnomaly found at the right place (higher is better)0%25%50%75%100%Clear anomaly, known source (new recordings) · 39 windowsLFM3-TS: 77% (clear anomaly, known source (new recordings), 39 windows)77%ChatTS-8B: 77% (clear anomaly, known source (new recordings), 39 windows)77%Clear anomaly, new source · 41 windowsLFM3-TS: 88% (clear anomaly, new source, 41 windows)88%ChatTS-8B: 83% (clear anomaly, new source, 41 windows)83%Subtle anomaly, known source (new recordings) · 10 windowsLFM3-TS: 60% (subtle anomaly, known source (new recordings), 10 windows)60%ChatTS-8B: 20% (subtle anomaly, known source (new recordings), 10 windows)20%Subtle anomaly, new source · 64 windowsLFM3-TS: 48% (subtle anomaly, new source, 64 windows)48%ChatTS-8B: 34% (subtle anomaly, new source, 64 windows)34%False alarms on windows with no anomaly (lower is better)0%25%50%75%100%No anomaly, known source (new recordings) · 67 windowsLFM3-TS: 21% (no anomaly, known source (new recordings), 67 windows)21%ChatTS-8B: 51% (no anomaly, known source (new recordings), 67 windows)51%No anomaly, new source · 129 windowsLFM3-TS: 22% (no anomaly, new source, 129 windows)22%ChatTS-8B: 47% (no anomaly, new source, 129 windows)47%
Figure 13: LFM3-TS and ChatTS-8B on the 350 test windows. Top: the share of anomalies each model finds at the correct place. Bottom: the share of windows without an anomaly where each model reports one (lower is better). "Known source" means that other recordings of the same dataset are in the training data.

And here are the totals, for the new sources and for all windows:

ParametersPrecisionRecallF1False alarms
New sources (105 windows with an anomaly, 129 without)
LFM3-TS1.8B66%64%0.6528
ChatTS-8B8B40%53%0.4661
LFM3-1.7B, numbers as text1.7B1%1%0.01111
All windows (154 with an anomaly, 196 without)
LFM3-TS1.8B67%67%0.6742
ChatTS-8B8B41%57%0.4895
LFM3-1.7B, numbers as text1.7B1%2%0.01169

Precision: of the windows where the model reports an anomaly, the share where the place is correct. Recall: of the windows with an anomaly, the share where the model gives the correct place. False alarms: the number of windows without an anomaly where the model reports one.

The third row is again LFM3-1.7B on its own, given the 512 values as text. It gives a final answer in 220 of the 350 windows, says "yes" to most of them, and names the correct place in only 3.

I also tried OpenTSLM, another open time-series language model. Its released checkpoints are each trained for one task (captioning, activity or sleep classification, ECG questions). Asked these open questions, the 1B and 3B versions mostly return nothing and score under 1% on both ChatTS sets, so they are not in the tables.

Looking at the new sources, I take away four things:

  • LFM3-TS finds more of the anomalies. It puts 64% of them at the correct place, and ChatTS-8B 53%. For clear anomalies, the two are close (88% and 83%); the difference comes from the subtle ones (48% and 34%).
  • LFM3-TS raises fewer than half as many false alarms. It reports an anomaly in 22% of the windows that have none. ChatTS-8B does so in 47% of them.
  • A "yes" from LFM3-TS means more. When LFM3-TS reports an anomaly, the place is correct in 66% of the windows, versus 40% for ChatTS-8B.
  • LFM3-TS doesn't just memorize its sources. It finds 73% of the anomalies of known sources and 64% of those of new sources, and its false-alarm rate is the same on both.

6.3 How exact is the place?

The 16-point margin is generous, so I also scored the place without it. LFM3-TS answers with a stretch ("around points 255 to 257"), and ChatTS-8B, which I asked for a point, answers with one point. In the table below, "overlap" means that the answer touches the labelled stretch, and "within 16" is the rule used everywhere else in this article.

overlapwithin 4within 8within 16within 32
RecallPrecisionRecallPrecisionRecallPrecisionRecallPrecisionRecallPrecision
LFM3-TS60%62%64%66%64%66%64%66%65%67%
ChatTS-8B29%22%43%32%50%37%53%40%61%46%

New sources only (105 windows with an anomaly, 129 without). Recall and precision are defined as in the table above.

LFM3-TS barely moves: 60% of the anomalies with no margin at all, versus 64% with 16 points. ChatTS-8B needs the margin: its recall goes from 29% to 53%. In other words, LFM3-TS points at the anomaly and ChatTS-8B points near it.

How well do the stretches of LFM3-TS match the labels? On the 73 anomalies of new sources where it says "yes", its stretch covers 63% of the labelled points on average, and the overlap between the two (intersection over union) is 0.39. So it finds the right place, but not the exact extent.

6.4 What do the examples look like?

Hand-picked examples show whatever the author wants them to show. So for the figure below, a random draw with a fixed seed chose the windows: for each of the seven new sources, one with a clear anomaly and one with a subtle one. Move the pointer over a series to read its values (except for Yahoo S5 and SWaT, whose terms of use restrict sharing the data).

Labelled anomaly Place that LFM3-TS gives Place that ChatTS-8B gives

Yahoo S5 traffic of web services

Clear anomaly

824-3,355LFM3-TSChatTS-8B0511

LFM3-TS missedChatTS-8B found

LFM3-TS answers: “No. The bursts of larger swings near points 113, 265 and 401 recur about every 152 points with about the same size, so they are part of the pattern of this series.”

Subtle anomaly

0.5670.0117LFM3-TSChatTS-8B0511

LFM3-TS foundChatTS-8B found

LFM3-TS answers: “Yes, around points 210 to 218. The value drops from about 0.35 to 0.01 at point 210, stays there for 9 points, and returns to about 0.40 at point 219.”

IOPS indicators of internet services

Clear anomaly

1670LFM3-TSChatTS-8B0511

LFM3-TS foundChatTS-8B found

LFM3-TS answers: “Yes, around points 255 to 267. A single-point dropout takes the value from about 142 to 0 at point 264, and the series continues at a lower level near 132.5.”

Subtle anomaly

1.29-1.58LFM3-TSChatTS-8B0511

LFM3-TS foundChatTS-8B missed

LFM3-TS answers: “Yes, around points 83 to 87. A upward spike of 3 points takes the value from about 0.40 to 1.29 at point 84, and it returns to about 0.50 at point 87.”

NAB server load, road traffic, sensors

Clear anomaly

1.050.0361LFM3-TSChatTS-8B0511

LFM3-TS missedChatTS-8B wrong place

LFM3-TS answers: “No. The spikes near points 134, 268 and 394 recur about every 134 points with about the same size, so they are part of the pattern of this series.”

Subtle anomaly

0.8950LFM3-TSChatTS-8B0511

LFM3-TS wrong placeChatTS-8B wrong place

LFM3-TS answers: “Yes, around points 101 to 103. A one-point upward spike takes the value from about 0.062 to 0.895 at point 102, and it returns to about 0.064. The shifts of the level recur regularly and are part of the pattern.”

UCR heartbeats, motion, machines

Clear anomaly

0.2950.136LFM3-TSChatTS-8B0511

LFM3-TS foundChatTS-8B missed

LFM3-TS answers: “Yes, around points 167 to 204. The swings grow: between point 167 and point 204 the values go from about 0.136 to 0.295, against 0.193 to 0.254 in the 38 points before.”

Subtle anomaly

2,047-2,047LFM3-TSChatTS-8B0511

LFM3-TS foundChatTS-8B found

LFM3-TS answers: “Yes, around points 260 to 275. The level shifts down at point 260: the mean of the 16 points before is about 1900, and the mean of the 16 points after is about -2000. It does not come back.”

SMAP telemetry of a NASA satellite

Clear anomaly

1-0.2LFM3-TSChatTS-8B0511

LFM3-TS foundChatTS-8B found

LFM3-TS answers: “Yes, around points 319 to 336. The level shifts down at point 319: the mean of the 16 points before is about 1.00, and the mean from point 319 to point 336 is about -0.09. It comes back at point 337.”

Subtle anomaly

0.752-0.501LFM3-TSChatTS-8B0511

LFM3-TS missedChatTS-8B wrong place

LFM3-TS answers: “No. The bursts of larger swings near points 33, 141, 225, 333 and 441 recur about every 108 points with about the same size, so they are part of the pattern of this series.”

MSL telemetry of the Curiosity rover

Clear anomaly

0.968-1LFM3-TSChatTS-8B0511

LFM3-TS foundChatTS-8B found

LFM3-TS answers: “Yes, around points 194 to 195. A one-point downward spike takes the value from about 0.75 to -1.00 at point 194, and it returns to about 0.77. The shifts of the level recur regularly and are part of the pattern.”

Subtle anomaly

0.268-1LFM3-TSChatTS-8B0511

LFM3-TS missedChatTS-8B wrong place

LFM3-TS answers: “No. The shifts of the level near points 104, 258 and 368 recur about every 154 points with about the same size, so they are part of the pattern of this series.”

SWaT sensors of a water treatment plant

The test set has no clear anomaly from this source.

Subtle anomaly

1.30.865LFM3-TSChatTS-8B0511

LFM3-TS wrong placeChatTS-8B wrong place

LFM3-TS answers: “Yes, around points 150 to 155. A upward spike of 2 points takes the value from about 1.031 to 1.298 at point 153, and it returns to about 1.032 at point 155. The other spikes recur regularly and are part of the pattern.”

Figure 14: 13 windows with an anomaly from sources that are not in the training data, chosen by a random draw. The text below each series is the full answer of LFM3-TS. In this sample, LFM3-TS finds 7 of the 13 anomalies and ChatTS-8B finds 6; on all 105 such windows of the test set, the rates are 64% and 53%.

The figure below does the same for windows without an anomaly, one per source. Here, the correct answer is "No", and any mark below a series is a false alarm.

Yahoo S5 traffic of web services

2,706-418LFM3-TSChatTS-8B0511

LFM3-TS no alarmChatTS-8B false alarm

LFM3-TS answers: “No, nothing in this time series stands out as an anomaly.”

IOPS indicators of internet services

0.3450.0293LFM3-TSChatTS-8B0511

LFM3-TS no alarmChatTS-8B no alarm

LFM3-TS answers: “No, nothing in this time series stands out as an anomaly.”

NAB server load, road traffic, sensors

7.925.2LFM3-TSChatTS-8B0511

LFM3-TS no alarmChatTS-8B false alarm

LFM3-TS answers: “No. The bursts of larger swings near points 31, 119, 223 and 359 recur about every 88 points with about the same size, so they are part of the pattern of this series.”

UCR heartbeats, motion, machines

106-161LFM3-TSChatTS-8B0511

LFM3-TS no alarmChatTS-8B false alarm

LFM3-TS answers: “No, nothing in this time series stands out as an anomaly.”

SMAP telemetry of a NASA satellite

0.4920.491LFM3-TSChatTS-8B0511

LFM3-TS no alarmChatTS-8B no alarm

LFM3-TS answers: “No. The drops near points 139, 255, 312, 345 and 449 recur about every 116 points with about the same size, so they are part of the pattern of this series.”

MSL telemetry of the Curiosity rover

0.203-1LFM3-TSChatTS-8B0511

LFM3-TS false alarmChatTS-8B no alarm

LFM3-TS answers: “Yes, around points 366 to 393. The level shifts down at point 366: the mean of the 16 points before is about -0.01, and the mean from point 366 to point 393 is about -0.99. It comes back at point 394. The other shifts of the level recur regularly and are part of the pattern.”

SWaT sensors of a water treatment plant

1.671.36LFM3-TSChatTS-8B0511

LFM3-TS no alarmChatTS-8B false alarm

LFM3-TS answers: “No. The shifts of the level near points 69, 173, 261, 357 and 437 recur about every 104 points with about the same size, so they are part of the pattern of this series.”

Figure 15: 7 windows without a labelled anomaly from the new sources, chosen by the same random draw. In this sample, LFM3-TS raises 1 false alarms and ChatTS-8B 4; on all 129 such windows of the test set, the counts are 28 and 61.

7. Part three: values and descriptions

Finding a place is one thing. A chat model also quotes values and describes what it sees, so I checked both.

7.1 Can it read a value?

I asked 600 questions: half on generated series and half on the real test windows. The questions are "what is the value at point N?" and "what are the lowest and the highest value between points A and B?". A value counts as correct if it is within a quarter of a standard deviation of the series.

Value at a pointMedian errorLowest value of a stretchHighest value of a stretch
Real series57%0.18 sd64%56%
Generated series65%0.16 sd75%81%

LFM3-TS only. Percentages: share of the answers within a quarter of a standard deviation (sd) of the series. Median error: for the value at a point, in standard deviations.

On real series, LFM3-TS gives the right value a bit more than half of the time, with a median error of 0.18 standard deviations. That's good enough to say "around 1,250", and not good enough to trust the last digit.

7.2 How true are the descriptions?

When LFM3-TS answers "yes", it also describes what happens, and a description is made of claims that can be checked: a value at a point, a level before, a kind of change. I had a language model (Claude Sonnet 5.5) check them. For each of the 154 "yes" answers on the test windows, it split the description into claims and compared every claim with the values of the series, without knowing where the labelled anomaly was. For a value, the tolerance is the same quarter of a standard deviation as above.

The result: 72% of the 511 claims are true, and 44% of the answers contain no false claim at all. The table below splits the claims by kind.

Kind of claimClaimsTrue
The kind of change (a spike, a drop, a shift)9581%
A level before or after15377%
A value at a named point17071%
A duration or a return4764%
A comparison with the rest of the series3152%

The same check on a sample of 96 answers of the training file gives 94% of true claims, so the training answers are sound. The model is best at naming the kind of change and weakest when it compares a stretch with the rest of the series. Read a description as a pointer to where to look, and check the numbers it quotes.

7.3 Side note: is it still a chat model?

Training every weight of a language model on series tasks can easily wreck what it could do before, which is why 15% of the stage 3 mixture is plain chat. To check that this worked, I gave LFM3-TS and the original LFM3-1.7B the same 200 arithmetic problems from GSM8K. The original solves 77.5% of them and LFM3-TS 71.0%: a small loss.

8. Availability

The weights, the code, and the full training recipe are public:

The model loads with the usual Auto classes of transformers (version 5.23 or later, the first release with LFM3 built in).

Conclusion

All in all, there is nothing fundamentally new in LFM3-TS. The architecture is the usual encoder-plus-language-model design, and the core idea and half of the training data come from ChatTS. What I added is the part that forces the model to read, and the part that teaches it what "unusual" means for a given series.

On the ChatTS benchmark, which covers trend, seasonality, noise, local changes, and comparisons between series, the 1.8B model stays 2 to 6 points behind the 8B one. On real series it has never seen, it finds more anomalies and raises fewer than half as many false alarms. And unlike a dedicated detector, which gives you a score, it tells you what it saw and answers a follow-up question.

If there is one thing I'd take away from this project, it's that a falling loss says very little about whether a multimodal model uses its new modality. Check it directly, for example with questions that can't be answered any other way.

Credits

This work uses LFM3-1.7B from Liquid AI, under the LFM Open License v1.0. The core idea and the synthetic data come from ChatTS (training dataset). The benchmark of section 5 is the ChatTS evaluation dataset. The real series come from TSB-AD, which gathers them from their original sources; among those used in training are the MIT-BIH databases of PhysioNet (Open Data Commons Attribution License), the OPPORTUNITY and Daphnet datasets of the UCI repository (CC BY 4.0), and the Exathlon benchmark (CC BY-NC-SA 4.0). The prompts of the plain chat data come from databricks-dolly-15k.