Let V be an n-dimensional vector space, and let O n be the orthogonal group. Motivated by a question of B. Szegedy (J. Am. Math. Soc. 20(4), 2007), about the rank of edge connection matrices of partition functions of vertex models, we give a combinatorial parameterization of tensors in V ¿k invariant under certain subgroups of the orthogonal group. This allows us to give an answer to this question for vertex models with values in an algebraically closed field of characteristic zero. Keywords: Edge connection matrix; Graph invariant; Partition function; Orthogonal group; Tensor invariants; Vertex mode