Infer redundant labels automatically based on user declaration