def subselect_dict_keys_diff(run_id_param_dicts):
    """Select keys from the param_dicts that actually change between configs."""
    key_vals = {}
    for _, param_dict in run_id_param_dicts:
        for key, val in param_dict.items():
            if key not in key_vals:
                key_vals[key] = []
            key_vals[key].append(val)
    keys_to_keep = [
        key for key, vals in key_vals.items() if len(set(vals)) > 1
    ]
    return [(el[0], {key: el[1][key]
                     for key in keys_to_keep}) for el in run_id_param_dicts]