Stochastic computing: Difference between revisions

Content deleted Content added
Rjcaste (talk | contribs)
m Fixed mismatched parenthesis typo
No edit summary
 
(22 intermediate revisions by 13 users not shown)
Line 1:
{{Short description|Computing using random bit streams}}
'''Stochastic computing''' is a collection of techniques that represent continuous values by streams of random bits. Complex computations can then be computed by simple bit-wise operations on the streams. Stochastic computing is distinct from the study of [[randomized algorithm]]s.
 
== Motivation and a simple example ==
 
Suppose that <math>p,q \in [0,1]</math> is given, and we wish to compute <math>p \times q</math>. Stochastic computing performs this operation using probability instead of arithmetic.
 
Specifically, suppose that there are two random, independent bit streams called ''stochastic number''s (i.e. [[Bernoulli process]]es), where the probability of a one1 in the first stream is <math>p</math>, and the probability in the second stream is <math>q</math>. We can take the [[Logical and#Applications in computer programming|logical AND]] of the two streams.
 
{| class="wikitable" style="text-align:left;"
Line 17:
| 1 || 0 || 0 || 1 || 0 || 0 || ...
|}
The probability of a one1 in the output stream is <math>pq</math>. By observing enough output bits and measuring the frequency of ones1s, it is possible to estimate <math>pq</math> to arbitrary accuracy.
 
The operation above converts a fairly complicated computation (multiplication of <math>p</math> and <math>q</math>) into a series of very simple operations (evaluation of <math>a_i \land b_i</math>) on random bits.
To put in another perspective, assuming the truth table of an AND gate. Conventional interpretation is that the output is true if and only if input A and B are true. However, if the table is interpreted vertically, (0011) AND (0101) is (0001), i.e., 1/2 x 1/2 = 1/4, which is exactly an arithmetic multiplication. As the information is presented in probability distribution, probability multiplication is literally an AND operation.
 
{| class="wikitable"
|+
!A
!B
!Out
|-
|0
|0
|0
|-
|0
|1
|0
|-
|1
|0
|0
|-
|1
|1
|1
|}
More generally speaking, stochastic computing represents numbers as streams of random bits and reconstructs numbers by calculating frequencies. The computations are performed on the streams and translate complicated operations on <math>p</math> and <math>q</math> into simple operations on their stream representations. (Because of the method of reconstruction, devices that perform these operations are sometimes called stochastic averaging processors.) In modern terms, stochastic computing can be viewed as an interpretation of calculations in probabilistic terms, which are then evaluated with a [[Gibbs sampling|Gibbs sampler]]. It can also be interpreted as a hybrid [[Analog computer|analog]]/[[Computer|digital]] computer.
 
Line 30 ⟶ 52:
|first = J.
|title = Probabilistic logics and the synthesis of reliable organisms from unreliable components
|booktitlebook-title = The Collected Works of John von Neumann
|publisher = Macmillan
|year = 1963
|isbn = 978-0-393-05169-8
 
|url-access = registration
|url = https://archive.org/details/incompletenesspr00gold
}}</ref> However, the
theory could not be fully developed until advances in computing of the 1960s,<ref>{{cite conference
| last1 = Petrovic | first1= R. | last2=Siljak | first2=D. | title=Multiplication by means of coincidence | year = 1962 | book-title =ACTES Proc. of 3rd Int. Analog Comp. Meeting |url=https://books.google.com/books?id=94BQAAAAMAAJ}}</ref>
Multiplication by means of coincidence | year = 1962 | booktitle =
ACTES Proc. of 3rd Int. Analog Comp. Meeting}}</ref>
<ref>
{{citation
Line 50 ⟶ 69:
}}</ref>
mostly through a series of simultaneous and parallel efforts in the US<ref>
{{cite journalbook
| last1=Poppelbaum
| first1=W.
Line 57 ⟶ 76:
| last3=Esch
| first3=J.
| title=Proceedings of the November 14-16, 1967, fall joint computer conference on - AFIPS '67 (Fall)
| titlechapter=Stochastic computing elements and systems
| journal=Afips Fjcc
| volume=31
| pages=635–644 |doi=10.1145/1465611.1465696 |isbn=9781450378963
| year=1967
| s2cid=8504153
}}</ref>
and the UK.<ref>
{{cite journalbook
| last=Gaines
| first=B.
| title=Proceedings of the April 18-20, 1967, spring joint computer conference on - AFIPS '67 (Spring)
| titlechapter=Stochastic Computingcomputing
| journal=Afips Sjcc
| year=1967
| volume=30
| pages=149–156 |doi=10.1145/1465482.1465505 |isbn=9781450378956
| s2cid=832296
}}</ref>
By the late 1960s, attention turned to the design of
Line 81 ⟶ 102:
| first2=W.
| title=Stochastic and deterministic averaging processors
| year=1981 |publisher=P. Peregrinus |isbn=978-0-906048-44-3
| year=1981
}}
</ref>
Line 87 ⟶ 108:
{{cite thesis
| last=Esch
| first=JJohn W.
| title=RASCEL, a programmable analog computer based on a regular array of stochastic computing element logic
| year=1969 |id=AAI700084 |type=PhD |url=https://dl.acm.org/doi/book/10.5555/904878
| year=1969
| ___locationpublisher=University of Illinois, Urbana, Illinois
}}
</ref>
Line 102 ⟶ 123:
| title=Proceedings of the first International Symposium on Stochastic Computing and its Applications
| ___location= Toulouse, France
| year=1978 |oclc=499229066
}}
</ref>
Line 113 ⟶ 134:
control.<ref>
{{cite conference
| booktitlebook-title=Advances in Information Systems Science
| title=Stochastic Computing Systems
| last=Gaines
Line 119 ⟶ 140:
| editor-last=Tou
| editor-first=Julius
| publisher=Plenum Press
| volume=2
| orig-year=1969 |publisher=Springer |year=2013 |isbn=9781489958433
| year=1969
}}
</ref>
<ref>
{{cite conferencebook
|first1=M. |last1=van Daalen |first2=P. |last2=Jeavons |first3=J. |last3=Shawe-Taylor |title=&#91;1993&#93; Proceedings IEEE Workshop on FPGAs for Custom Computing Machines |chapter=A stochastic neural architecture that exploits dynamically reconfigurable FPGAs | year=1993 |isbn=0-8186-3890-7 |pages=202–211 |doi=10.1109/FPGA.1993.279462
| booktitle=FPGAs for Custom Computing Machines, Proceedings IEEE, NAPA
|s2cid=14929278 }}
| title=A stochastic neural architecture that exploits dynamically reconfigurable FPGAs
| last=van Daalen, M. R.| year=1993
|display-authors=etal}}
</ref>
Somewhat recently, interest has turned towards stochastic
Line 146 ⟶ 164:
|date=February 2003
| doi=10.1049/el:20030217
| bibcode=2003ElL....39..299G
}}
</ref> More recently, stochastic circuits have been successfully used in [[image processing]] tasks such as [[edge detection]]
<ref>{{Cite book | last1 = Alaghi | first1 = A. | last2 = Li | first2 = C. | last3 = Hayes | first3 = J. P. | doi = 10.1145/2463209.2488901 | chapter = Stochastic circuits for real-time image-processing applications | title = Proceedings of the 50th Annual Design Automation Conference on - DAC '13 | pages = 1 | year = 2013 | isbn = 9781450320719 | pmids2cid = | pmc =18174415 }}</ref> and [[Thresholding (image processing)|image thresholding]].<ref>{{Cite bookjournal | last1 = Najafi| first1 = M. H. | last2 = Salehi | first2 = M. E. | doi = 10.1109/TVLSI.2015.2415932 | chaptertitle = A Fast Fault-Tolerant Architecture for Sauvola Local Image Thresholding Algorithm Using Stochastic Computing | titlejournal = IEEE Transactions on Very Large Scale Integration (VLSI) Systems - TVLSI '16 | journaldoi = IEEE Transactions on Very Large Scale Integration (VLSI) Systems10.1109/TVLSI.2015.2415932 | volume = 24 | issue = 2 | pages = 808–812 | year = 2016 | pmids2cid = | pmc =6591306 }}</ref> Recent advancement in stochastic circuits also shows promising speed and energy efficiency advantages in artificial intelligence (AI) hardware acceleration on edge computing.
 
== Strengths and weaknesses ==
Line 170 ⟶ 189:
computer only requires an [[And gate|AND gate]]. Additionally,
a digital multiplier would naively require <math>2n</math> input wires,
whereas a stochastic multiplier would only require 2two input wires{{citation needed|date=October 2014}}.
(If the digital multiplier serialized its output, however, it would also
require only 2two input wires.)
 
Additionally, stochastic computing is robust against noise; if a few
Line 181 ⟶ 200:
Circuits work properly even when the inputs are misaligned temporally. As a result, stochastic
systems can be designed to work with inexpensive locally generated clocks instead of using a global clock and
an expensive clock distribution network.<ref>{{Cite book | last1 = Najafi | first1 = M. H. | last2 = Lilja | first2 = D. J. | last3 = Riedel| first3 = M. D. | last4 = Bazargan | first4 = K. | doi = 10.1109/ASPDAC.2016.7428060 | title = Polysynchronous stochastic circuits | journal = 2016 21st Asia and South Pacific Design Automation Conference (ASP-DAC) | pageschapter = 492–498Polysynchronous stochastic circuits | yeardoi = 10.1109/ASPDAC.2016.7428060 | pmidpages = 492–498 | pmcyear = 2016 | isbn = 978-1-4673-9569-4 | s2cid = 8973285 }}</ref>
 
Finally, stochastic computing provides an estimate of the solution
Line 188 ⟶ 207:
referred to as ''progressive precision'', which suggests that the precision
of stochastic numbers (bit streams) increases as computation proceeds.
<ref>{{Cite journal | last1 = Alaghi | first1 = A. | last2 = Hayes | first2 = J. P. | doi = 10.1145/2465787.2465794 | title = Survey of Stochastic Computing | journal = ACM Transactions on Embedded Computing Systems | volume = 12 | issue = 2s | pages = 1 | year = 2013 | pmid = | pmc = | citeseerx = 10.1.1.296.4448 | s2cid = 4689958 }}</ref>
It is as if the [[most significant bit]]s of the number
arrive before its [[least significant bit]]s; unlike the
Line 229 ⟶ 248:
''latching'', where feedback between different components can achieve
a deadlocked state.<ref>
{{cite journalbook
| last1=Winstead
| first1=C.
Line 238 ⟶ 257:
| last4=Schlegel
| first4=C.
| journaltitle=IEEEProceedings. International Symposium on Information Theory, 2005. ISIT 2005
| titlechapter=Stochastic iterative decoders
| journal=IEEE International Symposium on Information Theory
| ___location=Adelaide Australia
|date=September 2005
| pages=1116–1120
| arxiv=cs/0501090
| arxiv=cs/0501090 |doi=10.1109/ISIT.2005.1523513 |isbn=0-7803-9151-9
| s2cid=16390484
}}
</ref>
Line 290 ⟶ 311:
|date=February 2003
| doi=10.1049/el:20030217
| bibcode=2003ElL....39..299G
}}
</ref>
Line 305 ⟶ 327:
| last3=Milner
| first3=A.
| booktitlebook-title=Conference Record of the Thirty-Ninth Asilomar Conference on Signals, Systems and Computers
| year=2006
}}
Line 311 ⟶ 333:
The proponents of these methods argue that the performance of stochastic decoding is
competitive with digital alternatives.
 
== Deterministic Methods to Stochastic Computing ==
 
Deterministic methods of SC has been developed to perform completely accurate computation with SC circuits.<ref>{{Cite journal|last1=Najafi|first1=M. Hassan|last2=Jenson|first2=Devon|last3=Lilja|first3=David J.|last4=Riedel|first4=Marc D.|date=December 2019|title=Performing Stochastic Computation Deterministically|journal=IEEE Transactions on Very Large Scale Integration (VLSI) Systems|volume=27|issue=12|pages=2925–2938|doi=10.1109/tvlsi.2019.2929354|s2cid=201888463|issn=1063-8210|doi-access=free}}</ref> The essential principle of these methods is that every bit of one bit-streams interacts with every bit of the other bit-streams exactly once. To produce completely accurate result with these methods, the operation must run for the product of the length of input bit-streams. Deterministic methods are developed based on unary bit-streams,<ref>{{Cite book|last1=Jenson|first1=Devon|last2=Riedel|first2=Marc|title=Proceedings of the 35th International Conference on Computer-Aided Design |chapter=A deterministic approach to stochastic computation |date=2016-11-07|pages=1–8|___location=New York, NY, USA|publisher=ACM|doi=10.1145/2966986.2966988|isbn=978-1-4503-4466-1|s2cid=11281124}}</ref><ref>{{Cite journal|last1=Najafi|first1=M. Hassan|last2=Jamali-Zavareh|first2=Shiva|last3=Lilja|first3=David J.|last4=Riedel|first4=Marc D.|last5=Bazargan|first5=Kia|last6=Harjani|first6=Ramesh|date=May 2017|title=Time-Encoded Values for Highly Efficient Stochastic Circuits|journal=IEEE Transactions on Very Large Scale Integration (VLSI) Systems|volume=25|issue=5|pages=1644–1657|doi=10.1109/tvlsi.2016.2645902|s2cid=5672761|issn=1063-8210|doi-access=free}}</ref> pseudo-random bit-streams,<ref>{{Cite journal|last1=Najafi|first1=M. Hassan|last2=Lilja|first2=David|date=2018|title=High Quality Down-Sampling for Deterministic Approaches to Stochastic Computing|journal=IEEE Transactions on Emerging Topics in Computing|volume=9|pages=7–14|doi=10.1109/tetc.2017.2789243|issn=2168-6750|doi-access=free}}</ref> and low-discrepancy bit-streams.<ref>{{Cite book|last1=Najafi|first1=M. Hassan|last2=Lilja|first2=David J.|last3=Riedel|first3=Marc|title=Proceedings of the International Conference on Computer-Aided Design |chapter=Deterministic methods for stochastic computing using low-discrepancy sequences |date=2018-11-05|pages=1–8|___location=New York, NY, USA|publisher=ACM|doi=10.1145/3240765.3240797|isbn=978-1-4503-5950-4|s2cid=53236540|doi-access=free}}</ref>
 
== Variants of stochastic computing ==
Line 341 ⟶ 367:
solution). Additionally, it retains the linear precision of bundle
and ergodic processing.
 
==See also==
* [[Unconventional computing]]
 
==References==
Line 346 ⟶ 375:
 
==Further reading==
* {{cite journal|url=http://pages.cpsc.ucalgary.ca/~gaines/reports/COMP/IdentSC/IdentSC.pdf|title=Techniques of Identification with the Stochastic Computer|last=Gaines|first=Brian R. |journal=Proceedings IFAC Symposium on "The Problems of Identification in Automatic Control Systems", Section 6 Special Identification Instruments, Prague June 12–19, 1967|year=1967|accessdateaccess-date=2013-11-11}}
* {{cite journal|url=http://homes.cs.washington.edu/~armin/ACM_TECS_2013.pdf|title=Survey of Stochastic Computing|last1=Alaghi|first1=Armin|last2=Hayes|first2=John P.|journal=ACM Transactions on Embedded Computing Systems|volume=12|issue=2s|pages=1–19|year=2013|accessdateaccess-date=2013-11-11|doi=10.1145/2465787.2465794|citeseerx=10.1.1.296.4448|s2cid=4689958}}
 
[[Category:History of computing hardware]]