Encoding Geometric Invariances in Higher-Order Neural Networks