AI for smart ports, part 2: Optimizing vessel schedule predictions using machine learning

In this post, we pick up from our previous look into the challenges inherent in current commonly available vessel schedule information. The aim in the following is to discuss how modern predictive analytics can help improve the quality of vessel scheduling data, which is significant for operational planning in maritime logistics. Furthermore, we hope to give the reader some flavor of how we approach such analytics at Awake.AI from a data science perspective.


<< Read Part 1


In the following we focus on vessel schedule prediction, specifically on predicting 'normal' ongoing voyages accurately using globally available sources such as Automatic Identification System (AIS) data, vessel particulars, weather data, etc. Many fairly common traffic scenarios fall outside of this scope, where vessels maneuver in ways which are not predictable using such data sources (e.g. due to emergencies, drills, or abrupt changes to voyage itineraries). While related vessel traffic outlier detection and large-scale predictive traffic analytics have also been studied at Awake.AI (see e.g. these master theses by Henri Iltanen and Álvaro Orgaz Expósito), we'll leave such topics for future consideration.

As an example of vessel schedule prediction, the figure below shows vessel trajectory and estimated time of arrival (ETA) predictions as shown in our web application. The shown vessel is heading from Los Angeles to Auckland, and is in this case approximately 9 000 km or 11.5 days from arrival. Our ETA prediction (shown in blue on the right hand panel) is within one minute of the vessel's planned arrival time as reported through AIS, indicating that the vessel is well in schedule.


Baseline vs. optimization models


In the following, we use the term baseline model for rule-based models using non machine learning methods such as deterministic algorithms or heuristics to process data or perform predictions. In contrast, we also talk about optimization models, which may use heuristics, probabilistic models, or black box machine learning (ML) models to make predictions.

Baseline models should be explainable and interpretable, i.e. the mechanisms through which the model produces a result should be understood, as well as how the output of the model is affected by a given change in the input variables. The benefit of this is that the correct operation of such models can in many cases be verified without extensive statistical testing and the models can be manually tuned if needed. Also this kind of models may not need extensive training data sets to be set up or maintained, making e.g. scaling to new environments easier. The drawback is that it can be difficult to generalize rule-based baseline models to cover special outlier cases, if this requires manually defining the target functionality for all exceptions.

Machine learning -based optimization models can be useful for making predictions in cases where many input variables affect the prediction output in ways which are difficult to determine using explicit rules. However, these often require large training and test datasets to properly configure the models and to verify their performance. In many cases complex ML models are not explainable or interpretable, i.e. it may be difficult to evaluate how a model behaves depending on changes in its input variable values, and incorrect behavior cannot be corrected manually without additional training of the model.


Our modeling approach


To illustrate the above defined concepts on a more practical level, let's take a look at how we apply these in predicting vessel schedules using globally available information sources such as AIS and weather data, vessel particulars, etc. The figure below illustrates our model architecture on a conceptual level.

Modular architecture


The modular approach illustrated above consists of a sequence of submodels, which all affect the overall performance, but can be individually tuned and optimized as needed for any given target destination or customer use case. The main steps associated with predicting the course of the ongoing voyage of a vessel include classification of the current destination of the vessel, predicting the trajectory or route that the vessel will travel to the destination, predicting the effective speed for the remainder of the voyage, and predicting the port-specific pilotage processes to the final destination or other port-specific limitations and schedules such as tide windows.


Ensembles


To gain benefit from both baseline and ML-based optimization components, the submodels are constructed as model ensembles. In our approach, this means applying baseline and optimization models for each prediction task in parallel, together with combiner models which aim to make optimal predictions based on the component inputs. The combiner models themselves may be based on fixed rules or machine learning. Examples of simple combiner models would be e.g. majority vote over multiple classification model outputs, or averaging the outputs of multiple regression models (which predict continuous values such as speeds, distances, or time durations). At the other extreme, ML-based combiners may be trained with large datasets to learn how to best combine the outputs of other models in complex scenarios.


Examples of optimizations in vessel schedule prediction


Dynamic trajectories


An example of baseline and optimization models in vessel trajectory prediction is illustrated in the figures below. Here, we use a proprietary baseline model to map the current location of a vessel to a typical route and speed profile for a specified destination. In many areas, vessels mostly follow shipping lanes or other common routes, making this a useful approach. However, there are areas where vessels can select one from multiple significantly different routes depending e.g. on their size and type. One example is the Kiel Canal, which provides an alternative route for vessels to travel between the North Sea and the Baltic Sea, depending e.g. on their length, width, and draught. In the left figure we show our predicted vessel trajectory (blue line) in the beginning of a voyage to Tornio, Finland. As the voyage continues (right figure), our prediction changes to correctly pass through the Kiel Canal, as this is allowed for the vessel in question and seems likely based on its observed route. As comparison, the red points illustrate corresponding trajectory predictions from a widely used commercial maritime traffic information service, which do not adapt to the channel passage, producing error in related predictions.

For reference, the figure below shows examples of vessel ETA prediction errors of the above mentioned commercial maritime traffic information service compared to Awake.AI estimates based only on trajectory predictions and baseline rule-based models for vessel speed estimation. This shows the results of 70 ETA predictions queried for 10 vessel arrivals to various Finnish ports, along with averages for 10 h bins over the time remaining to arrival at prediction time. It should be noted that not all of these vessels pass through the Kiel Canal, so the demonstrated difference in accuracy is not only due to this optimization.


ML-based ETA optimization


In addition to dynamic trajectory prediction as outlined above, ETA prediction accuracy can be improved by optimizing the effective vessel speed estimates for the remaining voyage. This is generally dependent on many variables in ways which are difficult to fully represent using rule-based models, and benefits from the use of machine learning models. Continuing from the above trajectory prediction example, we consider a set of voyages to Port of Vuosaari (FIVSS) in Helsinki, Finland, illustrated in the heatmap of AIS location messages below.


In this example we have 30 voyages passing through the Kiel Canal, and 861 other voyages. For all voyages passing from the North Sea to the Baltic Sea, a potential source of error for baseline ETA prediction models which use the vessel's current speed as an input in the predictions is the temporary decrease of speed when passing through the Kiel Canal or the waterways between Denmark and Sweden. This is visible in the figure below, which highlights also that this effect is especially significant for vessels passing through the Kiel Canal. Here, the horizontal axis is the true remaining voyage time to port, and the vertical axis is the average absolute prediction error over all voyages at the given remaining time to port (over 1 h intervals). This example illustrates how training a machine learning model to optimize the baseline predictions significantly reduces the overall error and local variations in the ETA predictions.

Finally, to demonstrate in a more statistically comprehensive way the benefit of ML-based ETA prediction compared to publicly available vessel schedule data sources, below we show ETA prediction statistics for combined vessel arrivals to six major ports in Finland. We use here Finnish ports as an example, as Finnish authorities provide exceptionally good open data on maritime traffic, including AIS messages and national single window (NSW) port call data, through the Digitraffic services.

The figure below illustrates statistics of vessel ETA prediction errors based on 1.6 million AIS messages transmitted during the considered voyages. The AIS ETA statistics shown in red were obtained using heuristics to filter out clearly erroneous values. After filtering, useful AIS ETA estimates were available in approximately 74 % of the data. National Single Window ETA estimates are here shown in green, and are based on approximately 325 000 samples of vessel ETA information provided in official port call messages for the selected target ports. Finally, the blue line shows results of 1.6 million ETA predictions (performed corresponding to every AIS update) using our ML-based optimization models.

The vertical lines corresponding to the different ETA types show the empirical 90 % confidence intervals, i.e. the value range within which 90 % of the prediction errors fall in this study. This can be thought of as a measure of confidence one can have in the predictions provided by the different sources - more variation indicating less reason for confidence in a given prediction. For the AIS and NSW -based ETA estimates, this again illustrates what we demonstrated in Part 1 of this blog post: while in many cases (depending quite significantly on the target destination) these can provide accurate information, the variation in data quality is significant. There is no simple way to know during a voyage whether the provided estimates are accurate or not, which makes their use in operational planning difficult. In contrast, the ML-based ETA predictions provide clear improvements in average prediction accuracy, in the consistency of prediction results, and in the availability of up to date estimates.

Summary


In this article, we have outlined the approach we take at Awake.AI to predicting the routes and schedules of ongoing vessel voyages. We apply a modular, multi-layered architecture to ensure the flexibility, scalability, and intepretability of our prediction models, while also enabling controlled application of modern machine learning -based components to optimize performance. We demonstrated examples of specific scenarios, such as modeling location-dependent speed characteristics, where machine learning optimization yields significant benefit in prediction accuracy. Based on large scale performance comparisons with existing vessel schedule data sources, we find that the ML-based approach we are applying to ETA prediction provides a viable solution to common data quality problems in maritime logistics.


<< Read Part 1


Jussi Poikonen

D.Sc.(Tech.) VP of AI & Analytics, Awake.AI

jussi.poikonen@awake.ai