Deriving Local Internal Logic for Black Box Models