Random walks can reveal communities/clusters in networks, because they are more likely to stay within a cluster than leave it. Thus, one family of community detection algorithms uses random walks to measure distance between nodes, and then applies clustering methods to these distances. Interestingly, information processing in the brain may suggest a simpler method of learning clusters directly from random walks. Drawing inspiration from the hippocampus, a brain structure involved in navigation, we propose a two-layer neural learning framework. Neurons in one layer are associated with graph nodes and are activated by random walks. These activations cause neurons in the second layer to become tuned to graph clusters through simple associative learning. The system can be modelled as Online Spherical K-Means clustering applied in a novel walk-space where all graph nodes are equidistant from each other. In tests on benchmark and real-world graphs, our framework achieved high normalized mutual information scores, executed faster than comparator algorithms, and showed high data efficiency by requiring as few as 6 random walks per graph node. Biological information processing systems are known for high efficiency and adaptability; here, drawing inspiration from the brain has provided a graph clustering method with these properties.