In recent years, a certain type of problems have become of interest where one wants to query a trained classifier. Specifically, one wants to find the closest instance to a given input instance such that the classifier's predicted label is changed in a desired way. Examples of these ``inverse classification'' problems are counterfactual explanations, adversarial examples and model inversion. All of them are fundamentally optimization problems over the input instance vector involving a fixed classifier, and it is of interest to achieve a fast solution for interactive or real-time applications. We focus on solving this problem efficiently for two of the most widely used classifiers: logistic regression and softmax classifiers. Owing to special properties of these models, we show that the optimization can be solved in closed form for logistic regression, and iteratively but extremely fast for the softmax classifier. This allows us to solve either case exactly (to nearly machine precision) in a runtime of milliseconds to around a second even for very high-dimensional instances and many classes.
翻译:近年来,一类需要查询已训练分类器的问题引起了广泛关注。具体而言,这类问题要求寻找与给定输入实例最接近的实例,使得分类器预测标签按预期方式改变。这类"逆分类"问题的典型应用包括反事实解释、对抗样本和模型反演。本质上,这些问题都是关于固定分类器在输入实例向量上的优化问题,而如何实现快速求解以满足交互式或实时应用需求具有重要意义。我们聚焦于为两种最常用的分类器——逻辑回归和Softmax分类器——高效解决该问题。基于这些模型的特殊性质,我们证明逻辑回归的优化可通过闭式解完成,而Softmax分类器则可通过迭代但极快的方式求解。这使我们能够在毫秒到约一秒的运行时间内,针对极高维实例和多类别场景,以近乎机器精度的准确度精确求解上述两种情况。