LLmFPCA-detect: 基于大语言模型的多变量功能主成分分析用于稀疏纵向文本中的异常检测
LLmFPCA-detect: Calibrated Anomaly Detection with Local Evidence in Sparse Longitudinal Texts
AI总结:
LLmFPCA-detect结合大语言模型和功能主成分分析,用于稀疏纵向文本中的异常检测和模式推断,提升预测性能。
摘要:
稀疏纵向(SL)文本数据出现在个体在时间上反复生成文本(例如,客户评论、偶发社交媒体帖子、跨就诊的电子医疗记录)时,但不同个体的观察频率和时间不同。这些复杂的文本数据集有巨大的潜力用于未来政策和针对性推荐。然而,由于SL文本数据缺乏专门的方法,并且具有噪声、异质性和易产生异常的特点,检测和推断关键模式具有挑战性。我们引入LLmFPCA-detect,一个灵活的框架,将基于大语言模型(LLM)的文本嵌入与功能性数据分析相结合,用于检测大规模SL文本数据集中的聚类和推断异常。首先,LLmFPCA-detect使用LLM提示将每段文本嵌入到应用特定的数字空间中。在数字空间中进行的稀疏多变量功能主成分分析(mFPCA)构成了恢复主要人口特征的核心方法,并产生个体水平评分,这些评分与基线静态协变量相结合,有助于数据分割、无监督异常检测和推断,并启用其他下游任务。特别是,我们利用LLM进行动态关键词分析,该分析由LLmFPCA-detect发现的数据段和异常引导,我们展示了LLmFPCA-detect产生的聚类特定功能PC评分,作为现有流程中的特征,有助于提升预测性能。我们通过实验支持LLmFPCA-detect的稳定性,并使用公共数据集,亚马逊客户评论轨迹和维基百科讨论页面评论流,评估其在两个不同应用中的表现,证明了其在不同领域中的实用性,并优于最先进的基线方法。
英文摘要:
It is common to encounter sporadically observed text-valued data on the same individuals, such as clinical notes, social-service case records and customer reviews. There are two inferential tasks in screening such sparse longitudinal texts, detecting subjects whose histories are unusual relative to a reference population and localizing the observed periods that carry the evidence for each detection. When evidence is computed from a fitted reconstruction of the whole history, a localized change can propagate into unchanged periods, so that a correct detection is attributed to the wrong periods. We propose LLmFPCA-detect, which maps each text to a numerical vector with a fixed measurement instrument, such as a large language model (LLM), and applies sparse multivariate functional principal component analysis to the resulting measurements. We score each prespecified window using only observations within that window and calibrate all windows jointly using the maximum window score for each reference subject. Under exchangeability of anomaly-free reference and test subjects, the probability of falsely flagging an anomaly-free subject is at most the nominal level. When only part of a history changes, and the same history without the change is exchangeable with the references, the probability of reporting any unchanged window is bounded by the same level. Both guarantees hold in finite samples without requiring a correctly specified trajectory model. In simulations, the proposed method outperforms competing methods in both power and protection of unchanged periods across nearly all settings, and with text-derived measurements the complete LLM pipeline detects planted changes more often than the sentiment and embedding pipelines. In an application to Amazon customer reviews, we illustrate how reviewers are flagged, how the periods supporting each flag are identified and when we abstain.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。