Cargando…
Stochastic rounding: implementation, error analysis and applications
Stochastic rounding (SR) randomly maps a real number x to one of the two nearest values in a finite precision number system. The probability of choosing either of these two numbers is 1 minus their relative distance to x. This rounding mode was first proposed for use in computer arithmetic in the 19...
Autores principales: | , , , , |
---|---|
Formato: | Online Artículo Texto |
Lenguaje: | English |
Publicado: |
The Royal Society
2022
|
Materias: | |
Acceso en línea: | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8905452/ https://www.ncbi.nlm.nih.gov/pubmed/35291325 http://dx.doi.org/10.1098/rsos.211631 |
_version_ | 1784665189304500224 |
---|---|
author | Croci, Matteo Fasi, Massimiliano Higham, Nicholas J. Mary, Theo Mikaitis, Mantas |
author_facet | Croci, Matteo Fasi, Massimiliano Higham, Nicholas J. Mary, Theo Mikaitis, Mantas |
author_sort | Croci, Matteo |
collection | PubMed |
description | Stochastic rounding (SR) randomly maps a real number x to one of the two nearest values in a finite precision number system. The probability of choosing either of these two numbers is 1 minus their relative distance to x. This rounding mode was first proposed for use in computer arithmetic in the 1950s and it is currently experiencing a resurgence of interest. If used to compute the inner product of two vectors of length n in floating-point arithmetic, it yields an error bound with constant [Formula: see text] with high probability, where u is the unit round-off. This is not necessarily the case for round to nearest (RN), for which the worst-case error bound has constant nu. A particular attraction of SR is that, unlike RN, it is immune to the phenomenon of stagnation, whereby a sequence of tiny updates to a relatively large quantity is lost. We survey SR by discussing its mathematical properties and probabilistic error analysis, its implementation, and its use in applications, with a focus on machine learning and the numerical solution of differential equations. |
format | Online Article Text |
id | pubmed-8905452 |
institution | National Center for Biotechnology Information |
language | English |
publishDate | 2022 |
publisher | The Royal Society |
record_format | MEDLINE/PubMed |
spelling | pubmed-89054522022-03-14 Stochastic rounding: implementation, error analysis and applications Croci, Matteo Fasi, Massimiliano Higham, Nicholas J. Mary, Theo Mikaitis, Mantas R Soc Open Sci Computer Science and Artificial Intelligence Stochastic rounding (SR) randomly maps a real number x to one of the two nearest values in a finite precision number system. The probability of choosing either of these two numbers is 1 minus their relative distance to x. This rounding mode was first proposed for use in computer arithmetic in the 1950s and it is currently experiencing a resurgence of interest. If used to compute the inner product of two vectors of length n in floating-point arithmetic, it yields an error bound with constant [Formula: see text] with high probability, where u is the unit round-off. This is not necessarily the case for round to nearest (RN), for which the worst-case error bound has constant nu. A particular attraction of SR is that, unlike RN, it is immune to the phenomenon of stagnation, whereby a sequence of tiny updates to a relatively large quantity is lost. We survey SR by discussing its mathematical properties and probabilistic error analysis, its implementation, and its use in applications, with a focus on machine learning and the numerical solution of differential equations. The Royal Society 2022-03-09 /pmc/articles/PMC8905452/ /pubmed/35291325 http://dx.doi.org/10.1098/rsos.211631 Text en © 2022 The Authors. https://creativecommons.org/licenses/by/4.0/Published by the Royal Society under the terms of the Creative Commons Attribution License http://creativecommons.org/licenses/by/4.0/ (https://creativecommons.org/licenses/by/4.0/) , which permits unrestricted use, provided the original author and source are credited. |
spellingShingle | Computer Science and Artificial Intelligence Croci, Matteo Fasi, Massimiliano Higham, Nicholas J. Mary, Theo Mikaitis, Mantas Stochastic rounding: implementation, error analysis and applications |
title | Stochastic rounding: implementation, error analysis and applications |
title_full | Stochastic rounding: implementation, error analysis and applications |
title_fullStr | Stochastic rounding: implementation, error analysis and applications |
title_full_unstemmed | Stochastic rounding: implementation, error analysis and applications |
title_short | Stochastic rounding: implementation, error analysis and applications |
title_sort | stochastic rounding: implementation, error analysis and applications |
topic | Computer Science and Artificial Intelligence |
url | https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8905452/ https://www.ncbi.nlm.nih.gov/pubmed/35291325 http://dx.doi.org/10.1098/rsos.211631 |
work_keys_str_mv | AT crocimatteo stochasticroundingimplementationerroranalysisandapplications AT fasimassimiliano stochasticroundingimplementationerroranalysisandapplications AT highamnicholasj stochasticroundingimplementationerroranalysisandapplications AT marytheo stochasticroundingimplementationerroranalysisandapplications AT mikaitismantas stochasticroundingimplementationerroranalysisandapplications |