The present invention relates to piperidine and pyrazine derivatives according to formulae (Ia), (Ib) and (II) as autotaxin inhibitors and the use of such compounds for the treatment and/or prophylaxis of physiological and/or pathophysiological conditions, which are caused, mediated and/or propagated by increased lysophosphatic acid levels and/or the activation of autotaxin, in particular of different cancers.