"For years I built a brand new me for every sensor. Then someone pretrained one me for all of them, and I felt relieved and just a little redundant."
A Recently Fine-Tuned AI Agent
The Big Picture
A sensory-AI textbook written in 2020 would have taught you to build a fresh pipeline for every sensor: collect a labeled dataset for this accelerometer, hand-engineer features for this electrocardiogram (ECG) lead, train a bespoke classifier for this vibration bus, and start over when the next sensor arrived. Between roughly 2023 and 2026 that default inverted. Pretrained backbones learned once on oceans of unlabeled sensor data now transfer across tasks with little or no per-task labeling, and language models sit on top of the sensing stack to reason and act over what the sensors report. This section orients you in that moment: it names the frontier landmarks so the rest of the book has coordinates, and it draws the one line beginners most need drawn, that pretraining changes who does the representation learning, but it does not repeal calibration, uncertainty, or safety. Excitement and rigor are not in tension here; the shift only works when they travel together.
Between 2023 and 2026 the default recipe for building a sensor system turned inside out, and yet not a single equation of the underlying physics moved. A signal \(x(t)\), a hidden state \(s\) estimated as \(\hat{s}\), a measurement model \(x = h(s) + \eta\), and a chain of stages that turns raw transduction into a decision: all of it still holds in 2026 exactly as before. What changes is the labor split inside the chain, specifically who learns the representation \(z\) and how much labeled data that learning costs. This section assumes only the notation from Section 1.3 and the constraint web from Section 1.6. It stays deliberately shallow on mechanism, because the depth lives in Part V; its job is to hand you a map, not the terrain.
From a new model per sensor to one reusable backbone
What the old default was: a bespoke pipeline, hand-built end-to-end for a single sensor and a single task. You owned the feature extractor, the labeled corpus, and the classifier, and each was welded to the sensor that produced it. Why that was expensive: the labels were the bottleneck. A bearing-fault detector needed thousands of annotated failure windows that only exist after machines have failed; a sleep-stage classifier needed nights of expert-scored polysomnography, the overnight multi-sensor sleep study a technician hand-labels into sleep stages. The representation \(z\) was relearned from scratch every time, so the cost of a new sensor was a full new project, not an increment.
The stakes here are concrete: the difference between a medical wearable that ships this quarter and one that waits a year for its labeling budget often comes down to whether it starts from a pretrained backbone or from scratch. How the foundation-model recipe replaces it: pretrain one large backbone on vast unlabeled sensor or time-series data, then adapt it to each downstream task by fine-tuning a small head or, increasingly, by prompting it zero-shot (unpacked in the next paragraph). The backbone learns a general-purpose \(z\) that already encodes seasonality (repeating cyclic patterns), transients, and cross-channel structure; your task supplies only the last mile. Time-series foundation models such as TimesFM, Chronos, MOMENT, and Moirai now forecast series they were never trained on, and wearable-scale sensor models pretrained on millions of device-hours have been shown to transfer across activity, cardiac, and metabolic tasks. When this pays off: whenever labels are scarce and unlabeled streams are abundant, which describes most real sensor deployments. Figure 1 sketches the inversion.
Zero-shot here means running the pretrained backbone on a task or series it never saw in training, with no labeled examples and no fitting step: you pass the raw context and read off a prediction, which matters because it turns a new deployment into an API call rather than a full project. It works because the model conditions on the input window and generalizes from structure it already absorbed during pretraining, so adaptation happens inside a single forward pass instead of a training loop. Reach for it when you have no labels at all or need an instant baseline, and switch to fine-tuning a small head when you can afford a modest labeled set and want the extra task-specific accuracy. In short: pretraining does not make labels obsolete, it moves the expensive learning upstream so your handful of labels only has to point, not teach.
Key Insight
The shift is a relocation of labeled-data cost, not its abolition. Pretraining amortizes the expensive representation learning across every downstream task, so each new sensor or task pays only for a small adaptation head instead of a full pipeline. What used to be the whole project (learning \(z\) from labels) becomes a shared asset; what remains is the last mile. That is why the same headline result, "foundation models for sensing," shows up as both a labeling-cost story and a transfer story: they are the same story told from two ends.
Self-supervised pretraining: turning unlabeled streams into fuel
What makes the backbone possible is self-supervised pretraining: learning from the structure of the signal itself, with no human labels. Why it fits sensing so well is a matter of supply. Labeled sensor events \(e\) are rare and costly, but raw streams \(x[n]\) are effectively free and endless: every wearable, vehicle, and machine generates them continuously. Self-supervision converts that surplus into training signal by inventing a task the data can grade on its own, most commonly masking part of a window and asking the model to reconstruct it, or contrasting augmented views of the same window so nearby moments map to nearby \(z\). How this yields a useful \(z\): to fill in a masked slice of an inertial measurement unit (IMU) trace the model must internalize gait periodicity, sensor axis coupling, and typical transients, and those same regularities are exactly what a downstream activity or fault head needs. When it earns its keep is precisely the scarce-label regime that dominates real deployments; the mechanics, objectives, and pitfalls are developed in Chapter 17, Self-Supervised and Contrastive Sensor Learning.
Mental Model
Think of how you can hum the missing half-second when a familiar song cuts out for an instant. Nobody ever handed you an answer key of "correct" notes; you can fill the gap only because hearing thousands of songs built an internal sense of melody, rhythm, and how a phrase resolves. Masked self-supervised pretraining does exactly this to a sensor stream: it blanks a slice of the window and forces the model to reconstruct it, and the only way to succeed is to internalize the signal's grammar, its periodicity, its transients, its cross-channel coupling. The blanked slice is its own answer, which is why no human labels are needed, and that internalized grammar is precisely the representation a downstream head later reuses.
Step-Through: masked-window self-supervision on one tiny signal
Watch the "the data grades itself" idea play out on eight real numbers. Take one window from a clean periodic sensor, one cycle of a sine sampled at eight points:
\(x = [\,0.00,\; 0.71,\; 1.00,\; 0.71,\; 0.00,\; -0.71,\; -1.00,\; -0.71\,]\)
- Mask. Pick two positions to blank, say index 2 (true value \(1.00\)) and index 5 (true value \(-0.71\)). The model's input becomes \([\,0.00, 0.71, \text{[M]}, 0.71, 0.00, \text{[M]}, -1.00, -0.71\,]\), where [M] is a mask token. The two hidden values are the "labels," and they came free from the signal itself.
- Predict. The model reads the visible context. A crude, untrained model that just averages the two neighbors would guess \((0.71+0.71)/2 = 0.71\) at index 2 and \((0.00 + (-1.00))/2 = -0.50\) at index 5, far from the truth. A model that has internalized the sine grammar instead predicts \(\hat{x}_2 = 0.96\) and \(\hat{x}_5 = -0.68\).
- Score. Reconstruction loss on the masked positions only: \(\tfrac{1}{2}\big[(0.96-1.00)^2 + (-0.68-(-0.71))^2\big] = \tfrac{1}{2}(0.0016 + 0.0009) = 0.00125\). The naive neighbor-average model scores \(\tfrac{1}{2}[(0.71-1.00)^2 + (-0.50-(-0.71))^2] = \tfrac{1}{2}(0.0841 + 0.0441) = 0.0641\), roughly fifty times worse.
- Update and repeat. Gradient descent nudges the weights to shrink that \(0.00125\), and over millions of such windows the only way to keep winning is to encode periodicity, phase, and axis coupling. No cardiologist, no annotator, no label budget touched a single one of these numbers.
That last internalized structure, learned purely to fill in blanks, is exactly the representation \(z\) a downstream fault or activity head reuses in the next section's transfer story.
In Practice: A Wearable Cardiac Team Skips the Labeling Bill
A wearable startup wants to flag atrial fibrillation, an irregular heart rhythm that raises stroke risk, from wrist photoplethysmography (PPG). The bespoke plan needs cardiologist-adjudicated labels on tens of thousands of segments, a corpus that would take a year and a clinical budget the company does not have. The 2026 plan starts differently: it pretrains a backbone on roughly a million hours of unlabeled PPG already sitting in the fleet, using masked-window reconstruction so the model learns pulse morphology, motion artifact, and baseline wander (slow drift of the signal's zero level) on its own. Only then does the team fine-tune on the few thousand adjudicated segments they can actually afford. The pretrained representation does the heavy lifting; the scarce labels only steer the final head. Detection quality can land close to where the fully supervised pipeline would have, at a fraction of the annotation cost, because the expensive part, learning what a PPG pulse is, came free from streams the company already owned. This family of models is the subject of Chapter 20, Sensor and Wearable Foundation Models.
Research Frontier
How far does the pretrain-once recipe scale for sensors specifically? "Scaling Wearable Foundation Models" (Narayanswamy et al., Google, 2024) pretrained a Large Sensor Model on roughly 40 million hours of multimodal wearable data (PPG, accelerometry, skin temperature, and more) gathered from over 160,000 people, and reported that sensor foundation models obey scaling laws much like language models: adding unlabeled device-hours, compute, and parameters keeps improving downstream transfer to activity, metabolic, and cardiac tasks. Follow-on work such as SensorLM (Google, 2025) then attaches a language interface directly to these sensor embeddings, letting a model caption and answer questions about a raw wearable stream, which is exactly the bridge from the backbones of this section to the agentic layer of the next.
Right Tool
A decade ago, forecasting a new sensor series meant building a model from scratch: choose an architecture, assemble a labeled training set, tune, and validate, easily a few hundred lines and days of work before a single prediction. A pretrained time-series foundation model collapses that to a zero-shot call on a series it has never seen:
import numpy as np
from chronos import ChronosPipeline # a pretrained time-series foundation model
pipe = ChronosPipeline.from_pretrained("amazon/chronos-t5-small")
context = np.load("vibration_window.npy") # raw sensor history, no labels
forecast = pipe.predict(context, prediction_length=64) # zero-shot, no training
Three lines replace the entire train-a-forecaster project: no labeled targets, no architecture search, no fitting loop. (As of 2025, faster distilled variants such as Chronos-Bolt have largely replaced the original T5-based checkpoint shown here, delivering roughly an order-of-magnitude speedup through the same zero-shot interface.) The library ships the pretrained weights, the tokenizer for real-valued series, and the sampling that returns a full predictive distribution rather than a point guess. That distribution matters for the next section. These models, and the caveats on when their zero-shot transfer holds, are covered in Chapter 19, Time-Series Foundation Models.
Real-World Application: consumer wearables
Google's Large Sensor Model, pretrained on tens of millions of unlabeled device-hours of Fitbit and Pixel Watch signals (PPG, accelerometry, skin temperature), is the same pretrain-once backbone this section describes, now shipping inside health features rather than living in a paper. Instead of collecting a fresh labeled corpus for every new metric such as sleep staging, stress, or cardiac-load, teams adapt the shared backbone with a small task head, so a new feature costs an adaptation step rather than a year-long annotation project. It is the inversion of Figure 1 running on wrists at consumer scale.
Common Misconception
The misconception is that "zero-shot" means the model works on any signal for free, so those three lines are the whole job. They are not: zero-shot transfer holds only when your series resembles the distributions the model saw in pretraining, and a novel modality, an unusual sampling rate, or dynamics outside that experience can degrade the forecast silently while the code still runs without a single error. Treat a zero-shot prediction as a strong baseline to validate on your own held-out data, never as a guarantee that you can skip evaluation.
Agentic and language-interfaced sensing
A validated forecast or a fired detection is still only a number on a screen until something decides what to do with it. The second half of the shift sits on top of perception rather than inside it. What is new is that a language model can now take sensor context as input, reason about it in words, and choose an action \(a\): read the last hour of telemetry, decide a pump is trending toward a bearing fault, and open a maintenance ticket or throttle the line. In embodied systems the same idea appears as vision-language-action models, which map a camera stream and a natural-language goal directly to motor commands. Why this is a genuine change and not just a chatbot bolted on: the interface to a sensing system becomes language and goals rather than fixed dashboards and hand-coded thresholds. An operator can now ask "why did throughput drop on line 3 overnight," and the agent pulls the relevant channels, correlates them, and answers. How it is wired: the perception stack still produces \(\hat{s}\) and its uncertainty. The agent consumes that structured output as context, plans over it, and acts, ideally with the raw measurement rigor preserved underneath. When it helps most is in operations, triage, and human-in-the-loop control where the bottleneck is interpretation and coordination, not raw detection. The architecture of these systems is the whole of Chapter 22, LLM Agents for Sensing and Operations.
A Note in Passing
An agent that reasons fluently over sensor data and an agent that reasons correctly over it are different animals wearing the same confident voice. A language model will happily narrate a compelling root-cause story for a spike that was actually a loose connector. Fluency is cheap; calibration is not. Which is the entire point of the next section.
What stays classical: calibration, uncertainty, and safety
This is the balance the section exists to strike. Pretraining and language interfaces are real advances, but they only change how much of the pipeline you build by hand; they leave untouched the parts of sensory AI that were never about representation learning. A foundation model still consumes \(y\), the conditioned observation (the cleaned version of the raw \(x\) from the measurement model above), and \(y\) is only as trustworthy as the sensor's calibration: once \(h(\cdot)\) drifts, a bias no backbone can see enters every embedding. That physics is the subject of Chapter 2, Sensor Physics and Measurement Models, and no pretraining substitutes for it.
Uncertainty is the second survivor. A zero-shot forecast or an agent's confident recommendation is worthless for a braking decision or a clinical alert unless you know how much to trust it. Large pretrained models are often poorly calibrated out of the box, fluent and wrong with equal confidence. Quantifying and correcting that, through the probability \(p(\hat{s})\) machinery of Chapter 4 and the modern calibration and conformal methods of Chapter 18, Uncertainty, Calibration, and Conformal Prediction, becomes more important as models get more persuasive, not less. And safety, the discipline of bounding what a system does when its inputs are spoofed, out of distribution, or simply wrong, is untouched by how the representation was learned; a language-interfaced actuator that can open a valve needs the guardrails of Chapter 68, Robustness, Sensor Spoofing, and Functional Safety regardless of how clever its planner is. Leakage-safe evaluation, too, is unchanged: a foundation model that saw your test distribution during pretraining will flatter itself exactly as a bespoke model would.
Checkpoint
So far: three things survive the shift untouched by how the representation was learned, calibration keeps the observation \(y\) trustworthy, uncertainty tells you how far to trust a forecast or an agent's recommendation, and safety plus leakage-safe evaluation bound what the system does when its inputs are wrong or when it has quietly seen your test data before.
This is why the classical-versus-foundation-model tradeoff runs as a thread through the whole book rather than resolving into a verdict here. It is not classical or foundation; it is a foundation model doing the representation learning it is good at, wrapped in the calibration, uncertainty, and safety scaffolding that classical sensory AI has always supplied. The chapters that excite you about pretraining and the chapters that insist on rigor are describing two halves of one competent system.
Exercise
Take the predictive-maintenance fleet from Section 1.6 (50,000 vibration nodes catching bearing faults). Sketch how you would rebuild it under the 2026 recipe: (a) name the unlabeled data you would pretrain a backbone on and the self-supervised task you would use; (b) describe the small labeled step that adapts it to fault detection; (c) name one language-agent role that adds value on top of the detector; and (d) list three classical safeguards that must remain in place before any agent is allowed to throttle a machine. For each safeguard, state what fails if you omit it.
Self-Check
1. In one sentence, what does foundation-model pretraining relocate rather than eliminate, and why does that make labels cheaper without making them free?
2. Why does self-supervised pretraining fit sensing so naturally, in terms of the relative supply of \(x[n]\) versus labeled events \(e\)?
3. Name the three things this section insists "stay classical," and give one concrete failure that occurs if a fluent language-interfaced system skips each one.
Try It: Zero-Shot Forecast vs. a Naive Baseline
Put the section's central claim to the test on your own laptop in under an hour, using only standard Python.
- Install the tools and grab a signal: run
pip install chronos-forecasting numpy pandas matplotlib, then load any univariate sensor or time-series CSV you have (or a public one such as an hourly temperature, ECG, or household-power trace) into a NumPy array and hold out the final 64 samples as ground truth. - Run the foundation model zero-shot: load
amazon/chronos-t5-smallwithChronosPipeline.from_pretrained, feed it the history up to the holdout point, and callpredict(context, prediction_length=64)to get a full predictive distribution, with no training at all. - Build a naive baseline on the same holdout: a seasonal-naive forecast (repeat the previous period) or last-value carry-forward, then compute mean absolute error for both it and the Chronos median forecast.
- Check the uncertainty, not just the point error: take Chronos's 10th and 90th percentile forecasts and measure the fraction of the 64 held-out points that actually fall inside that 80 percent band.
- Interpret the result: if the band's empirical coverage is far from 80 percent, you have reproduced this section's warning firsthand, the zero-shot model can be fluent and miscalibrated at the same time, and your own data just told you so.
Lab: how much does the "last mile" of labels actually buy you?
Goal. Measure the section's key claim directly: pretraining does the heavy representation-learning, and a tiny labeled head supplies only the last mile. You will hold a pretrained sensor backbone frozen and watch downstream accuracy climb as you feed its head just 10, then 50, then 200 labeled examples.
Tools. Python with momentfm (the MOMENT time-series foundation model), scikit-learn, and numpy. For data, grab any small labeled time-series classification set, for example a UCR/UEA archive series such as GunPoint or an accelerometer human-activity set; a few hundred windows is plenty.
Procedure. Load the frozen MOMENT backbone in embedding mode and encode every window into a fixed feature vector \(z\) once (no fine-tuning of the backbone). Then train a plain logistic-regression head on top of \(z\), and vary only the number of labeled training windows the head sees: 10, 50, 200. Keep a fixed held-out test split for all three runs.
What to vary. The labeled-head budget (10 / 50 / 200 examples). As an optional second axis, compare against logistic regression trained on the raw flattened window instead of the pretrained \(z\), using the same budgets.
What to observe. Plot test accuracy against label count for both the pretrained-\(z\) head and the raw-window head. You should see the pretrained head reach usable accuracy with only a handful of labels and stay well above the raw-feature baseline, the empirical signature of relocated (not eliminated) labeling cost. Note where the pretrained curve flattens: that plateau is the "last mile" ceiling the frozen backbone alone can supply.
What's Next
Section 1.8 assembles the pieces of Chapter 1 into the book's organizing spine: the six verbs, measure, clean, represent, infer, fuse, and deploy. Every part that follows, classical and foundation-model alike, expands one of those six moves applied to the single problem of inferring hidden physical state from imperfect measurements.