Hallucinations can be produced by conversational AI systems, particularly in multi-turn conversations where context changes and contradictions may eventually surface. By representing the entire conversation as a temporal graph, we present a novel graph-based method for detecting dialogue-level hallucinations. Our framework models each dialogue as a node, encoding it using a sentence transformer. We explore two different ways of connectivity: i) shared-entity edges, which connect turns that refer to the same entities; ii) temporal edges, which connect contiguous turns in the conversation. Message-passing is used to update the node embeddings, allowing flow of information between related nodes. The context-aware node embeddings are then combined using attention pooling into a single vector, which is then passed on to a classifier to determine the presence and type of hallucinations. We demonstrate that our method offers slightly improved performance over existing methods. Further, we show the attention mechanism can be used to justify the decision making process. The code and model weights are made available at: https://github.com/sambuaneesh/anlp-project.
翻译:对话式人工智能系统可能产生幻觉,这种现象在多轮对话中尤为突出,因为上下文的变化和矛盾最终可能显现。通过将整个对话表示为时序图,我们提出了一种新颖的基于图的对话级幻觉检测方法。我们的框架将每个对话轮次建模为一个节点,并使用句子Transformer对其进行编码。我们探索了两种不同的连接方式:i) 共享实体边,连接引用相同实体的对话轮次;ii) 时序边,连接对话中连续的轮次。通过使用消息传递来更新节点嵌入,允许相关信息在关联节点间流动。随后,通过注意力池化将这些上下文感知的节点嵌入组合成一个单一向量,该向量再传递给分类器以判断幻觉的存在及其类型。我们证明,与现有方法相比,我们的方法提供了略微提升的性能。此外,我们还展示了注意力机制可用于解释决策过程。代码和模型权重发布于:https://github.com/sambuaneesh/anlp-project。