This paper explores how natural-language descriptions of formal languages can be compared to their formal representations and how semantic differences can be explained. This is motivated from educational scenarios where learners describe a formal language (presented, e.g., by a finite state automaton, regular expression, pushdown automaton, context-free grammar or in set notation) in natural language, and an educational support system has to (1) judge whether the natural-language description accurately describes the formal language, and to (2) provide explanations why descriptions are not accurate. To address this question, we introduce a representation language for formal languages, Nile, which is designed so that Nile expressions can mirror the syntactic structure of natural-language descriptions of formal languages. Nile is sufficiently expressive to cover a broad variety of formal languages, including all regular languages and fragments of context-free languages typically used in educational contexts. Generating Nile expressions that are syntactically close to natural-language descriptions then allows to provide explanations for inaccuracies in the descriptions algorithmically. In experiments on an educational data set, we show that LLMs can translate natural-language descriptions into equivalent, syntactically close Nile expressions with high accuracy - allowing to algorithmically provide explanations for incorrect natural-language descriptions. Our experiments also show that while natural-language descriptions can also be translated into regular expressions (but not context-free grammars), the expressions are often not syntactically close and thus not suitable for providing explanations.


翻译:本文探讨了如何将形式化语言的自然语言描述与其形式化表示进行比较,以及如何解释语义差异。这一研究动机源于教育场景:学习者用自然语言描述一个形式化语言(例如通过有限状态自动机、正则表达式、下推自动机、上下文无关文法或集合表示法呈现),而教育支持系统需要(1)判断自然语言描述是否准确描述了该形式化语言,并(2)对描述不准确的原因提供解释。为应对这一问题,我们引入了一种形式化语言的表示语言Nile,其设计使得Nile表达式能够反映形式化语言自然语言描述的句法结构。Nile具有足够的表达能力,可覆盖广泛的形式化语言,包括所有正则语言以及教育场景中常用的上下文无关语言片段。通过生成句法上接近自然语言描述的Nile表达式,即可算法化地为描述中的不准确之处提供解释。在教育数据集上的实验表明,大语言模型能够以高准确率将自然语言描述翻译为句法结构相近的等效Nile表达式——这使得算法化解释不正确的自然语言描述成为可能。我们的实验同时揭示:虽然自然语言描述也能被翻译为正则表达式(但无法翻译为上下文无关文法),但这些表达式往往在句法上并不接近,因而不适用于提供解释。

0
下载
关闭预览

相关内容

【博士论文】基于知识的自然语言理解与生成,230页pdf
专知会员服务
41+阅读 · 2024年4月1日
【CMU博士论文】语言理解与生成优化技术,145页pdf
专知会员服务
36+阅读 · 2023年11月22日
专知会员服务
65+阅读 · 2021年5月29日
【干货书】面向机器学习的自然语言标注,341页pdf
专知会员服务
68+阅读 · 2021年2月7日
【新书】自然语言处理表示学习技术,349页pdf,清华大学
专知会员服务
174+阅读 · 2020年7月11日
自然语言生成资源列表
专知
17+阅读 · 2020年1月4日
什么是自然语言理解(NLU)?及2019最新进展
产品100干货速递
17+阅读 · 2019年7月18日
一文看懂自然语言理解(NLU)
AINLP
26+阅读 · 2019年4月27日
学会原创 | 自然语言的语义表示学习方法与应用
中国人工智能学会
11+阅读 · 2019年3月7日
从语言学到深度学习NLP,一文概述自然语言处理
人工智能学家
13+阅读 · 2018年1月28日
Natural 自然语言处理(NLP)「全解析」
人工智能学家
14+阅读 · 2017年9月23日
NLP(自然语言处理)扫盲
大数据和云计算技术
20+阅读 · 2017年7月9日
自然语言处理 (三) 之 word embedding
DeepLearning中文论坛
19+阅读 · 2015年8月3日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 2月16日
VIP会员
最新内容
(译文)认知战:以士兵为目标,塑造战略
专知会员服务
0+阅读 · 今天3:12
(中文)认知战的本体论基础(2026报告)
专知会员服务
7+阅读 · 今天1:45
美空军条令(2026):外国对内防御
专知会员服务
2+阅读 · 今天1:32
美国与以色列如何在攻击伊朗中使用人工智能
专知会员服务
7+阅读 · 4月16日
《自动化战略情报管控》
专知会员服务
3+阅读 · 4月16日
得失评估:审视对伊朗战争的轨迹(简报)
专知会员服务
3+阅读 · 4月16日
【CMU博士论文】迈向可解释机器学习的理论基础
相关资讯
自然语言生成资源列表
专知
17+阅读 · 2020年1月4日
什么是自然语言理解(NLU)?及2019最新进展
产品100干货速递
17+阅读 · 2019年7月18日
一文看懂自然语言理解(NLU)
AINLP
26+阅读 · 2019年4月27日
学会原创 | 自然语言的语义表示学习方法与应用
中国人工智能学会
11+阅读 · 2019年3月7日
从语言学到深度学习NLP,一文概述自然语言处理
人工智能学家
13+阅读 · 2018年1月28日
Natural 自然语言处理(NLP)「全解析」
人工智能学家
14+阅读 · 2017年9月23日
NLP(自然语言处理)扫盲
大数据和云计算技术
20+阅读 · 2017年7月9日
自然语言处理 (三) 之 word embedding
DeepLearning中文论坛
19+阅读 · 2015年8月3日
相关基金
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
8+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员