  Simulated configurations of flexible knotted rings confined inside a
spherical cavity are fed into long-short term memory neural networks (LSTM NNs)
designed to distinguish knot types. The results show that they perform well in
knot recognition even if tested against flexible, strongly confined and
therefore highly geometrically entangled rings. In agreement with the
expectation that knots are delocalized in dense polymers, a suitable
coarse-graining procedure on configurations boosts the performance of the LSTMs
when knot identification is applied to rings much longer than those used for
training. Notably, when the NNs fail, usually the wrong prediction still
belongs to the same topological family of the correct one. The fact that the
LSTMs are able to grasp some basic properties of the ring's topology is
corroborated by a test on knot types not used for training. We also show that
the choice of the NN architecture is important: simpler convolutional NNs do
not perform so well. Finally, all results depend on the features used for
input: surprisingly, coordinates or bond directions of the configurations
provide the best accuracy to the NNs, even if they are not invariant under
rotations (while the knot type is invariant). Other rotational invariant
features we tested are based on distances, angles, and dihedral angles.

Soft Condensed Matter