Google has enlisted its in-house machine learning framework, TensorFlow, to help train additional spam filters for Gmail users. With the help of new filters in place, the company claims Gmail is now blocking an extra 100 million spam messages every day. However, rule-based filters can block the most obvious spam, machine learning looks for new patterns that might suggest an email is not to be trusted. Algorithms that are trained in this way can balance a huge number of metrics, everything from the formatting of an email to the time of day it’s sent. TensorFlow, makes managing this data at scale easier, while the open-source nature of the framework means new research from the community can be quickly integrated.
For more information, refer to the following link: https://blog.trendmicro.com/ai-and-machine-learning-boosting-compliance-and-preventing-spam/
Bayesian spam filtering is a standard approach based on Bayesian probability. It's an old technique, so if you want to use it, consider different kinds of heuristic to improve results.