It is also not a derivative work, as it is not recognizable as any of the works it was trained on.
However, if the output it produces is close enough to existing copyrighted works, than that output cannot be used without a license.
That seems fair, and just like how we would judge a human being.