Jointly learning relevant subgraph patterns and nonlinear models of their indicators