Graph-based learning