Computing structure in brains and machines