Determinantal Point Process Attention Over Grid Codes Supports Out of Distribution Generalization