Self-testing, a correlation-based protocol, enables certification of both the quantum state and measurements without requiring knowledge of the internal workings of the device. While well studied in bipartite Bell scenarios, its extension to the multipartite regime remains limited due to the complex structure of multipartite correlations. In this work, we derive the optimal quantum bound of the m-partite Svetlichny inequality by finding suitable sum-of-squares decomposition, without assuming any fixed Hilbert space dimension. This enables us to self-test both the m-partite Greenberger-Horne-Zeilinger state and the local anticommuting observables (up to local unitaries and complex conjugation). Applying the self-testing relations obtained from the sum-of-squares decompositions in a swap circuit framework, we can assess the closeness of the reference states and measurements to their ideal counterparts in the presence of noise and imperfections, thereby demonstrating the robustness of our protocol. Our analysis additionally enables certified randomness generation from correlations achieving the optimal Svetlichny violation.
Singh et al. (Tue,) studied this question.