1. Federated learning paper as relates to keyboard [PDF]: https://arxiv.org/pdf/1812.02903.pdf
2. Federated learning comic: https://federated.withgoogle.com/ (I'm personally not a machine learning expert and I found this pretty informative while being accessible.)
Disclaimer: I am a Google employee, my opinions are my own and I don't claim to speak for my employer.
If you don't trust Google, don't use Google software. A LineageOS installation doesn't come with the GBoard but instead the plain Android softboard which is the same without the fancy features (i.e. lacking Google search, image search, etc.).
https://www.macworld.com/article/3070767/googles-gboard-does...
Obviously GIF suggestion and G searches from GBoard is not private.