Factor graph binary format, optional fields, querying