AI Glossary / Time series and signal processing / Intermediate
Filtering
Definition
Filtering is the process of estimating a system's current hidden state from observations available up to the present, in probabilistic AI. More broadly, signal processing uses filtering to transform a signal so that selected characteristics are retained or suppressed. The intended meaning should be stated: belief-state estimation and signal transformation are related, but distinct, uses of the word.
What it means
A machine's actual operating condition may be hidden, while sensor readings are imperfect. Probabilistic filtering maintains a distribution over possible current conditions and revises it as observations arrive. It answers what the system is likely to be doing now, given what has been observed so far.
In ordinary signal processing, filtering might instead mean applying a moving average or frequency-selective transformation. Such processing can support state estimation, but a smooth output alone is not a posterior probability or a complete account of uncertainty.
How it works
A recursive probabilistic filter usually alternates prediction and correction. Prediction combines the previous state distribution with a transition model describing how the state can change. Correction weights the predicted possibilities by the likelihood of the latest observation, then normalizes the weights to sum to one.
For a finite hidden Markov model, these steps can be computed by summation and Bayes' rule. Linear Gaussian models permit Kalman filtering; more complicated models may require approximations such as particle filtering. The state, transition model, observation model, and conditional-independence assumptions define what the resulting beliefs mean. Data arriving after the estimation time must not silently enter a supposedly real-time result.
Three practical examples
- A warehouse robot updates its probable location from movement commands and noisy range readings, retaining uncertainty when several locations fit the evidence.
- A maintenance application updates the probability that equipment is in an abnormal state using a sequence of imperfect indicators.
- A data-acquisition pipeline applies a low-pass signal filter before extracting features. This is signal transformation; a separate statistical model would be needed to turn those features into a probability of an equipment condition.
Think of it this way
Think of a librarian keeping track of which room a mobile book cart currently occupies. The cart may move between checks, and a reported sighting may be mistaken. The librarian first allows for movement, then weighs the new report against the possibilities. Filtering formalizes that repeated update without pretending that every report is certain.
Worked example
Use an original two-state example: a fictional device is active or inactive. After yesterday's observations, the probability of active was 0.6. Suppose an active device remains active with probability 0.9, while an inactive device becomes active with probability 0.2.
Before today's sensor reading, the predicted active probability is 0.6 × 0.9 + 0.4 × 0.2 = 0.62. Suppose the sensor reports a positive indication with probability 0.8 when active and 0.1 when inactive. A positive reading arrives.
The unnormalized active weight is 0.62 × 0.8 = 0.496. The inactive weight is 0.38 × 0.1 = 0.038. Their sum is 0.534, so the filtered active probability is 0.496/0.534 = 248/267, approximately 0.92884. The remaining probability is approximately 0.07116.
If tomorrow's reading is unavailable, tomorrow's predicted active probability is (248/267) × 0.9 + (19/267) × 0.2 = 1135/1335, approximately 0.85019. This last quantity is a prediction, not tomorrow's filtered result. The arithmetic assumes the stated Markov transition and observation model; it does not prove that a real device or sensor has these probabilities.
Illustrative case study
Illustrative fictional case: Birch Facilities uses a state model to track whether a remote ventilation unit is operating. A noisy indicator occasionally reports activity when the unit is stopped. The application displays a probability and the time of the last reading, rather than turning every positive signal into a definitive status.
During a communications outage it propagates the state distribution without inventing observations. Engineers later compare estimates with inspected equipment states and revisit the transition model when operating schedules change. This fictional example concerns uncertainty management, not a verified product deployment.
Common misconceptions and mistakes
Filtering is not the same as smoothing in the probabilistic time-series sense. Smoothing revises an earlier state estimate using later observations. Prediction concerns a future state whose observation has not yet arrived.
Do not multiply observation likelihoods as though they were independent when sensors share an unmodeled fault. Reusing the same reading twice also produces misleading confidence. A high posterior probability is conditional on the model; it is not a guarantee of reality. Finally, a signal-processing filter may introduce delay or discard useful components even when its output appears cleaner.
Business use
Filtering supports operational dashboards, tracking, monitoring, and adaptive control when decisions depend on hidden conditions. Its value is strongest when the organization can define meaningful states and test observation reliability.
Record when each observation became available, how missing readings are handled, and how model parameters were estimated. Evaluate probability calibration and consequences of incorrect decisions, not just the fraction of most-likely states that match later labels. Provide a route for human investigation when uncertainty remains high or observations repeatedly conflict with predictions.
People also ask
Does filtering require continuous-valued data?
No. The worked example uses two discrete states and a binary sensor.
Can filtering work without a new observation?
The model can predict forward, but the observation correction is absent.
Is smoothing always inappropriate?
No. Retrospective reconstruction can be useful; it must simply be distinguished from what was knowable at the earlier decision time.
Check your understanding
Why is the prior for today's update 0.62 rather than 0.6?
Answer: The state may change between observations, so prediction applies the transition model first.
Why normalize the two weights?
Answer: They are joint weights for the observed reading, not yet a conditional state distribution.
Does 0.92884 mean the sensor is 92.884% accurate?
Answer: No. It is the posterior probability of one state for this particular evidence and prior.
Related terms
- Filter
- Hidden Markov model
- Belief state
- Transition model
- Prediction
- Smoothing
- Kalman filter
- Bayesian update
- observation model
- particle filter
Learn next
reproduce the update for a negative sensor reading. Then explore how a less reliable sensor changes the posterior, keeping transition probabilities fixed. Compare filtered and retrospectively smoothed estimates on the same sequence.
More in Time series and signal processing
- Extended Kalman filter - An extended Kalman filter, or EKF, estimates the evolving hidden state of a system whose dynamics or measurements are nonlinear.
- Fast Fourier transform - A fast Fourier transform, or FFT, is an algorithm for computing a discrete Fourier transform efficiently.
- Filter Design - Filter design is the process of choosing a filter structure and parameters to meet specified requirements for transforming a signal.
- First difference - A first difference is the change between a time-series observation and the immediately preceding observation: Δyt = yt − y(t−1).
- Fixed-lag smoothing - Fixed-lag smoothing estimates a hidden state from a fixed number of time steps in the past using observations available through the present.
- Forecast horizon - A forecast horizon is the distance from the forecast's information cutoff or origin to the future period being predicted.
Sources
Sources: Poole and Mackworth, Artificial Intelligence: Foundations of Computational Agents, third edition, Sequential Probability Models: https://artint.info/3e/html/ArtInt3e.Ch9.S6.html . SciPy, official linear-filter documentation: https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.lfilter.html . Primary textbook and documentation consulted. The probability calculation and fictional case are original.
Previous: Filtered-popping recursive transition network Next: Filters, random fields, and maximum entropy model