ExploreToM
收藏Explore Theory-of-Mind: Program-Guided Adversarial Data Generation for Theory of Mind Reasoning
数据集概述
ExploreToM 是一个用于大规模生成多样化和具有挑战性的心智理论(Theory of Mind)数据的框架。该框架通过自定义领域特定语言(DSL)和 A* 搜索算法生成复杂的故事结构和多样化的场景,旨在对大型语言模型(LLMs)进行鲁棒训练和评估。
数据生成流程
-
生成故事上下文
python story_context_generator.py --num_elements_by_class 6 --num_contexts_to_generate 100
-
运行 A 搜索*
for i in
seq 0 7; do python story_structure_searcher.py --experiment_to_run search --model_name meta-llama/Meta-Llama-3.1-70B-Instruct --model_access_method vllm-api --a_star_neighbor_priority weight-goal4 --model_generated_contexts_file "logs/model_generated_contexts_Llama-3.1-70B-Instruct_n_100_p_6_m_6_r_2_update_object_state_equiv_class_for_v1_dsl_wo_upsampling.jsonl" --i $i & done -
填充生成故事
for i in
seq 0 7; do python story_structure_infiller.py --i $i & done for i inseq 0 7; do python story_structure_infiller.py --i $i --generate_fantom_like_data & done # 可选,生成更长的上下文数据
其他资源
统计信息
运行以下命令以获取关于 TrackTheMind 的统计信息:
for i in seq 0 7 ; do python story_structure_searcher.py
--experiment_to_run baseline
--model_name meta-llama/Meta-Llama-3.1-70B-Instruct
--model_access_method vllm-api
--model_generated_contexts_file "logs/model_generated_contexts_Llama-3.1-70B-Instruct_n_100_p_6_m_6_r_2_update_object_state_equiv_class_for_v1_dsl_wo_upsampling.jsonl"
--i $i & done
python compute_statistics.py --evaluate_cross_model_generations --model_name gpt-4o --model_access_method openai-azure-api
python compute_statistics.py --evaluate_cross_model_generations --model_name mistralai/Mixtral-8x7B-Instruct-v0.1 --model_access_method vllm-python
python compute_statistics.py --evaluate_cross_model_generations --model_name meta-llama/Meta-Llama-3.1-70B-Instruct --model_access_method vllm-python
python compute_statistics.py --evaluate_cross_model_generations
python compute_statistics.py
功能测试
python tests_belief_tracker.py python tests_story_structure_infiller.py
引用
如果该数据集对你有帮助,请考虑引用:
@inproceedings{ exploretom2024, title={ExploreToM: program-guided adversarial data generation for theory of mind reasoning}, author={Sclar, Melanie and Dwivedi-Yu, Jane and Fazel-Zarandi, Maryam and Tsvetkov, Yulia and Bisk, Yonatan and Choi, Yejin and Celikyilmaz, Asli}, year={2024}, note={under review} }
许可
请参阅 LICENSE 文件以获取许可详情。




