Topological Gradient-based Competitive Learning