---
title: NeuralNetwork
url: 'https://docs.danami.com/warden/user-guide/antispam-plugins/neuralnetwork'
markdown: 'https://docs.danami.com/warden/user-guide/antispam-plugins/neuralnetwork.md'
date: '2026-10-02'
description: 'This plugin checks emails using a neural network algorithm for better spam detection using a trained AI model. Prediction and learning require the plugin to have collected enough data, so its accuracy improves as more spam and ham are learned on the server. How it works The plugin builds a vocabula…'
taxonomy:
  category:
    - docs
  tag:
    - neuralnetwork
---

[](#)  [ Basics ](https://docs.danami.com/warden/)     [ User Guide ](https://docs.danami.com/warden/user-guide)     [ Anti-spam Plugins ](https://docs.danami.com/warden/user-guide/antispam-plugins)      NeuralNetwork    

# NeuralNetwork

This plugin checks emails using a neural network algorithm for better spam detection using a trained AI model. Prediction and learning require the plugin to have collected enough data, so its accuracy improves as more spam and ham are learned on the server.

## How it works

The plugin builds a vocabulary from the tokens found in the visible text of messages and creates feature vectors from the words in each email. Only words between the configured minimum and maximum word lengths are considered and terms that appear too infrequently are pruned once the vocabulary cap is reached. A prediction is only made when the message contains enough visible text and enough words that already exist in the vocabulary.

A trained model classifies each message by producing a prediction value. Prediction values above the spam threshold are considered spam and values below the ham threshold are considered ham.

## Learning

The model learns from the spam and ham messages that Warden trains. By default the plugin will only begin predicting once the minimum number of spam and ham messages have been learned. Messages can be learned manually as described under [Training Settings](https://docs.danami.com/warden/settings/antispam/training-settings). When `neuralnetwork_autolearn` is enabled the plugin also learns messages that SpamAssassin declares to be obvious spam or ham during a scan.

## Related Pages

- [NeuralNetwork Settings](https://docs.danami.com/warden/settings/antispam/plugin-settings/neuralnetwork "NeuralNetwork Settings")

 [](https://docs.danami.com/warden/command-line-interface/antispam/antispam-plugin-neuralnetwork)

---

## Navigation

- Parent: [Anti-spam Plugins](https://docs.danami.com/warden/user-guide/antispam-plugins.md)
- Previous: [HashBL](https://docs.danami.com/warden/user-guide/antispam-plugins/hashbl.md)
- Next: [OLEVBMacro](https://docs.danami.com/warden/user-guide/antispam-plugins/olevbmacro.md)
