Application of the ARIMA model to anomaly detection in the bivalve activity data

E.V. Vyshkvarkova, A.N. Grekov, A.S. Mavrin, V.V. Trusevich

Institute of Natural and Technical Systems, RF, Sevastopol, Lenin St., 28


DOI: 10.33075/2220-5861-2023-3-141-147

UDC 004.89; 519.246.8                                                                                      


The use of bivalve mollusks as bioindicators in automated monitoring systems of the aquatic environment makes it possible to detect in real time an emergency situation associated with pollution of the aquatic environment. The use of machine learning algorithms allows to quickly detect an anomaly for the subsequent generation of an alarm. In the present work, the seasonal ARIMA model was used to predict the data of mollusk activity and detect anomalies. The activity data (valve opening value) of freshwater mollusks Unio pictorum (Linnaeus, 1758) for the period from February 26 to April 24, 2017 were used in the work. The data were obtained by the complex of automated biomonitoring of the aquatic environment developed by the authors, which was installed at the hydroelectric complex No. 14 of the river Chernaya. The choice of the optimal parameters of the ARIMA model was carried out, and to assess the quality of the model, the indicators (errors) RMSE and MAPE were calculated. The smallest RMSE (0.130064) and MAPE (0.023506%) errors were obtained for the ARIMA model of the order (p, d, q) = (0, 1, 1) and the seasonal order (P, D, Q, m) = (1, 1, 1). On the example of the synchronous reaction of mollusks to a stressful situation on April 24, 2017, the result of prediction of mollusk activity is shown. During the anomalous event, the actual value of our variable deviated significantly from the predicted value. Moreover, this deviation exceeded the 95% confidence interval of the model prediction. The results show the possibility of using the ARIMA model with a seasonal component for anomaly detection, which allows integrating the developed algorithmic approach into the software of biological systems of early detection in the future.

Keywords: anomalies, biomonitoring, forecast, ARIMA.

To quote: 

Full text in PDF(RUS)


  1. Borcherding J. Ten years of practical experience with the Dreissena-Monitor, a biological early warning system for continuous water quality monitoring. Hydrobiologia, 2006, No. 556, 417–426.
  2. Dvoretsky A.G. and Dvoretsky V.G. Shellfish as Biosensors in Online Monitoring of Aquatic Ecosystems: A Review of Russian Studies. Fishes, 2023, No. 8. 10.3390/fishes8020102.
  3. Gnyubkin V.F. An early warning system for aquatic environment state monitoring based on an analysis of mussel valve movement. J. Mar. Biol., 2009, No. 35, pp. 431–436.
  4. Kholodkevich S.V., Ivanov A.V., Kurakin A.S., Kornienko E.L., and Fedotov V.P. Real time biomonitoring of surface water toxicity level at water supply stations. Environ. Bioindic, 2008, No. 3, pp. 23–34.
  5. Kane A.S., Salierno J.D., Gipson G.T., Molteno T.C.A., and Hunter C. A video-based movement analysis system to quantify behavioral stress responses of fish. Water Res., 2004, 38, pp. 3993–4001.
  6. Koch C.W., Cooper L.W., Lalande C., Brown T.A., Frey K.E., and Grebmeier J.M. Seasonal and latitudinal variations in sea ice algae deposition in the Northern Bering and Chukchi Seas determined by algal biomarkers. PLoS ONE, 2020, No. 15(4), e0231178.
  7. Trusevich V.V., Gaiskii P.V., and Kuz’min K.A. Avtomatizirovannyj biomonitoring vodnoj sredy s ispol’zovaniem reakcij dvustvorchatyh molljuskov (Automatic biomonitoring of aqueous media based on the response of bivalves). Morskoj gidrofizicheskij zhurnal, 2010, 20, pp. 231–238.
  8. Grekov A.N., Kuzmin K.A., and Mishurov V.Z. Automated early warning system for water environment based on behavioral reactions of bivalves. 2019 International Russian Automation Conference (RusAutoCon) IEEE, 2019, pp. 1–5.
  9. Box G.E. and Jenkins G.M. Time series analysis: forecasting and control, revised ed: Holden-Day, 1976, p. 575.
  10. Chen Q., Guan T., Yun L., Li R., and Recknage F. Online forecasting chlorophyll a concentrations by an auto-regressive integrated moving average model: Feasibilities and potentials. Harmful Algae, 2015, No. 43, pp. 58–65.
  11. Katimon A., Shahid S., and Mohsenipour M. Modeling water quality and hydrological variables using ARIMA: a case study of Johor River, Malaysia. Sustain. Water Resour, Manag, 2018, No. 4, pp. 991–998.
  12. Kumar U. and Jain V.K. ARIMA forecasting of ambient air pollutants (O3, NO, NO2 and CO). Stochastic Environmental Research and Risk Assessment, 2009, No. 24 (5), pp. 751–760.
  13. Siami-Namini S., Tavakoli N., and Namin A.S. A comparison of ARIMA and LSTM in forecasting time series. In international conference on machine learning and applications (ICMLA). IEEE, 2018, pp. 1394–1401.
  14. Pedregosa F., Varoquaux G., Gramfort A., Michel V., Thirion B., Grisel O., Blondel M., Müller A., Nothman J., Louppe G., Prettenhofer P., Weiss R., Dubourg V., Vanderplas J., Passos A., Cournapeau D., Brucher M., Perrot M., and Duchesnay É. Scikit-learn: machine learning in python. Mach. Learn. Res., 2011, No. 12, pp. 2825–2830.
  15. Skipper S. and Perktold J. Statsmodels: Econometric and statistical modeling with python. In Proceedings of the 9th Python in Science Conference, 2010, pp. 92–96.
  16. Trusevich V.V., Kuz’min K.A., Mishurov V.Zh., Zhuravsky V.Yu., and Vyshkvarkova E.V. Osobennosti povedencheskih reakcij chernomorskoj midii Mytilus galloprovicialis v estestvennyh uslovijah obitanija (Features of behavioral responses of the Mediterranean mussel in its natural habitat of the Black Sea). Inland Water Biology, 2021, No. 14 (1), pp. 10–19.
  17. Grekov A.N., Kabanov A.A., Vyshkvarkova E.V., and Trusevich V.V. Anomaly detection in biological early warning systems using unsupervised machine learning. Sensors, 2023, 23, p. 2687.