[Rspamd-Users] Getting the neural module to work

Johannes Rohr johannes at rohr.org
Thu Mar 26 11:11:58 UTC 2020

   Dear all,

   for several days now I have been trying to get the neural module to
   work, primarily to reduce the amount of false positives, which is still
   considerable, unfortunately.

   Following the instructions at
   [1]https://rspamd.com/doc/modules/neural.html I created a
   /etc/rspamd/local.d/neural.conf with the content
servers =; # Redis server to store learning data and ANN
enabled = true;

train {
  max_train = 1k; # Number ham/spam samples needed to start train
  max_usages = 100; # Number of learn iterations while ANN data is valid
  learncccvcing_rate = 0.01; # Rate of learning
  max_iterations = 25; # Maximum iterations of learning (better preciseness but
also lower speed of learning)

ann_expire = 7d; # I have a rather small system

   When the number of sample is below the "max_train" threshold, I see the
   following log messages:
2020-03-26 11:51:39 #9912(normal) <665976>; lua; neural.lua:475: cannot learn ha
m ANN default:default; redis_key: rn_default_default_3b
b4kyp6_0: sampled out with probability 0.42405063291139 (473 vectors stored)

   When I decrease max_train to ensure that I am above the threshold I get
   the following message instead:
2020-03-26 12:05:39 #23999(normal) <31d3f8>; lua; neural.lua:475: cannot learn h
am ANN default:default; redis_key: rn_default_default_3bb4kyp6_0: too many ham s
amples (475 vectors stored)

   So it seems it is either too few or too many.

   What am I missing? The documentation is a quick read, so I can't spot
   anything that I may have overlooked?

   I would greatly appreciate any hints!!




   1. https://rspamd.com/doc/modules/neural.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.rspamd.com/pipermail/users/attachments/20200326/f92dffb0/attachment.bin>

More information about the Users mailing list