Structure vs. randomness for bilinear maps