Giter Site home page Giter Site logo

gitihubi / deepai Goto Github PK

View Code? Open in Web Editor NEW
197.0 16.0 83.0 37.5 MB

Detection of Accounting Anomalies using Deep Autoencoder Neural Networks - A lab we prepared for NVIDIA's GPU Technology Conference 2018 that will walk you through the detection of accounting anomalies using deep autoencoder neural networks. The majority of the lab content is based on Jupyter Notebook, Python and PyTorch.

License: GNU General Public License v3.0

Jupyter Notebook 100.00%
autoencoder anomaly-detection fraud-detection deep-learning pytorch forensic-accounting accounting fraud-prevention fraud

deepai's Introduction

Detection of Accounting Anomalies using Deep Autoencoder Neural Networks

License: GPL v3

An interactive lab we prepared for NVIDIA's GPU Technology Conference 2018 that will walk you through the detection of accounting anomalies using deep autoencoder neural networks. The the lab content is based on Python, IPython Notebook, and PyTorch.

The recording of our talk is available via NVIDIA's GTC On-Demand under the following external link.

Running the Notebook

Binder Open In Colab

Reference

Autoencoder

The lab is inspired by our work "Detection of Anomalies in Large Scale Accounting Data using Deep Autoencoder Networks" by Marco Schreyer, Timur Sattarov, Damian Borth, Andreas Dengel and Bernd Reimer.

The publication is available via arXiv under the following link: https://arxiv.org/abs/1709.05254

Questions?

Please feel free to get in touch by opening an issue report, submitting a pull request, or sending us an email.

Disclaimer

Opinions expressed in this work are those of the authors, and do not necessarily reflect the view of PricewaterhouseCoopers (PwC) International Ltd. nor its network firms.

deepai's People

Contributors

gitihubi avatar sattarov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deepai's Issues

'nn.init.xavier_uniform is deprecated' and 'size mismatch, m1: [128 x 384], m2: [618 x 512]'

Hi there,

a very readable and instructive contribution, thanks for sharing! In which environment does this run sucessfully?

I am trying to run 'GTC_2018_Lab' and 'GTC_2018_Lab-solutions' with the version below, both result in the following two errors.

My environment is Win10 with Anaconda. To solve it, I tried with USE_CUDA=True / False and Python 3.6 / 3.7 and Cudatoolkit 10 / Cudatoolkit 9. Then I downgraded from pytorch 1.0.1 using conda install pytorch=0.4.1 cuda90 -c pytorch. I did not find earlier Pytorch versions via Conda or compiled for Windows on the Pytorch Website.

Also, I changed the shape of the first and last layer to match for the second error but without a change.

Thank you!

First Error ( I deleted some lines in the middle):

[LOG 20190329-05:48:27] decoder architecture:

decoder(
  (decoder_L1): Linear(in_features=3, out_features=4, bias=True)
  (decoder_R1): LeakyReLU(negative_slope=0.4, inplace)
  (decoder_L2): Linear(in_features=4, out_features=8, bias=True)
  (decoder_R2): LeakyReLU(negative_slope=0.4, inplace)
  (decoder_L3): Linear(in_features=8, out_features=16, bias=True)
  (decoder_R3): LeakyReLU(negative_slope=0.4, inplace)
  (decoder_L4): Linear(in_features=16, out_features=32, bias=True)
  (decoder_R4): LeakyReLU(negative_slope=0.4, inplace)
  (decoder_L5): Linear(in_features=32, out_features=64, bias=True)
  (decoder_R5): LeakyReLU(negative_slope=0.4, inplace)
  (decoder_L6): Linear(in_features=64, out_features=128, bias=True)
  (decoder_R6): LeakyReLU(negative_slope=0.4, inplace)
  (decoder_L7): Linear(in_features=128, out_features=256, bias=True)
  (decoder_R7): LeakyReLU(negative_slope=0.4, inplace)
  (decoder_L8): Linear(in_features=256, out_features=512, bias=True)
  (decoder_R8): LeakyReLU(negative_slope=0.4, inplace)
  (decoder_L9): Linear(in_features=512, out_features=618, bias=True)
  (decoder_R9): LeakyReLU(negative_slope=0.4, inplace)
  (dropout): Dropout(p=0.0, inplace)
)

C:\Users\frank\.conda\envs\py36_cuda9\lib\site-packages\ipykernel_launcher.py:10: UserWarning: nn.init.xavier_uniform is now deprecated in favor of nn.init.xavier_uniform_.
  # Remove the CWD from sys.path while we load stuff.
C:\Users\frank\.conda\envs\py36_cuda9\lib\site-packages\ipykernel_launcher.py:15: UserWarning: nn.init.xavier_uniform is now deprecated in favor of nn.init.xavier_uniform_.
  from ipykernel import kernelapp as app
C:\Users\frank\.conda\envs\py36_cuda9\lib\site-packages\ipykernel_launcher.py:20: UserWarning: nn.init.xavier_uniform is now deprecated in favor of nn.init.xavier_uniform_.
C:\Users\frank\.conda\envs\py36_cuda9\lib\site-packages\ipykernel_launcher.py:25: UserWarning: nn.init.xavier_uniform is now deprecated in favor of nn.init.xavier_uniform_.

...

C:\Users\frank\.conda\envs\py36torch\lib\site-packages\ipykernel_launcher.py:46: UserWarning: nn.init.xavier_uniform is now deprecated in favor of nn.init.xavier_uniform_.
C:\Users\frank\.conda\envs\py36torch\lib\site-packages\ipykernel_launcher.py:51: UserWarning: nn.init.xavier_uniform is now deprecated in favor of nn.init.xavier_uniform_.

Second error:

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-32-7d9371378df5> in <module>
     37 
     38         # run forward pass
---> 39         z_representation = encoder_train(mini_batch_torch) # encode mini-batch data
     40         mini_batch_reconstruction = decoder_train(z_representation) # decode mini-batch data
     41 

~\.conda\envs\py36_cuda9\lib\site-packages\torch\nn\modules\module.py in __call__(self, *input, **kwargs)
    487             result = self._slow_forward(*input, **kwargs)
    488         else:
--> 489             result = self.forward(*input, **kwargs)
    490         for hook in self._forward_hooks.values():
    491             hook_result = hook(self, input, result)

<ipython-input-23-0afc78290eab> in forward(self, x)
     57 
     58         # define forward pass through the network
---> 59         x = self.encoder_R1(self.dropout(self.encoder_L1(x)))
     60         x = self.encoder_R2(self.dropout(self.encoder_L2(x)))
     61         x = self.encoder_R3(self.dropout(self.encoder_L3(x)))

~\.conda\envs\py36_cuda9\lib\site-packages\torch\nn\modules\module.py in __call__(self, *input, **kwargs)
    487             result = self._slow_forward(*input, **kwargs)
    488         else:
--> 489             result = self.forward(*input, **kwargs)
    490         for hook in self._forward_hooks.values():
    491             hook_result = hook(self, input, result)

~\.conda\envs\py36_cuda9\lib\site-packages\torch\nn\modules\linear.py in forward(self, input)
     65     @weak_script_method
     66     def forward(self, input):
---> 67         return F.linear(input, self.weight, self.bias)
     68 
     69     def extra_repr(self):

~\.conda\envs\py36_cuda9\lib\site-packages\torch\nn\functional.py in linear(input, weight, bias)
   1350     if input.dim() == 2 and bias is not None:
   1351         # fused op is marginally faster
-> 1352         ret = torch.addmm(torch.jit._unwrap_optional(bias), input, weight.t())
   1353     else:
   1354         output = input.matmul(weight.t())

RuntimeError: size mismatch, m1: [128 x 384], m2: [618 x 512] at c:\a\w\1\s\tmp_conda_3.6_104352\conda\conda-bld\pytorch_1550400396997\work\aten\src\thc\generic/THCTensorMathBlas.cu:266

Anomalies

Can you perhaps send me a message on [email protected], I would love to ask you something about supporting FirmAI. Thanks, Derek.

Got error when change some data in WAERS BUKRS KTOSL PRCTR BSCHL HKONT fields

I have played around the fraud_dataset_v2.csv dataset. It was successful when I used the original dataset.

However, I tried to change data in some of value in WAERS BUKRS KTOSL PRCTR BSCHL HKONT fields as a new dataset and load trained model. It will throw different number of input data column error message.

I think the issue is caused by less data categories in one of the data fields. When perform one-hot encoding, the newly generated column is less than the original input data used by trained model.

My question:
If we want to evaluate abnormality on a new dataset with the same data fields / columns, is it required to re-train the model?

If no, do you have any (pre-processing) recommendation to fit new input data into trained model? For example, play around with one-hot encoding or other pre-processing approach?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.