Telling mutualistic and antagonistic ecological networks apart by learning their multiscale structure