Anchorage detection is a behaviour-inference problem

7 minute read

In brief

  • Anchorage is a vessel behaviour; AIS provides incomplete evidence about that behaviour.
  • A useful model combines motion physics, temporal context, vessel characteristics and local operating context.
  • Evaluation should focus on anchorage events, calibration and cross-port transfer, not ping-level accuracy alone.
Synthetic port with harbour, fairway, charted anchorages and multiple vessel motion patterns
Common testbed. A synthetic port combines berthing, charted anchorages, fairway traffic and off-zone low-speed behaviour. The same observations can support different downstream tasks depending on what the method is designed to estimate.

Anchorage is not directly observed in AIS.

A vessel can remain inside a charted anchorage without being anchored, another can spend hours at low speed outside a designated anchorage because it is waiting, drifting, manoeuvring or responding to local conditions. A polygon or speed threshold is therefore evidence about behaviour, not the behaviour itself.

This can be framed as latent-state inference task:

P(state_t = anchorage | AIS_history, vessel_context, local_traffic_context).

The practical objective is to infer a compact vessel state from imperfect observations and use that state consistently for event reconstruction, forecasting and downstream analysis.

What is observed and what is not

AIS provides irregular observations of position, SOG, COG, heading, navigation status and vessel metadata, it does not directly reveal operational intent, propulsion state, wind and current forcing, anchoring status, queue membership or whether low-speed movement represents anchorage, drifting or manoeuvring. This distinction matters because trajectory-prediction research repeatedly identifies data quality, long-horizon uncertainty and cross-environment generalisation as central limitations (Murray and Perera, 2022; Li et al., 2023; Jiang et al., 2026). The modelling question is therefore not only which architecture performs best, but which hidden variables and observation assumptions are needed to represent vessel behaviour reliably.

Different methods estimate different objects

Many pipelines grouped under “anchorage detection” actually solve different problems. Some localise berths, some classify individual stops as berth or anchorage, and thers aggregate recurrent stop locations into functional port areas. Another class of methods infers vessel operating mode over time, these outputs are related, but they are not interchangeable.

A berth localisation method can reconstruct quay geometry without identifying offshore anchorage behaviour. A stop classifier can label vessel events without producing an anchorage boundary, a spatial clustering method can recover a recurrent anchorage area while saying little about the state of a particular vessel at a given moment. The distinction becomes especially important during preprocessing, a slow motion filter that also rejects heading variation can remove genuine anchorage observations, an anchored vessel can swing around its anchor while showing little translational displacement. A cleaning rule intended to remove noisy tracks can therefore remove the behaviour the downstream model is supposed to learn.

The first design question should consequently be:

What object is the method expected to return: an event, a state, a functional area or a map feature?

Synthetic port showing vessel footprints reconstructed near quay locations
Vessel footprints. Heading-aware hull footprints can sharpen berth geometry, but they solve a different problem from inferring whether an offshore vessel is anchored.
Synthetic port showing berth clusters and an offshore anchorage point outside the method scope
Output mismatch. Berth clustering recovers quay structure while leaving offshore anchorage behaviour largely outside its stated scope. Method quality must be judged against the object it actually returns.

A layered model

Rather than treating anchorage as a single classifier, an ideal architecture structures the system in layers:

  1. Physics / rule baseline: speed, displacement radius, dwell time, heading or turn variance and distance to known anchorage areas.
  2. Temporal state model: HMM/state-space model, neural process, recurrent model or Transformer over irregular observations.
  3. Context model: vessel type and dimensions, port geometry, local traffic density and historical operating patterns.
  4. World-model layer: predict plausible future vessel states and trajectories, and use uncertainty or prediction error to expose ambiguous transitions.

The value of a world-model formulation is not the label itself. It is the requirement that the learned representation support temporal prediction rather than only pointwise classification. Ha and Schmidhuber’s original formulation (Ha and Schmidhuber, 2018), and later systems such as Dreamer (Hafner et al., 2025), learn compact latent dynamics that support prediction and decision-making. The maritime analogue is a calibrated representation of vessel-state evolution that can support forecasting, anomaly detection and counterfactual analysis.

The model should therefore not only learn What state is the vessel in now? but also: Given the recent track and operating context, which states are plausible next?

What loitering literature teaches us about anchorage

Loitering detection provides a useful adversarial test, Miller et al.’s global transshipment analysis uses prolonged low-speed offshore movement as part of a loitering definition and explicitly notes ordinary waiting between jobs as a false-positive mechanism (Miller et al., 2018). Zhang et al. use trajectory shape and repeated turning, behaviour that can also arise from anchor swing (Zhang et al., 2022). Wijaya and Nakamura remove anchored vessels before applying their loitering score (Wijaya and Nakamura, 2023).

The important point is not that loitering and anchorage require separate pipelines, it is that they are competing explanations for overlapping motion patterns. An ideal scenario avoids training anchorage, waiting and loitering as unrelated binary classifiers; they are better represented as alternative states within a shared temporal model.

The model can then reason over transitions such as: transit → waiting → anchorage → manoeuvring → berth rather than assigning independent labels to individual pings.

Causal lens: separate drivers from evidence

Low speed is an observation, not a cause.

Wind, current, vessel dimensions, propulsion state, traffic, port congestion and operational intent can all influence the motion seen in AIS. A causal view helps separate variables that change the vessel’s underlying operational state from variables that only change how that state appears in the observations.

This matters for generalisation, a model that learns “low speed near this polygon means anchorage” may perform well at one harbour while failing at another. A model that learns how anchorage behaviour generates motion under different environmental and operational conditions has a better chance of transferring.

Counterfactual usecases: Would the model still infer anchorage if the same vessel experienced a different current, traffic state or queue condition? If its decision changes because of an irrelevant contextual shortcut, the representation is not yet modelling the behaviour we care about.

Method families worth retaining

Rather than selecting one published pipeline wholesale, an ideal design retains the strongest idea from each family:

  • adaptive stay detection instead of one universal speed threshold;
  • motion + geographic context when separating berth from anchorage;
  • vessel-count aggregation when discovering recurrent functional areas;
  • non-convex spatial boundaries when an anchorage has irregular geometry;
  • operating-mode inference when the downstream task is vessel state rather than map construction;
  • official zones as independent evidence where they exist, rather than using them simultaneously as estimator input and evaluation target.

This leads naturally to a modular architecture in which the observation model, state model and spatial aggregation stage can be evaluated separately.

Event-level evaluation

Ping-level accuracy is not enough.

A classifier can label 99% of AIS messages correctly and still produce unusable anchorage events if it repeatedly flickers between states or shifts event boundaries by tens of minutes.

An ideal evaluation tests:

  • event precision and recall;
  • start/end boundary error;
  • dwell-duration error;
  • calibration / Brier score;
  • port-held-out and vessel-held-out performance;
  • robustness to sparse and irregular ping schedules.

Evaluation should also distinguish between state accuracy and event quality. The former asks whether individual observations are assigned correctly; the latter asks whether the reconstructed anchorage episode is operationally useful.

The cross-port test is particularly important. A model that has learned one harbour’s geometry is not yet a general behaviour model.

Operational impact

Reliable anchorage events support congestion measurement, port-call reconstruction, waiting-time estimation, emissions analysis and commodity-flow intelligence.

But the output should carry its evidence, for each inferred event, the system should retain the recent track, state probability, supporting motion features, relevant spatial context and uncertainty. This makes the result inspectable and allows downstream systems to distinguish strong anchorage evidence from ambiguous low-speed behaviour.

The central distinction is: observation ≠ state. AIS provides evidence about vessel behaviour, anchorage is the operational state inferred from that evidence under explicit assumptions.

References