In higher order Fourier analysis, there are d-dimensional parallelopiped structures which can be viewed as a $2^d-1$-ary relation of the form "given all but one vertex of a parallelopiped as input, return the final vertex as output".  (Here "parallelopiped" should be interpreted in a suitably abstract sense, as an operation obeying a certain number of axioms.)  This point of view is taken for instance in [this paper of Camarena and Szegedy][1], building on the  [earlier work of Host and Kra][2].  In the d=2 case, this ternary operation is essentially equivalent to an additive operation once one fixes an origin (in which case the ternary operation becomes $(x,y,z) \mapsto x-y+z$).  For d=3, these operations are governed by 2-step nilpotent groups, and more generally d-dimensional parallelopiped structures are governed by d-1-step nilpotent groups.

These parallelopiped structures share some formal resemblances to cubic complexes, which are constructs that appear mostly in algebraic topology and are discussed for instance [here][3].


  [1]: http://arxiv.org/abs/1009.3825
  [2]: http://arxiv.org/abs/math/0606004
  [3]: http://www.ams.org/mathscinet-getitem?mr=2002612