Learning the dependence structure of rare events: a non-asymptotic study