After half a year development, spam protection in Android messages finally started rolling out earlier this month to some users. The feature is yet to be made available to everyone which means the change may be server-side and limited for the meantime. However, we may see a full rollout sometime soon.

Android
When the update gets to any Android phone, a new notifications will pop-up on the device showing the new spam protection. This new “spam protection” feature will also appear in the “Advanced” section of the settings menu (Settings -> Advanced), allowing users to manually activate or deactivate it.

Android
A formerly discovered section of Google’s support help site that went live prematurely, gave an explanation about how the new spam protection feature will function from a privacy perspective. Stating that when this setting feature is enabled, some information about messages that are received on the device will automatically be sent to Google. Howbeit, the content of the message will not be read; such as the phone number or the message body.

Android
How this spam protection feature works is undefined, but possibly it observes the data statistically to examine similarities between spam messages so as to detect them. If you forward a spam report manually to Google it still submits the phone numbers of both the sender and the recipient including the message body. If you are so concerned about privacy implications that might emanate, and having Google to access your Information, you might literally not be needing this feature, presumably using a different app might save you the stress.

(source)