Per https://github.com/symfony/symfony/issues/3251 the attributes can only be a one dimensional array. That PHP does not throw an error on them is a bug https://github.com/symfony/symfony/issues/7543 (igorw told me to file that as a bug).
The serialization bundle uses a multidimensional array, for now in #1939660-31: Use YAML as the primary means for service registration i have cut it back to a) only support one format per registration b) use format => xml and then we can do more / better here. igorw suggested container parameters to do the tunes of serializer.encoder.xml => XML.