<!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>Accounting Journal Reconstruction with Variational Autoencoders and Long Short-term Memory Architecture</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Mario Zupan</string-name>
          <email>mzupan@vup.hr</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Svjetlana Letinic</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Verica Budimir</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Polytechnic in Pozega</institution>
          ,
          <addr-line>Vukovarska 17</addr-line>
          ,
          <country country="HR">Croatia</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Our tries to learn machines how to reconstruct journal entries with the aim of nding anomalies lead us to deep learning (DL) technologies. Nowadays Variational autoencoder and Long short- term memory architectures as well as other deep learning architectures solves wide range of problems, yet they are not enough implemented in a eld of accounting information systems (AIS). Inside AIS, accounting data follows accounting logic and makes speci c datasets constructed by different type of columns - categorical and continuous variables. Our aim is reconstruction of these variables. Development of the model capable for precise reconstruction is not an easy task. This paper describes our research for anomaly detection model architecture which will be capable to reconstruct dataset with categorical features mixed with continuous monetary value feature. We developed basic models trained on accounting journals from 2007 to 2018 and then tested in the scal year 2019. Still, lots of hyperparameters need to be checked if we want to improve accuracy. Deep learning research is an engineering task leaded by experience so there is no linearity in the model improvement. Consequently, this paper is our contribution to collection of experience in developing accurate, useful and intelligent accounting control system.</p>
      </abstract>
      <kwd-group>
        <kwd>general ledger journal entry bookkeeping accounting deep learning variational autoencoder long short-term memory anomaly detection accounting control system</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>As in every information system, human e orts, as well as interaction between
modules, can cause errors. Anomalies in accounting books occur on a daily
basis, and unintentional human errors, attempted fraud, and continuous legislative
changes are some of the critical causes. Anomalies occur despite the fact that
the most existing controls integrated into accounting modules of modern ERP
Copyright c 2020 for this paper by its authors. Use permitted under Creative
Commons License Attribution 4.0 International (CC BY 4.0). This volume is published
and copyrighted by its editors. SEBD 2020, June 21-24, 2020, Villasimius, Italy.
systems are created in compliance with bookkeeping rules. Because small and
medium enterprises (SMEs) do not have audit obligations regulated by law,
manual tax inspections are the only mechanism of their accounting and tax control.
In general, detection of errors, made intentionally or not, consumes a large
portion of a bookkeeper's or tax inspector's time, and correction of errors is not
an easy part of their job, particularly owing to the architecture and
functioning of the accounting software modules. Namely, most of today's ERP systems
have specialized documents (digital forms) for an every speci c business event.
An every digital form is connected with one or more journal entry schemes
created by senior accountants. Junior accountants or non-accountant employees do
not have to be familiar with journal schemes because they communicate only
through forms. As long as the modern accounting modules inside ERP systems
are functioning based on the described principle, a single error in the only one
journal entry scheme can cause an incorrect accounting entry for the whole set
of connected digital forms.</p>
      <p>When statistic methodology had become the part of a nancial audit process,
life of employees involved in auditing became a lot easier. Now it is the time
for improving and make more easier auditing, accounting and tax inspection
processes by utilization of deep learning algorithms.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Related works</title>
      <p>
        When the idea for this research began to form, we found a previous study dealing
with the same challenge and methodology written by Schreyer, M et. al. [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ],
which processed two datasets extracted from an SAP ERP. The rst dataset
represents the accounting document header (e.g., document id, type, time, and
currency), and the second contains journal entry details (e.g., general ledger
account, debit, credit, and amount). Because the majority of attributes correspond
to categorical variables, the authors preprocessed the journal entry attributes to
obtain a one-hot encoded representation of each attribute. They obtained 401
encoded dimensions for dataset A and 576 encoded dimensions for dataset B. Each
journal entry was labeled as either a synthetic global anomaly, synthetic local
anomaly, or non-synthetic regular entry. Dataset A contains a total of 307,457
journal entry line items comprised of 6 categorical attributes. In total 95 (0.03%)
synthetic anomalous journal entries have been injected into dataset. These
entries encompass 55 (0.016%) global anomalies and 40 (0.015%) local anomalies.
Dataset B contains a total of 172,990 journal entry line items comprised of 10
categorical attributes. In total 100 (0.06%) synthetic anomalous journal entries
have been injected into the dataset. These entries encompass 50 (0.03%) global
anomalies and 50 (0.03%) local anomalies. The described datasets became inputs
in nine distinct autoencoder architectures. The training was conducted via
standard back-propagation until convergence (max. 2,000 training epochs). Anomaly
threshold Beta = 0:01 implying that a journal entry is labeled anomalous if one
of its attributes was not reconstructed correctly or occurs very rarely. The best
performing results are selected based on parameterizations that (1) result in a
recall of 100% of the synthetic anomalies and correspond to (2) the highest area
under the ROC curve (ROC-AUC). On the same accounting datasets, Schreyer,
M et. al. also trained the Adversarial autoencoder to learn a semantic
meaningful representation of journal entries recorded in real-world ERP system [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ].
Schreyer, M. et. al. [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ] also showed an adversarial attack against
Computeraided audit tools (CAAT) using deep neural networks. They rst introduce a
real-world thread model designed to camou age accounting anomalies such as
fraudulent journal entries. Second, they showed that adversarial autoencoder
neural networks are capable of learning a human interpretable model of journal
entries that disentangles the entries latent generative factors. They used AAE
architecture which extends the concepts of Autoencoder Neural Networks.
      </p>
      <p>
        Shultz, M. et. al. [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] use three-layer autoencoder, relu as an activation
function in a step when the encoder e(x) transforms the input x to a hidden
representation h. The encoder (x) transforms the input x to a hidden representation
h. In this step they use leaky-relu as an activation function. From the review of
related work subsection, it can be concluded that the application of deep learning
techniques in auditing is a promising research eld with several open questions
to be addressed. However, in the current audit practice, the full potential of such
techniques is not yet realized. Mainly, less complex techniques like static rules
are applied that check only a few journal entry attributes at a time.
      </p>
      <p>
        Another study that inspired our research [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] described the use of a decision
tree classi cation algorithm for nancial journal entry fraud. This web-based
application labels journal entries as either fraudulent or non-fraudulent.
Classi cation algorithms are also tested through the Sherlock system development
for identi cation of accounting irregularities within unlabeled accounting data
extracted from general ledger [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Authors used Positive Nave Bayes (PNB)
algorithm but they experimented with many di erent classi cation algorithms.
      </p>
      <p>
        Anomaly detection accounting systems are developed by applying di erent
technologies as well as inputs. Instead of accounting data, the authors of the
study [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] experimented with two data mining algorithms applied on SAP R/3
security audit log data. Their results depends on di erent transaction threshold
values.
      </p>
      <p>
        Other available papers considered did not exploit a deep learning technology
in the accountancy when solving a speci c real-world problem. Still they were
extremely helpful to us because they contained general thoughts regarding the
application of arti cial intelligence in the eld of accounting [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ], [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]. The
authors described accounting and auditing problems (bookkeeping routines, fraud
detection, revenue prediction, an analysis of unstructured data, nancial
reporting, etc.) that might be potentially solved using machine learning technology, and
described the strengths and limits of machine learning. As a common theme for
related studies, machine learning has highlighted promising results but still does
not outperform the existing implementation, which is simple and deterministic
[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ].
      </p>
    </sec>
    <sec id="sec-3">
      <title>Methodology</title>
      <p>
        Inspired by Schreyer, M. et. al. [
        <xref ref-type="bibr" rid="ref14">14</xref>
        ], [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ], [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ] and other related works, we
conducted research into deep learning capabilities in our previous paper [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ]. We
trained and tested a variational autoencoder (VAE) model on a 3.731 row x 57
column dataset using journal entries for four scal years, namely, 2014 to 2017.
The dataset was divided into a training part and a testing part at a 1:9 ratio,
with a 374 x 57 testing shape and 3.359 x 57 training shape. The aim of the
research was the reconstruction of all journal entries of the test dataset. The
journals were audited and approved by accountants and a tax department. Our
model incorrectly reconstructed 4 out of 374 journal entries of the test dataset.
The entire test dataset has 183 unique rows; however, they are repeated through
the years except for four years marked by the model. The model cannot
reconstruct the journal entries if it sees an entry for the rst time in a test part of the
dataset. Consequently, the precision of the model reconstruction was 99.9893%.
      </p>
      <p>Keras deep learning library has provided a signi cant contribution to our
understanding of neural networks and arti cial intelligence(AI). This high-level
neural network application programming interface (API) is capable of running
Google's TensorFlow, Microsoft's Cognitive Toolkit (CNTK), or the Theano
deep learning library. Deep learning libraries can be used for supervised
learning, in which a network is trained on labeled datasets. A supervised model can
be well optimized but may be useless at the same time when new data are
applied. However, neural networks can also be used for semi-supervised learning,
through autoencoders and with unlabeled datasets. Semi-supervised learning is
more suitable for anomaly detection problems and the nature of our particular
data, namely, unlabeled and without errors or fraud entries, according to an
audit by an experienced accountant.
3.1</p>
      <sec id="sec-3-1">
        <title>Variational autoencoder (VAE) architecture</title>
        <p>Semi-supervised learning can be realized through an autoencoder architecture.
Autoencoders reconstruct an input given the same input, and are usually trained
and tested on separate data. If they are trained and tested on the same dataset,
the generalization of the model is sacri ced.</p>
        <p>
          Based on the friendliness of Keras and the power of TensorFlow, a neural
network model was built as a result of this research. More precisely, instead of
a classical autoencoder, the model is a variational autoencoder (VAE), which
was simultaneously discovered by Kingma and Welling in December 2013, and
Rezende, Mohamed, and Wierstra in January 2014 [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]. According to Kingma
and Welling [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ], in variational auto-encoders, neural networks are used as
probabilistic encoders and decoders. There are many possible choices of encoders and
decoders, depending on the type of data and model. In their example they used
relatively simple neural networks, multi-layered perceptrons (MLPs). For the
encoder they used a MLP with Gaussian output, while for the decoder they used
MLPs with either Gaussian, in case of real-valued data, or Bernoulli outputs (in
case of binary data). Kingma and Welling [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ] trained generative models of
images from the MNIST and Frey Face datasets and compared learning algorithms
in terms of the variational lower bound, and the estimated marginal likelihood.
Rezende, Mohamed, and Wierstra demonstrated the ability of the model to
impute missing data on MNIST, Frey Face and SVHN images datasets. They have
also projected the MNIST dataset to a 2-dimensional latent space and use 2D
embedding as a visualisation of the data.
        </p>
        <p>
          In contrast to a classical autoencoder (AE), a VAE is capable of sampling
from a latent space to create an entirely new output, which is possible because
it turns the input into the parameters of a statistical distribution, namely, the
mean and variance, instead of compressing its input into a xed code in the latent
space, which is how a AE operates. Our decision to use VAE was in uenced
by An, J. and Cho, S. [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]. They explained VAE di erences from an AE based
anomaly detection. First, probabilistic encoder extends the expressive power of
the VAE compared to the AE in that even though normal data and anomaly data
might share the same mean value, the variability can di er. Second, VAE has
selective sensitivity to reconstruction according to variable variance. This is also
a feature that the AE lacks in due to its deterministic nature. Third, autoencoder
based anomaly detection uses reconstruction errors as anomaly scores, which
are di cult to calculate if the input variables are heterogeneous. Also a 1%
probability is always a 1% for any data. Thus deciding the threshold of the
reconstruction error is much more objective, reasonable, and easy to understand
than that of the reconstruction error.
        </p>
        <p>So the main advantage of the variational autoencoder is its probabilistic
manner for describing an observation in latent space. VAEs can be used to
develop latent spaces of sound, music, or even text; however, in practice, the
most interesting results have been obtained with pictures. Accordingly, a VAE
is potentially capable of generating new journal entries from a latent space as
well as reconstructing existing entries.</p>
        <p>The VAE model ( gure 2a). was trained through 1,000 epochs ( gure 1a.),
and our algorithm saved the best model according to the binary cross entropy
loss function. We tried to set the number of epochs as high as it is possible with
the available hardware. The model checkpoint technique allowed us to set high
number of epochs but only the best model is saved according to the binary cross
entropy metrics. Binary cross entropy measures how far away from the true value
(y, which is either 0 or 1) the prediction ^y is for each of the features and then
averages these class-wise errors to obtain the nal loss according to equation 1.</p>
        <p>L(y; y^) =
1 N</p>
        <p>X[yi log(y^i) + (1
N i=1
yi) log(1
y^i)]
(1)</p>
        <p>
          We used relu activation in all layers except the last one in decoder where
we used sigmoid activation. Our model is compiled with rmsprop optimizer.
According to Chollet ([
          <xref ref-type="bibr" rid="ref7">7</xref>
          ]), cross-entropy is a quantity from the eld of information
theory that measures the distance between the probability distributions, or in
our case, between the ground-truth distribution and our reconstructed
distribution.
3.2
        </p>
      </sec>
      <sec id="sec-3-2">
        <title>Long short-term memory (LSTM) architecture</title>
        <p>
          In addition to an autoencoder, this research exploited the capabilities of a long
short-term memory (LSTM) architecture. LSTM is applied to a deep
learning model with LSTM layers. According to Chollet [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ], LSTM is a layer that
saves information across numerous time steps. Whereas autoencoders are used
in credit card fraud detection models, LSTM is used for price stock prediction,
temperature-forecasting problems, and other time-series predictions. Owing to
the fact that our VAE model inputs did not cover the monetary amount applied
in our previous study[
          <xref ref-type="bibr" rid="ref18">18</xref>
          ], and was inspired by Arvaniti, V. [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ], which used
unsupervised data mining algorithms, unusual nancial transactions in this thesis are
de ned as account pairs inside journal entries containing an unusual amount of
money compared to their frequent behavior, and we expanded our research in this
study by adding an LSTM model and a monetary value column to our prototype
web application. The monetary values were normalized using a MinMaxScaler
(default range of 0 to 1).
        </p>
        <p>The LSTM model was trained through 500 epochs ( gure 1b.), across 3
time steps. In a wide pallet of loss functions packed in Keras, we chose the
mean squared error metrics. According to equation 2, the best LSTM model
was saved and used to predict the amounts in the test datasets.</p>
        <sec id="sec-3-2-1">
          <title>Suppose we want to predict the fourth value in this sequence:</title>
          <p>M SE = 1 Xn (Yi
n
i=1</p>
          <p>Yi)2
10 20 30 40 50 60 70 80 90
(2)</p>
        </sec>
        <sec id="sec-3-2-2">
          <title>Then, x test and y test appear as follows:</title>
          <p>
            10 20 30 40 ; 20 30 40 50 ; 30 40 50 60 ;
40 50 60 70 ; 50 60 70 80 ; 60 70 80 90
Suppose we have MSE = 0.02. According to equation 2, the error of the LSTM
model is p0:02=0.14. Looking at our toy example target values ranging from 40
to 90, we can say that, on average, the error of the model was 0.14. This means
that, when predicting a value of 40, we guessed 39.86, and when predicting a
value of 50, we may have guessed 50.14, and when predicting a value of 60, we
may have estimated 59.86, and so on. However, these are average values. Each
individual error could have been negative or positive, making their sum zero but
not their squared sum. Thus, this is simply the average of the squared di erence
between the predicted and actual data points.
Transactions are classi ed through a pre-de ned chart of accounts based on a
prescribed structure of the balance sheet, the income statement, and o -balance
sheet items. Accounts are divided into ten classes according to the speci c needs
of the entrepreneur. Most enterprises use a chart of accounts from some of the
most popular Croatian accounting magazine publishers and adjusted to their
particular needs because the classes are not provided by law. Because the number
of account digits is also not regulated by law, but based on the needs of the
entrepreneur, in our research, we decided to use the rst three digits.
t-Distributed Stochastic Neighbor Embedding (t-SNE)
technique
In the year 2008, Laurens van der Maaten and Geo rey Hinton presented
technique t-Distributed Stochastic Neighbor Embedding (t-SNE) that visualizes
highdimensional data by giving each datapoint a location in a two or three-dimensional
map [
            <xref ref-type="bibr" rid="ref12">12</xref>
            ]. In opposite to Principal Components Analysis (PCA), t-SNE handles
non-linear features. In the rst step, t-SNE calculates density of all points in
Gaussian distribution which represents probabilities. In the second step it
calculates second set of probabilities but for the Student t-distribution with one
degree of freedom. In the last step t-SNE measures the di erence between the
probability distributions of the two-dimensional spaces using Kullback-Liebler
divergence (KL) and by using gradient descent algorithm tries to minimize KL
cost function.
4
          </p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Results</title>
      <p>
        Both models were compiled with rmsprop optimizer. Layers of the both models
were used relu and sigmoid activation. The model VAE was trained and saved
when the loss function reached the minimum (Figure 1.). During the training, we
used 10% of the dataset for testing which is presented by the orange line in the
gure. It is evident that the loss function curve has some spikes. High
learningrate, batch size (number of samples processed before the model is updated)
and the number of epochs (the number of complete passes through the
training dataset) are the hyperparameters which demand ne tuning. Loss spikes are
often encountered when training with high learning rates, high order loss
functions or small batch sizes, according to the authors [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] who developed Adaptive
Learning Rate Clipping Stabilizes Learning (ALRC) to stabilize the training of
arti cial neural networks by limiting backpropagated losses. We also knew that
the hyperparameters need to be tuned because the ideal settings for one dataset
will not be the same across all datasets. When tuning the hyperparameters of an
estimator, Scikit Learn o ers the Grid Search and Random Search functions to
simplify and automate the process. We have tried both functions and convinced
that both are extremely costly in computing power and time, and still depend
on chosen dataset. So, between grid search and manual search we choose the
second one. When we increased the batch size from 50 to 100 with the rmsprop
optimizer (default learning rate = 0.001) and with the same number of epochs
the number of spikes decreased to only one. After we changed the optimizer to
adam (learning rate=0.001) the spikes were completely disappeared. Although
we knew how to avoid the spikes, we also new that they depend on dataset what
we proved by experimenting with another datasets. Bergstra, J. &amp; Bengio, Y.
[
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] discussed our presumption that di erent hyperparameters matter on di erent
datasets which lead us from our aim of developing accounting anomaly detection
model independent from data nature. Collected knowledge about
hyperparameters will be used in future researches.
      </p>
      <p>(a) VAE model</p>
      <p>The gure 2a. shows types and connections between layers of the VAE model.
First and last layer must have the same number of inputs (103) which is the same
as the number of dataset columns. The model needs to learn 13,405 learnable
parameters, such as weights and biases.</p>
      <p>The models were trained on journals from 2007 to 2018 using 84,759 rows
and tested on the scal year 2019 with 3,864 rows. The test dataset is 4.5% of
the training size. Considering the document type, the account number from the
chart of accounts and the debit/credit side of account, the VAE model incorrectly
reconstructed 33 (table 1.) single journals entries and 7 journal entries pairs
(table 2.) of 3.864 journal entries of the test dataset, that is 0.8% of the journal
entries including 25 entries of the test dataset that have never happened in the
trained dataset.</p>
      <p>The LSTM-VAE model needed to learn signi cantly larger number of
learnable parameters (162,824) with the monetary column as the extra feature in
contrast to the VAE model inputs. That is 104 inputs (LSTM-VAE) in
opposite to 103 inputs (VAE). As it can be seen in the Figure 2b., encoder of the
model was included LSTM layer as well as the decoder, but decoder's LSTM
(a) VAE
(b) LSTM-VAE
layer is under Sequential layer. Although the model was trained on the same
journals from 2007 to 2018 using 84,759 rows and tested on the same scal year
2019 with 3,864 rows, we do not have predictions for the rst 4 rows due to the
hyperparameter timesteps = 3. That gave us 3,860 predictions.</p>
      <p>Both model needed to learn the document type, the journal account and
the debit/credit side of the account. Additionally, LSTM-VAE model needed to
reconstruct monetary values. We tried the model with di erent loss functions,
number of layers and the best architecture had 138 (1.65% of the test dataset)
reconstruction errors with monetary value included. It is important to mention
that the LSTM-VAE model had di culties with the very rst 88 journal entries.</p>
      <p>Despite the fact that the researched models had di erent inputs (monetary
value included in the LSTM VAE model), decision has been led by the nal
aim of our research, that is development of the most accurate autoencoder. As
a bonus we got the opportunity to analyze predicted versus real value.</p>
      <p>Although the common characteristics of the journal entry clusters given by
tSNE methodology and their relationship were not researched, we used tSNE
to visualize dataset and the given results. tSNE reduced latent dimensions of
the autoencoders to 2-dimensional space. Points in the gures 3a. and 3b. show
journal entries of the tested dataset. Marked points represents entries that the
VAE and the LSTM-VAE model reconstructed incorrectly. It can be seen that the
both models have reconstruction errors in the same area of the 2-dimensional
space. Further, the models did not have a problem to reconstruct the most
obvious outliers though it was not capable to reconstruct outliers closed to the
well de ned clusters of the journal entries.</p>
      <p>(a) VAE model
Fig. 3: tSNE visualization of the models: Real journal entries with marked
anomalies</p>
    </sec>
    <sec id="sec-5">
      <title>Conclusion and future studies</title>
      <p>With research described within this paper we are trying to collect experience in
development of an arti cial intelligence models by using real datasets generated
in real world accounting books and with the nal aim of developing intelligence
module of accounting information system capable to assist to accountants,
auditors and tax o cers in nding anomalies. What we were considering for
anomalies are errors, intentionally made or not. Precondition for intelligent error
detection task is the model which is capable to learn the whole entries in a training
process and then to reconstruct every single entry from the tested dataset except
these that were seen for a very rst time. To reached satis ed precision as well as
to help us to understand the model functioning, we used the real-world dataset
which is well known to us. It does not include any kind of errors or bookkeeping
rules violation, but it includes entries that were happened in the test scal year
for a very rst time.</p>
      <p>In this research we tested two models based on autoencoder architecture. The
rst model is variational encoder (VAE) model and the second one is variational
encoder with Long short memory layers (LSTM-VAE) model. The inputs in these
models were accounting journals for 12 scal years of the small-sized enterprise.
Journals did not include any kind of anomalies or errors.</p>
      <p>To reach satis ed accuracy of the model, we included document types and
journal accounts as unavoidable drivers of business events. Except the most
necessary variables, common for every accounting system, we added the monetary
value column as the input into the second model (LSTM-VAE). We will also try
to add more variables as an input to our models in our future studies.</p>
      <p>In general, we can conclude that semi-supervised methods, autoencoders, are
promising technology for developing anomaly detection modules inside AIS. Our
research also showed potentials of the journal entry anomalies control system
development with the help of t-SNE architecture. Visualization helped us to
better understand the nature of our data as well as the models functioning. We
saw that both models have reconstruction errors of the journal entries in the
same area of the 2-dimensional space. Errors of the LSTM-VAE model are the
errors of the VAE model at same time. Maybe world of accounting could have
bene ts from visualization techniques as a supporting technology, so we will use
t-SNE for latent dimension visualization in our future studies.</p>
      <p>In this paper we did not analyze predicted monetary values generated with
our LSTM-VAE model, because we tried to research autoencoders' learning
capabilities of the bookkeeping rules and they are not dependable on monetary
values. That will be researched in our future studies too.</p>
      <p>Generally, VAE models have one more characteristic still unresearched in a
eld of accounting. They have capability of generating new data from the latent
space. It will be interesting to see results of our model generator of ctive entries
in our future researches.</p>
      <p>Both models we developed with respect of deep learning rules are promising.
Still, accuracy in an accounting, especially in anomaly detection problems is
requested condition, so the hyperparameters of the models need to be tuned
according to the collected knowledge. Lots of experimenting with architecture
and hyperparameters are waiting for us to get the prototype for the real-world
module of an account control system.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>An</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Cho</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>Variational autoencoder based anomaly detection using reconstruction probability</article-title>
          .
          <source>Special Lecture on IE 2</source>
          (
          <issue>1</issue>
          ) (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Arvaniti</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          :
          <article-title>Data mining journal entries: Discovering unusual nancial transactions</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Awodele</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Akinjobi</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Akinsola</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>A framework for web based detection of journal entries frauds using data mining algorithm</article-title>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Bay</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kumaraswamy</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Anderle</surname>
            ,
            <given-names>M.G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kumar</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Steier</surname>
            ,
            <given-names>D.M.</given-names>
          </string-name>
          :
          <article-title>Large scale detection of irregularities in accounting data</article-title>
          .
          <source>In: ICDM</source>
          (
          <year>2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Bengtsson</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Jansson</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>Using classi cation algorithms for smart suggestions in accounting systems</article-title>
          .
          <source>unpublished thesis</source>
          (
          <year>2015</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Bergstra</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bengio</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>Random search for hyper-parameter optimization</article-title>
          .
          <source>Journal of machine learning research 13(Feb)</source>
          ,
          <volume>281</volume>
          {
          <fpage>305</fpage>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Chollet</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Deep learning with python</article-title>
          , vol.
          <volume>1</volume>
          .
          <string-name>
            <surname>Greenwich</surname>
          </string-name>
          , CT: Manning Publications CO (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Ede</surname>
            ,
            <given-names>J.M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Beanland</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          :
          <article-title>Adaptive learning rate clipping stabilizes learning</article-title>
          .
          <source>Machine Learning: Science and Technology</source>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9. ICAEW:
          <article-title>Arti cial intelligence and the future of accountancy</article-title>
          .
          <source>Tech. rep., Information Technology Faculty Chartered Accountants, Moorgate Place London EC2R 6EA</source>
          , UK (09
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Khan</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Corney</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Clark</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mohay</surname>
          </string-name>
          , G.:
          <article-title>Transaction mining for fraud detection in erp systems</article-title>
          .
          <source>Industrial engineering and management systems 9(2)</source>
          ,
          <volume>141</volume>
          {
          <fpage>156</fpage>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Kingma</surname>
            ,
            <given-names>D.P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Welling</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Auto-encoding variational bayes</article-title>
          .
          <source>arXiv preprint arXiv:1312.6114</source>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Maaten</surname>
          </string-name>
          , L.v.d.,
          <string-name>
            <surname>Hinton</surname>
          </string-name>
          , G.:
          <article-title>Visualizing data using t-sne</article-title>
          .
          <source>Journal of machine learning research 9(Nov)</source>
          ,
          <volume>2579</volume>
          {
          <fpage>2605</fpage>
          (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Omoteso</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>The application of arti cial intelligence in auditing: Looking back to the future</article-title>
          .
          <source>Expert Systems with Applications</source>
          <volume>39</volume>
          (
          <issue>9</issue>
          ),
          <volume>8490</volume>
          {
          <fpage>8495</fpage>
          (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Schreyer</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sattarov</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Borth</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Dengel</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Reimer</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Detection of anomalies in large scale accounting data using deep autoencoder networks</article-title>
          .
          <source>arXiv preprint arXiv:1709.05254</source>
          (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Schreyer</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sattarov</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Reimer</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Borth</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Adversarial learning of deepfakes in accounting</article-title>
          . arXiv preprint arXiv:
          <year>1910</year>
          .
          <volume>03810</volume>
          (
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Schreyer</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sattarov</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schulze</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Reimer</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Borth</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Detection of accounting anomalies in the latent space using adversarial autoencoder neural networks (08</article-title>
          <year>2019</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Schultz</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tropmann-Frick</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Autoencoder neural networks versus external auditors: Detecting unusual journal entries in nancial statement audits</article-title>
          .
          <source>In: Proceedings of the 53rd Hawaii International Conference on System Sciences</source>
          (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Zupan</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Letinic</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Budimir</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          :
          <article-title>Journal entries with deep learning model</article-title>
          .
          <source>International Journal of Advance Computational Engineering and Networking (IJACEN) 6</source>
          (
          <issue>10</issue>
          ),
          <volume>55</volume>
          {
          <fpage>58</fpage>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>