Software repositories contain large amounts of textual data, ranging from source code comments and issue descriptions to questions, answers, and comments on Stack Overflow. To make sense of this textual data, topic modelling is frequently used as a text-mining tool for the discovery of hidden semantic structures in text bodies. Latent Dirichlet allocation (LDA) is a commonly used topic model that aims to explain the structure of a corpus by grouping texts. LDA requires multiple parameters to work well, and there are only rough and sometimes conflicting guidelines available on how these parameters should be set. In this paper, we contribute (i) a broad study of parameters to arrive at good local optima for GitHub and Stack Overflow text corpora, (ii) an a-posteriori characterisation of text corpora related to eight programming languages, and (iii) an analysis of corpus feature importance via per-corpus LDA configuration. We find that (1) popular rules of thumb for topic modelling parameter configuration are not applicable to the corpora used in our experiments, (2) corpora sampled from GitHub and Stack Overflow have different characteristics and require different configurations to achieve good model fit, and (3) we can predict good configurations for unseen corpora reliably. These findings support researchers and practitioners in efficiently determining suitable configurations for topic modelling when analysing textual data contained in software repositories.
In recent years, a large amount of model-agnostic methods to improve the transparency, trustability and interpretability of machine learning models have been developed. We introduce local feature importance as a local version of a recent model-agnostic global feature importance method. Based on local feature importance, we propose two visual tools: partial importance (PI) and individual conditional importance (ICI) plots which visualize how changes in a feature affect the model performance on average, as well as for individual observations. Our proposed methods are related to partial dependence (PD) and individual conditional expectation (ICE) plots, but visualize the expected (conditional) feature importance instead of the expected (conditional) prediction. Furthermore, we show that averaging ICI curves across observations yields a PI curve, and integrating the PI curve with respect to the distribution of the considered feature results in the global feature importance. Another contribution of our paper is the Shapley feature importance, which fairly distributes the overall performance of a model among the features according to the marginal contributions and which can be used to compare the feature importance across different models.
Knowledge of the importance of input features towards decisions made by machine-learning models is essential to increase our understanding of both the models and the underlying data. Here, we present a new approach to estimating feature importance with neural networks based on the idea of distributing the features of interest among experts in an attentive mixture of experts (AME). AMEs use attentive gating networks trained with a Granger-causal objective to learn to jointly produce accurate predictions as well as estimates of feature importance in a single model. Our experiments show (i) that the feature importance estimates provided by AMEs compare favourably to those provided by state-of-the-art methods, (ii) that AMEs are significantly faster at estimating feature importance than existing methods, and (iii) that the associations discovered by AMEs are consistent with those reported by domain experts.
Deep neural networks (DNNs) have achieved impressive predictive performance due to their ability to learn complex, non-linear relationships between variables. However, the inability to effectively visualize these relationships has led to DNNs being characterized as black boxes and consequently limited their applications. To ameliorate this problem, we introduce the use of hierarchical interpretations to explain DNN predictions through our proposed method, agglomerative contextual decomposition (ACD). Given a prediction from a trained DNN, ACD produces a hierarchical clustering of the input features, along with the contribution of each cluster to the final prediction. This hierarchy is optimized to identify clusters of features that the DNN learned are predictive. Using examples from Stanford Sentiment Treebank and ImageNet, we show that ACD is effective at diagnosing incorrect predictions and identifying dataset bias. Through human experiments, we demonstrate that ACD enables users both to identify the more accurate of two DNNs and to better trust a DNN's outputs. We also find that ACD's hierarchy is largely robust to adversarial perturbations, implying that it captures fundamental aspects of the input and ignores spurious noise.
머신러닝 모델에서 특징(feature) 기여도를 신뢰성 있게 추정하는 것은 투명성, 알고리즘 공정성 및 규제 준수를 위해 필수적입니다. 순열 특징 중요도(permutation feature importance)가 널리 사용되고 있으나, 전통적인 구현 방식은 반복적인 몬테카를로 셔플링에 의존하므로 상당한 계산 오버헤드와 확률적 불안정성을 초래합니다. 본 논문에서는 $B$개의 무작위 순열을 단 하나의 최대-최소 순위 최적(max-min rank-optimal) 결정론적 순열로 대체함으로써 추정 분산을 제거하고 복잡도를 $O(B \cdot n \cdot p)$에서 $O(n \cdot p)$로 줄이면서도 실제 중요도(ground-truth importance)와의 상관관계를 유지하거나 향상시킬 수 있음을 보여줍니다. 위치-척도(location-scale) 특징 분포 하에서, 오목(concave) 모델 민감도 하에서의 향상된 중요도 추정과 함께 척도 조정된 선형 회귀 계수의 정확한 복원을 정식으로 증명합니다. 우리는 이 결정론적 프레임워크를 두 가지 상호보완적인 차원으로 확장합니다. 첫째, 시스템적 특징 중요도(Systemic Feature Importance, SFI)는 경험적 특징 상관관계를 통합하여 대리 변수를 통한 간접적인 특징 의존성을 정량화합니다. 둘째, 중요도 방향(Importance Direction)은 공변량 변위와 출력 변화 간의 일치도를 측정하여 스칼라 중요도를 부호가 있는 방향성 표현으로 확장합니다. 200개에 가까운 시뮬레이션 시나리오에 걸친 광범위한 실증적 검증(validation)은 고차원 및 낮은 신호 대 잡음비 체계에서 우수한 바이어스-분산 트레이드오프를 입증합니다. 마지막으로, 두 가지 실제 신용 위험 사례 연구를 통해 SFI와 중요도 방향을 결합함으로써 실무자와 규제 기관이 보호 대상 속성에 대한 숨겨진 의존성의 크기와 순 부호를 모두 모델에서 감사(audit)할 수 있음을 보여주며, 모델 거버넌스를 위한 원칙적이고 투명하며 확장 가능한 프레임워크를 제공합니다.
우리는 1차원 위상학적 신호(topological signal)를 통해 데이터 자체로부터 직접 설명을 도출하는 모델-프리(model-free) 특징 중요도 기법인 Ψ-Resilience를 소개한다. 본 방법은 클래스 조건부 밀도(class-conditional density)를 추정하고, 특징 축을 따라 이들의 점별 절대 차이를 계산하여 클래스 불일치 지형(class-disagreement landscape)을 구성한다. 이후, 이 1차원 신호의 0차원 퍼시스턴스(0-dimensional persistence)는 사용자가 설정한 로버스트성 스케일(robustness scale)까지의 교란에도 생존하는 위상적 특징들만을 집계하는 resilience 함수(functional)를 정의한다. 이를 통해 기저의 1차원 지형과 그 퍼시스턴스를 통해 본질적으로 검증 가능한(auditable), 맥락에 강건한(context-robust) 중요도 점수를 얻을 수 있다.
우리는 본 방법을 합성 데이터셋과 실제 데이터셋 모두에서 평가한다. 정답(ground-truth) 중요도가 명시된 합성 생성기(synthetic generator)에서, Ψ-Resilience는 특징의 순위를 높은 충실도로 복원하며, 최대 0.8의 스피어만 순위 상관계수(Spearman rank correlation)를 달성하고 SHAP 및 상호정보량(mutual information)을 포함한 다수의 특징 중요도 기법들과 경쟁력 있는 성능을 보인다. 정답이 알려지지 않은 실제 데이터셋에서는, 본 기법이 이들 방법과 최대 0.9의 상관계수로 일치하는 결과를 보인다. 이러한 결과는 Ψ-Resilience가 예측 모델에 의존하지 않고도 특징 중요도에 대한 엄밀한 분포 수준의 검증을 가능하게 하는 안정적인 설명 기법임을 보여준다.
데이터 처리 불평등 관점에서 RemOve-And-Retrain(ROAR) 벤치마크의 유효성을 분석한 결과, 정보를 추가할 수 없는 후처리가 점수를 향상시킬 수 있어 순위가 모델 정보의 양을 반드시 반영하지 않음을 밝혔다. 또한 이러한 문제는 공간적으로 흐릿한 마스크에 대한 편향과 연관되어 있음을 CIFAR-10 등의 실험을 통해 확인했다.
특징 및 상호작용 중요도(FII) 방법은 복잡한 예측 모델에서 입력 변수와 그 상호작용의 관련성을 평가하기 위해 지도 학습에서 필수적입니다. 개인 맞춤형 의학과 같은 많은 도메인에서는 전반적인 특징 중요도를 요약하는 전역 점수보다는 개별 예측에 대한 국소적 해석이 종종 요구됩니다. 랜덤 포레스트(RF)는 이러한 설정에서 널리 사용되며, 기존의 해석 가능성 방법은 일반적으로 모델 특화 통찰을 제공하기 위해 트리 구조와 분할 통계량을 활용합니다. 그러나 RF에 대한 국소적 FII 방법의 이론적 이해는 여전히 제한적이어서, 개별 예측에 대한 높은 중요도 점수를 해석하는 방법이 불분명합니다. 우리는 의사결정 경로를 따라 특징의 빈번한 동시 발생을 식별하여 전역 패턴과 주어진 테스트 포인트에 특정한 경로에서 관찰된 패턴을 결합하는 새로운 국소적이고 모델 특화적인 FII 방법을 제안합니다. 우리는 우리의 방법이 국소적 스파이크 희소(LSS) 모델 하에서 실제 국소 신호 특징과 그 상호작용을 일관되게 복구하며, 또한 크거나 작은 특징 값이 예측을 주도하는지 여부를 식별한다는 것을 증명합니다. 우리는 시뮬레이션 연구와 실제 데이터 예제를 통해 우리의 방법과 이론적 결과의 유용성을 입증합니다.