Re: [BULK] New plugin: NeuralNetwork.pm

[email protected] Sat, 28 Feb 2026 22:19:26 +0100
Newsgroups gmane.mail.spam.spamassassin.devel
Message-ID <[email protected]>
Howdy,
are you using the same user for the learning process and for the spamassassin(1) call ?
could you send me the output of `sa-learn -D all --ham <msg.eml` ?
  Thanks
   Giovanni

On 2/28/26 8:59 PM, David Birnbaum wrote:
> Howdy.
> 
> I am testing this out to see how it goes.  Early results show it marking a lot of things as Spam that I don’t expect to see…I did notice this as I was training it up:
> 
> Feb 28 13:18:07.029 [169364] dbg: config: read file /etc/mail/spamassassin/*Neu*ralNetwork.pre
> 
> Feb 28 13:18:07.030 [169364] dbg: config: read file /etc/mail/spamassassin/*Neu*ralNetwork.cf
> 
> Feb 28 13:18:07.031 [169364] dbg: config: parsing file /etc/mail/spamassassin/*Neu*ralNetwork.pre
> 
> Feb 28 13:18:07.031 [169364] dbg: config: fixed relative path: /etc/mail/spamassassin/*Neu*ralNetwork.pm
> 
> Feb 28 13:18:07.031 [169364] dbg: plugin: loading Mail::SpamAssassin::Plugin::*Neu*ralNetwork from /etc/mail/spamassassin/*Neu*ralNetwork.pm
> 
> Feb 28 13:18:07.817 [169364] dbg: config: parsing file /etc/mail/spamassassin/*Neu*ralNetwork.cf
> 
> Feb 28 13:18:07.974 [169364] dbg: plugin: Mail::SpamAssassin::Plugin::*Neu*ralNetwork=HASH(0x55631d0005a0) implements 'finish_parsing_end', priority 0
> 
> Feb 28 13:18:07.991 [169364] dbg: *Neu*ralNetwork: SQL connection initialized for vocabulary storage
> 
> Feb 28 13:18:10.212 [169364] dbg: *Neu*ralNetwork: Loaded 748 vocabulary terms from SQL for user: spam
> 
> Feb 28 13:18:10.212 [169364] dbg: *Neu*ralNetwork: Insufficient spam/ham data for prediction: *spam=158, ham=0*
> 
> Feb 28 13:18:10.212 [169364] dbg: *Neu*ralNetwork: Not enough tokens found
> 
> Feb 28 13:18:10.289 [169364] dbg: plugin: Mail::SpamAssassin::Plugin::*Neu*ralNetwork=HASH(0x55631d0005a0) implements 'autolearn', priority 0
> 
> Feb 28 13:18:10.293 [169364] dbg: plugin: Mail::SpamAssassin::Plugin::*Neu*ralNetwork=HASH(0x55631d0005a0) implements 'learn_message', priority 0
> 
> Feb 28 13:18:10.293 [169364] dbg: *Neu*ralNetwork: autolearning disabled, quitting
> 
> 
> Even though I am feeding ham in, it doesn’t seem to be tagging anything as ham (or, at least, the counter is not being set correctly).  I have fed stuff in via sa-learn —ham, as well as through the normal auto-learning process (which I have set to 1).
> 
> I didn’t see any way to get the spam/ham token counts after this message disappears.  Perhaps that could be added to sa-learn —dump magic (or add another option there).
> 
> Any thoughts as to whether or not this is properly loading ham in correctly?  I downloaded it from GitHub today (2/28) so I should have the latest code installed.
> 
> Cheers,
> 
> David.
> 
> ——
> 
>> On Feb 24, 2026, at 7:59 PM, Kent Oyer <[email protected]> wrote:
>>
>> I haven't had time to play with this plugin, but my understanding of this type of NN is that it doesn't work well with incremental training. Meaning that if just one item is added to the training set, the whole learning process needs to be re-run. Otherwise the model adjusts it's weights to match the new sample at the expense of all previous samples. I'm just wondering if you've run into this and if you have any preliminary accuracy statistics from this plugin.
>>
>>
>>
>> On Tue, Dec 30, 2025 at 03:33 AM, Giovanni Bechis <[email protected]> wrote:
>>
>>     ------------------------------------------------------------------------------------------------------------------
>>     CAUTION: External email from: gbechis@‌apache.‌org
>>     Use caution before clicking on links or opening attachments.
>>     ------------------------------------------------------------------------------------------------------------------
>>     Hi,
>>     I've just committed to my Github repo the first version of a SpamAssassin plugin that uses Neural Networks to detect spam messages.
>>     Code is available at https://github.com/bigio/spamassassin-NeuralNetwork <https://github.com/bigio/spamassassin-NeuralNetwork> , if the community is interested I can work on merging it to the Apache SpamAssassin src tree.
>>     Testers are always welcome.
>>     Cheers
>>     Giovanni
>>     -- 
>>     Giovanni Bechis
>>     V.P. Apache SpamAssassin
>>     [email protected] <mailto:[email protected]>
>>
>
OpenPGP_signature.asc (application/pgp-signature, 840 B)
-----BEGIN PGP SIGNATURE-----

wsF5BAABCAAjFiEEqg3TnG6R3qYMxl94+r7qCYlyWOUFAmmjW98FAwAAAAAACgkQ+r7qCYlyWOUf
GxAAmADTuujjGfco0QGkW3hdhRkM0qVToyOMSa0Em1tNYBiD+Xc2OYH6bIqBWIuRTKBQDGdBUeAu
6Dhe2nxC7EmqxrdEL6wd3zeCR7QECusM8Q6c+3fANVJeDj5FVJXR+89xmtOikiHybx4piT6tHDOs
UyjWOml51R0i1HtEMM2X36EwVirtOVFf/zV2z3kghmktMiaSLe29AoiFyQlA8LdJa1oO2crHtd7b
mxPjpz63ONb2+xmVsDE0auvkzskpPGemGulyRh9ehGgsK6ajruLHDBKwh/BOtHN3uttPq58Cj99Y
QtEgch/OKE+kMMQokBdAUN+jUcPagoPdwC9GJuo/MY8FBcssz0nxJV1ucUVcRwmhmeADLomGr7Jc
0jsjRVSBtyEJzn9kOIiKWpJ73XtRq+EZgykhpw+4X1QrqQ8RerydCYgh6AM5jTi9MEu9sGh7U4Dy
r+FqmmGW0EnpCCY0Q+7Sv0QgzJTM/enDh4xQb3/jQE7gwqt4rGkXaz/frUeShRTp0hlEfnWZom6e
ZOuX+RmwWoGxp+R1lfGTgSPmcijx0r3hp1TNpqb/9GNjtqpGENLzFQDRjTDts1MSdQs7lz/L3R0h
06Iffj1zs/R5cIwLLYH1W1ZNNGTmpNIzuBzz5JdL4kUaxWf/8c0wBwmGdimhf6S+gyGaAG1O7Lrr
TyU=
=BH1d
-----END PGP SIGNATURE-----