<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Viterbi Algorithm Specialization Using Linear Algebra</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Ivan Tyulyandin</string-name>
          <email>i.tyulyandin@2015.spbu.ru</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Daniil Berezun</string-name>
          <email>d.berezun@2009.spbu.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Semyon Grigorev</string-name>
          <email>s.v.grigoriev@spbu.ru</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Mathematics</institution>
          ,
          <addr-line>and Computer Science</addr-line>
          ,
          <institution>Saint Petersburg State University</institution>
          ,
          <addr-line>Saint Petersburg</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Mathematics and Mechanics Faculty, Saint Petersburg State University</institution>
          ,
          <addr-line>Saint Petersburg</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>- Algorithms based on linear algebra is widely used in various areas. Often programs of interest have some input data that are independent of the dataset being processed, and thus they can be optimized with respect to this input. In the paper, we study how partial evaluation affects the Viterbi algorithm as a step to research an application of partial evaluation to linear algebra-based algorithms. We evaluate the specialized multithread Viterbi algorithm against existing GPU-based CUDAMPF. The results show that the presented algorithm is slower but comparable to CUDAMPF.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>I. INTRODUCTION</title>
      <p>The rest of the paper organized as follows. Section II
describes the background. In section III the Viterbi algorithm
specialization is explained. Section IV reports benchmarks
results. Related work is reviewed in section V. And section
VII ends up the paper.</p>
    </sec>
    <sec id="sec-2">
      <title>II. BACKGROUND In this section, we review specialization, hidden Markov models (HMM), and the Viterbi algorithm in terms of linear algebra.</title>
      <p>
        Algorithms based on linear algebra is widely used in various A. Specialization
areas such as machine learning [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ], computer vision [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ],
statistics [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] analysis of logic programs [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], graph theory [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ],
etc. One of the typical cases is querying huge database or
graph processing and can be executed in days or weeks making
crucial even a simple constant time optimization. One way
to optimize such data processing is to use some hardware
capabilities such as different kinds of parallelism or to invent
a more efficient algorithm or some tricky data representation.
      </p>
      <p>
        We focus on an alternative way to program optimization based
on the following observation. Often programs of interest have
some input data that are independent of the dataset being
processed, and thus they can be optimized with respect to
this input. Partial evaluation, a.k.a. program specialization,
is a well-known program transformation technique aiming to
perform such an optimization [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>
        In the paper, we study how partial evaluation affects the 1 function f(x, n)
Viterbi algorithm [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] as a step to research an application of 2 if n == 0 then 1
tphaertiValiteervbailuaaltgioonrithtom liinseuarsedalgienbrbai-obiansfeodrmaaltgicosrit[h8m],s.spFeiercsth, 34 eellisfe exve*n(fx)(xt,he(nn-f1)(/x2,) n^/22) ^ 2
recognition [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], and financial computations [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. Second, it
can be expressed in terms of linear algebra [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ]. Third,
the algorithm has two parameters: a hidden Markov model
(HMM) [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] and an observations sequence. Its goal is to count
a probability for the sequence to be emitted by the given
HMM. Next, a sequential application of the algorithm with
a fixed HMM to a big bunch of observations sequences is
usual. Finally, the main part of the Viterbi algorithm heavily
depends on the HMM. All the above make the algorithm a
good candidate to research partial evaluation application.
      </p>
      <p>
        Specialization [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], or partial evaluation, is a well-known
program transformation technique widely used when some of
the input data is already known in compile time. A typical
case is serial data processing when one of the input parameters
is fixed while others vary. Fixed parameters are called static
while other parameters are called dynamic. The idea behind
specialization is that optimization of a program with respect
to the static parameters together with executing the optimized
program on a set of dynamic parameters may be more efficient
than iterative execution of the initial program on both static
and dynamic parameters.
      </p>
      <p>The classical specialization example is the exponentiation
function  ¹ º =  where  is static. A simple
implementation is shown below.</p>
      <p>Note, sometimes specialization is useless. For example,
consider the exponentiation function with fixed base  but
dynamic power . Of course, one may use arithmetic tricks for
some  but in general, there is no recipe for effective
specialization. Moreover, since optimal specialization is obviously
All recursive calls are static, i.e. are controlled by the static
parameter only, and thus can be reduced. Given fixed , say
5, a typical specialized version is
1 function f_spec(x) = x * (x ^ 2) ^ 2
undecidable there are some heuristics to ensure specializa- Symbol stands for matrix multiplication using Min_plus
tion termination. As a result, in some cases, specialization semiring. Column B defines a probability distribution for states
worsen program execution. For example, it is well-known that to be a start one.
scoaumseetdimbeys csopdeeciaelxipzaatnisoinonne[g6a].tively affects program execution Probs1 = ¹Obs1º</p>
      <sec id="sec-2-1">
        <title>B. Hidden Markov model</title>
        <p>
          Hidden Markov model is a deterministic probability
automaton [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ]. It has the following parameters:
        </p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>S1N —  states of the automaton;</title>
      <p>O1K —  possible observations;
B1N — a probabilities describing each state from S1N
to be a start one;
T1N1N — state transition matrix, Tij is a probability to
go from state Si to state Sj;
E1N1K — emission matrix, where Eij defines
probability to emit observation Oj at state Si.</p>
      <p>With a given observation sequence, it is possible to calculate
a maximum likelihood to be at a concrete state of the HMM,
i.e. to reveal hidden states, according to the sequence. HMM
makes a transition between states for each observation from
the given sequence.</p>
      <sec id="sec-3-1">
        <title>C. Viterbi algorithm</title>
        <p>
          Let’s fix the observation sequence as Obs, where the length
of Obs is lo. The Viterbi algorithm [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ] handles sequence Obs
for a HMM. Its result is a maximum probability to reach each
state of the HMM after handling Obs.
        </p>
        <p>First of all, HMM probabilities are transformed into negative
binary logarithm. We define such probabilities as transformed
probabilities t¹pº, where  is a some probability from the
HMM definition.</p>
        <p>¹ º =
(  ¡ 0 :
 = 0 :</p>
        <p>1 2 ¹ ºº
¸1
(1)
e.g. probability 05 will be expressed as 1 log2 ¹05º = 1. It
is done to reduce the loss of precision.</p>
        <p>The key idea is to use a special algebraic structure, named
semiring Min_plus. Elements of this semiring are floats. We
define the addition’s semantic as a minimum between two
floats. The multiplication symbol means addition for floats.
Neutral elements are ¸1 and 0 accordingly. This is an example
of usage Min_plus semiring for matrix multiplication:
0
¸1
As a result, the column Probslo will contain transformed
probabilities to be in a certain state of the HMM if observation
sequence Obs is handled.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>III. SPECIALIZED VITERBI ALGORITHM</title>
      <p>Here we describe specialization of the Viterbi algorithm in
terms of linear algebra. We fix HMM as a static parameter.</p>
      <p>To the best of our knowledge, there is no stable partial
evaluator maintaining parallel program transformation and
providing expected results. In order to achieve specialization
effect we’ve made ad-hoc generating extension, i.e. we provide
an effective procedure to perform static data transformation
and propagation together with handwritten specialized version
of the Viterbi algorithm itself.</p>
      <sec id="sec-4-1">
        <title>A. Theory</title>
        <p>The goal is to embed data from the given HMM into the
program and simplify expressions. These static data are , ,
,  , and . Given a fixed HMM, for all possible observations
 2  the following matrices and matrix multiplications can be
precalculated during the specialization phase according to the
given in the previous section the Viterbi algorithm definition:
¹º,
¹º , denoted latter as PB¹º,
¹º  &gt;, denoted latter as PT ¹º.</p>
        <p>We can precalculate these operations and memoize the
results for further use by the specialized algorithm. The
precalculation procedure pseudocode is shown in Listing 1,
function spec_Viterbi.</p>
        <p>The specialized Viterbi algorithm is shown in Listing 1,
function run_Viterbi, and works as follows. The initial step
can be expressed as</p>
        <p>Probs1 = PB¹Obs1º
The rest of the sequence Obs is handled with multiplication</p>
        <p>Comparing the specialized version with the initial one, there</p>
        <p>Expression tij denotes transformed probability to get obser- are fewer matrix multiplication operations in Min_plus
semirvation  at state , i.e. t¹Eijº. For each observation  we create ing. For the first step, it is one matrix assignment instead
diagonal matrix P¹jº as follows with data from E: of multiplication. For the remaining observations, we need to
1     ¸1 perform only one matrix multiplication against two. Thus, the
¹  º = ­©­      ª®® initial Viterbi algorithm in terms of linear algebra requires to
perform 1 ¸ 2 ¹lo 1º matrix multiplications, where lo is
«¸1       ¬ the Obs length, while the specialized version requires only
The initial step of the Viterbi algorithm is to set up data accord- lo 1 multiplications but requires additional memory to keep
ing to the first observation from the observation sequence Obs. the precalculated matrices.</p>
        <p>Since matrix multiplication in semiring Min_plus is
associative one can handle two observations by
= ¹PT ¹Obs º
Since we know all PT ¹oº, we can precalculate these
multiplications, i.e. compute   matrices, and use them as needed.</p>
        <p>This method can be extended to handle more observations at
once, e.g. for three observations:
For three observations there are    evaluated matrices
accordingly. We name equation 2 1-level specialization since
only one observation handling is precalculated. By analogy,
we name equations 3 and 4 by the second and the third
specialization levels, and so on. -level can be computed with
PT and N 1-level as follows: for all  multiply PT ¹oº for
all matrices at the previous level.
// While there is more observations than level
while (lo - i) &gt;= level)
// Find matrix to handle next level observations
handler = obs_lvl_handlers.find(Obs[i:i+lvl])
Probs = handler Probs
i = i + level</p>
        <p>Listing 1: The specialized with levels Viterbi algorithm
the specialization
1ºN ¸ ¹lo 1º mod N
required to perform the partially evaluated Viterbi algorithm.</p>
        <p>Memory consumption rapidly increases with higher N, since
KN precalculated matrices have to be saved in memory.</p>
      </sec>
      <sec id="sec-4-2">
        <title>B. Some implementation details</title>
        <p>
          To perform matrix operations, we used
SUITESPARSE:GRAPHBLAS [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]. It is a high-performance
implementation of the GRAPHBLAS [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ] standard, which is
intended to handle graphs, e.g. hidden Markov model. Also,
it defines various linear algebra primitives, such as Min_plus
semiring. Our implementation uses custom formats to define
HMM and observation sequences simplifying data parsing.
The full source code is available online [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ].
        </p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>IV. EVALUATION</title>
      <p>
        In this section, we compare the specialized Viterbi algorithm
against the initial one and CUDAMPF [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ].
      </p>
      <p>CUDAMPF is a GPU implementation of the Viterbi
algorithm. Since the Viterbi algorithm can be effectively paralleled,
a GPU is a suitable choice. CUDAMPF works with hidden
Markov models from bioinformatics. A model describes
protein family. An observation sequence specifies a protein and
contains amino acids. If a probability to be in some special
state of the HMM is higher than a threshold, than protein
belongs to the protein family.</p>
      <p>
        We took 24 HMMs from CUDAMPF repository1. All
HMMs have a different number of states but the same
structure. Since these HMMs have a slightly different definition, we
implement a converter into our custom format. We evaluate our
solution on three different datasets. Two datasets are randomly
generated, each contains three sequences consisting of 3500
and 7000 observations respectively. The third dataset is
realworld 16 proteins taken from PFAM [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ] database. The length
of the proteins varies from 38 to 7096 observations. The
number of possible observations, i.e.  = 20, for all datasets.
      </p>
      <p>We run experiments on Ubuntu 20.04, Intel Core i7-6700
3.40 GHz, 64 Gb RAM, NVIDIA GeForce GTX 1070. Each
implementation with concrete parameters was run 10 times,
and a median was taken as a result. We evaluate only the
first and second level specialization of the presented algorithm,
since memory used for memoization grows by an exponent.
For the third level the out-of-memory exception was thrown.
3 x 3500
3 x 7000
Real-world</p>
      <p>CUDAMPF
1https://github.com/Super-Hippo/CUDAMPF (date: 2021-12-02)
1000</p>
      <p>800
s
m
,
em 600
i
T
400
200
(a) 3 sequences, each 3500 observations (lower is better)
(b) 3 sequences, each 7000 observations (lower is better)
500</p>
      <p>1000 1500
Number of HMM states</p>
      <p>2000</p>
    </sec>
    <sec id="sec-6">
      <title>CUDAMPF Initial 1-level</title>
      <p>500</p>
      <p>1000 1500
Number of HMM states
2000</p>
    </sec>
    <sec id="sec-7">
      <title>1-level 2-level</title>
      <p>500</p>
      <p>1000 1500
Number of HMM states
2000
500</p>
      <p>1000 1500
Number of HMM states
2000
(c) Real-world dataset (lower is better)
(d) Specialization algorithm run time (lower is better)
not shown in some figures. One of the reasons for such a
slowdown is the increased memory consumption.
Nevertheless, even on a workstation with 8 CPU threads, CPU-based
first level specialization outperforms GPU-based CUDAMPF
on the small HMMs used in CUDAMPF benchmarks2. After
all, these results are comparable with ones from CUDAMPF.
It is also worth noting, that the parallel Viterbi algorithm,
expressed in terms of linear algebra, is easier to implement
than the CUDAMPF dynamic programming version, since
the abstraction level is higher. All the above proves the
specialization of the Viterbi algorithm is applicable in practice.</p>
    </sec>
    <sec id="sec-8">
      <title>V. RELATED WORK</title>
      <p>There are a lot of works, where specialization was
successfully applied.</p>
      <p>2For evaluation we used the exact set of HMMs from CUDAMPF
benchmarks.</p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] it was shown that the result of specialization of
the naïve pattern match algorithm to some fixed pattern can
be behavioural equivalent to the Knuth, Morris and Pratt
algorithm. This result is often used as a strength test for
partial evaluators to be “good enough”. Since we consider
the concrete algorithm specialziation only, the test is not
applicable in our case.
      </p>
      <p>
        A partial evaluation was used in ray tracing [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ] by P. H.
Andersen. The author optimizes a ray tracer, gaining speedups
from 1.8 to 3.0 depending on the meta-parameters and
compiler. The main performance improvement was reached with
constant propagation and unrolling loops. It can be done by
an optimizing compiler, but this partial evaluator is aggressive.
That means sometimes a specialized algorithm can have an
enormous code size and lead to performance regression. The
static data was directly written inside source code, while our
solution can run without any files’ modifications.
      </p>
      <p>
        A. Tyurin, D. Berezun and S. Grigorev have applied
specialization to the naïve pattern match string search algorithm,
implemented as a GPU program [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ]. They got performance
improvement up 8 times in some cases. GPU has a lot of
simple algebraic logic units. All of them need to take data
to work with. It means a data cache of GPU is a bottleneck.
Using specialization, static data was moved to a code cache.
Such transformation makes data cache miss less possible. One
may call it a "hardware specialization".
      </p>
      <p>
        C. Sakama et al. used linear algebra as a logic programs
representation [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. The authors introduce partial evaluation as
a part of the algorithm to find a logic model of a program. If
specialization is used, run time is decreased by 10 times.
      </p>
    </sec>
    <sec id="sec-9">
      <title>VI. DISCUSSION</title>
      <p>There are some possible research directions and future work.
The Viterbi algorithm specialization is the first step to find out
if partial evaluation can be effectively applied to the linear
algebra algorithms.</p>
      <p>
        First of all, the next step is to run benchmarks at a
GPU. SUITESPARSE:GRAPBLAS [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] is the reference CPU
implementation of the GRAPHBLAS [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ] standard. There are
some GPU implementations, such as GRAPHBLAST [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ] and
GBTL [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ], but to our knowledge, they are unstable.
      </p>
      <p>One can try to apply partial evaluation to the other
algorithms in terms of linear algebra. These experiments will reveal
the limits of the specialization to such algorithms. There is a
high chance that such experiments can be successfully used in
production.</p>
      <p>Since partial evaluation can lead to a performance increase,
it can be useful to implement a linear algebra library with
specialization primitives. It will let to develop more effective
applications with linear algebra algorithms in less time.</p>
      <p>Another approach is to do hardware partial evaluation, e.g.
to make FPGA, where specialization program with static data
will be embedded as a scheme.</p>
    </sec>
    <sec id="sec-10">
      <title>VII. CONCLUSION</title>
      <p>In the paper, we study an application of partial evaluation
to the linear algebra-based algorithms on a particular example
— the Viterbi algorithm with an HMM being fixed, i.e. static
parameter. The specialized version of the Viterbi algorithm
is presented. Our experiments show that on real benchmarks
the presented algorithm can be comparable to the existing
GPU-based Viterbi algorithm implementation CUDAMPF.
Thus, the proposed approach is applicable in practice and
further partial evaluation application to the linear
algebrabased algorithms is a promising research direction.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>C.</given-names>
            <surname>Aggarwal</surname>
          </string-name>
          ,
          <source>Linear Algebra and Optimization for Machine Learning: A Textbook</source>
          ,
          <year>01 2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>R.</given-names>
            <surname>Szeliski</surname>
          </string-name>
          , Computer Vision: Algorithms and Applications, 1st ed. Berlin, Heidelberg: Springer-Verlag,
          <year>2010</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>J.</given-names>
            <surname>Gentle</surname>
          </string-name>
          , Numerical Linear Algebra for Applications in Statistics. Springer-Verlag,
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>C.</given-names>
            <surname>Sakama</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Nguyen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Sato</surname>
          </string-name>
          , and
          <string-name>
            <given-names>K.</given-names>
            <surname>Inoue</surname>
          </string-name>
          , “
          <article-title>Partial evaluation of logic programs in vector spaces,” EasyChair Preprint no</article-title>
          .
          <issue>172</issue>
          ,
          <issue>EasyChair</issue>
          ,
          <year>2018</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>T. A.</given-names>
            <surname>Davis</surname>
          </string-name>
          , “Algorithm 1000:
          <article-title>SuiteSparse:GraphBLAS: Graph Algorithms in the Language of Sparse Linear Algebra</article-title>
          ,” vol.
          <volume>45</volume>
          . URL: https://doi.org/10.1145/3322125
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>N.</given-names>
            <surname>Jones</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Gomard</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P.</given-names>
            <surname>Sestoft</surname>
          </string-name>
          ,
          <source>Partial Evaluation and Automatic Program Generation</source>
          ,
          <year>1993</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>A.</given-names>
            <surname>Viterbi</surname>
          </string-name>
          , “
          <article-title>Error bounds for convolutional codes and an asymptotically optimum decoding algorithm</article-title>
          ,
          <source>” IEEE Transactions on Information Theory</source>
          , vol.
          <volume>13</volume>
          , no.
          <issue>2</issue>
          , pp.
          <fpage>260</fpage>
          -
          <lpage>269</lpage>
          ,
          <year>1967</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>S. R.</given-names>
            <surname>Eddy</surname>
          </string-name>
          , “
          <article-title>Accelerated profile hmm searches,” PLoS computational biology</article-title>
          , vol.
          <volume>7</volume>
          , no.
          <issue>10</issue>
          , pp.
          <year>e1</year>
          002
          <fpage>195</fpage>
          -
          <lpage>e1</lpage>
          002
          <fpage>195</fpage>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>L. R.</given-names>
            <surname>Rabiner</surname>
          </string-name>
          ,
          <string-name>
            <surname>A</surname>
          </string-name>
          <article-title>Tutorial on Hidden Markov Models and Selected Applications in Speech Recognition</article-title>
          . San Francisco, CA, USA: Morgan Kaufmann Publishers Inc.,
          <year>1990</year>
          , p.
          <fpage>267</fpage>
          -
          <lpage>296</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>A.</given-names>
            <surname>Petropoulos</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. P.</given-names>
            <surname>Chatzis</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Xanthopoulos</surname>
          </string-name>
          , “
          <article-title>A novel corporate credit rating system based on student's-t hidden markov models</article-title>
          ,
          <source>” Expert Systems with Applications</source>
          , vol.
          <volume>53</volume>
          , pp.
          <fpage>87</fpage>
          -
          <lpage>105</lpage>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>E.</given-names>
            <surname>Theodosis</surname>
          </string-name>
          and
          <string-name>
            <given-names>P.</given-names>
            <surname>Maragos</surname>
          </string-name>
          , “
          <article-title>Analysis of the viterbi algorithm using tropical algebra and geometry</article-title>
          ,” in
          <source>2018 IEEE 19th International Workshop on Signal Processing Advances in Wireless Communications (SPAWC)</source>
          ,
          <year>2018</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>5</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>S. R.</given-names>
            <surname>Eddy</surname>
          </string-name>
          , “
          <article-title>What is a hidden Markov model?” Nature Biotechnology</article-title>
          , vol.
          <volume>22</volume>
          , pp.
          <fpage>1315</fpage>
          -
          <lpage>1316</lpage>
          . URL: https://doi.org/ 10.1038/nbt1004-
          <fpage>1315</fpage>
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>A.</given-names>
            <surname>Buluç</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Mattson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>McMillan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E. J.</given-names>
            <surname>Moreira</surname>
          </string-name>
          , and
          <string-name>
            <given-names>C.</given-names>
            <surname>Yang</surname>
          </string-name>
          , “
          <article-title>Design of the graphblas api for c</article-title>
          ,
          <source>” IPDPS Workshops</source>
          , pp.
          <fpage>643</fpage>
          -
          <lpage>652</lpage>
          ,
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <article-title>Implementation repository</article-title>
          . URL: https://github.com/ IvanTyulyandin/Lin_alg_Viterbi (Date:
          <fpage>2021</fpage>
          -13-02).
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>H.</given-names>
            <surname>Jiang</surname>
          </string-name>
          and
          <string-name>
            <given-names>N.</given-names>
            <surname>Ganesan</surname>
          </string-name>
          , “
          <article-title>Cudampf: a multi-tiered parallel framework for accelerating protein sequence search in hmmer on cuda-enabled gpu</article-title>
          ,
          <source>” BMC bioinformatics</source>
          ,
          <year>2016</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>J.</given-names>
            <surname>Mistry</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Chuguransky</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Williams</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Qureshi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G. A.</given-names>
            <surname>Salazar</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E. L. L.</given-names>
            <surname>Sonnhammer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. C. E.</given-names>
            <surname>Tosatto</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Paladin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Raj</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. J.</given-names>
            <surname>Richardson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. D.</given-names>
            <surname>Finn</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Bateman</surname>
          </string-name>
          , “Pfam:
          <article-title>The protein families database in 2021,”</article-title>
          <source>Nucleic Acids Research</source>
          , vol.
          <volume>49</volume>
          , no.
          <issue>D1</issue>
          , pp.
          <fpage>D412</fpage>
          -
          <lpage>D419</lpage>
          ,
          <year>10 2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>C.</given-names>
            <surname>Consel</surname>
          </string-name>
          and
          <string-name>
            <given-names>O.</given-names>
            <surname>Danvy</surname>
          </string-name>
          , “
          <article-title>Partial evaluation of pattern matching in strings</article-title>
          ,
          <source>” Information Processing Letters</source>
          , vol.
          <volume>30</volume>
          , no.
          <issue>2</issue>
          , pp.
          <fpage>79</fpage>
          -
          <lpage>86</lpage>
          ,
          <year>1989</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>P. H.</given-names>
            <surname>Andersen</surname>
          </string-name>
          , “
          <article-title>Partial evaluation applied to ray tracing</article-title>
          ,”
          <year>1996</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>A.</given-names>
            <surname>Tyurin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Berezun</surname>
          </string-name>
          , and
          <string-name>
            <given-names>S.</given-names>
            <surname>Grigorev</surname>
          </string-name>
          , “
          <article-title>Optimizing gpu programs by partial evaluation</article-title>
          ,” pp.
          <fpage>431</fpage>
          -
          <lpage>432</lpage>
          ,
          <year>02 2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <given-names>C.</given-names>
            <surname>Yang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Buluc</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J. D.</given-names>
            <surname>Owens</surname>
          </string-name>
          , “
          <article-title>Graphblast: A highperformance linear algebra-based graph framework on the gpu</article-title>
          ,”
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <article-title>Graphblas template library (gbtl), v. 3.0</article-title>
          . URL: https: //github.com/cmu-sei/gbtl (Date:
          <fpage>2021</fpage>
          -12-02).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>