Reinforcement Learning of Code Search Sessions

被引:5
|
作者
Li, Wei [1 ]
Yan, Shuhan [1 ]
Shen, Beijun [1 ]
Chen, Yuting [1 ]
机构
[1] Shanghai Jiao Tong Univ, Sch Elect Informat & Elect Engn, Shanghai, Peoples R China
关键词
Code search; session search; reinforcement learning; Markov decision process; SOFTWARE;
D O I
10.1109/APSEC48747.2019.00068
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Searching and reusing online code is a common activity in software development. Meanwhile, like many general-purposed searches, code search also faces the session search problem: in a code search session, the user needs to iteratively search for code snippets, exploring new code snippets that meet his/her needs and/or making some results highly ranked. This paper presents Cosoch, a reinforcement learning approach to session search of code documents (code snippets with textual explanations). Cosoch is aimed at generating a session that reveals user intentions, and correspondingly searching and reranking the resulting documents. More specifically, Cosoch casts a code search session into a Markov decision process, in which rewards measuring the relevances between the queries and the resulting code documents guide the whole session search. We have built a dataset, say CosoBe, from StackOverflow, containing 103 code search sessions with 378 pieces of user feedback. We have also evaluated Cosoch on CosoBe. The evaluation results show that Cosoch achieves an average NDCG@3 score of 0.7379, outperforming StackOverflow by 21.3%.
引用
收藏
页码:458 / 465
页数:8
相关论文
共 50 条
  • [1] Enriching query semantics for code search with reinforcement learning
    Wang, Chaozheng
    Nong, Zhenhao
    Gao, Cuiyun
    Li, Zongjie
    Zeng, Jichuan
    Xing, Zhenchang
    Liu, Yang
    NEURAL NETWORKS, 2022, 145 : 22 - 32
  • [2] Description Reinforcement Based Code Search
    Li X.
    Wang Q.-X.
    Jin Z.
    Wang, Qian-Xiang (wqx@pku.edu.cn), 1600, Chinese Academy of Sciences (28): : 1405 - 1417
  • [3] Learning to Personalize for Web Search Sessions
    Aloteibi, Saad
    Clark, Stephen
    CIKM '20: PROCEEDINGS OF THE 29TH ACM INTERNATIONAL CONFERENCE ON INFORMATION & KNOWLEDGE MANAGEMENT, 2020, : 15 - 24
  • [4] CoaCor: Code Annotation for Code Retrieval with Reinforcement Learning
    Yao, Ziyu
    Peddamail, Jayavardhan Reddy
    Sun, Huan
    WEB CONFERENCE 2019: PROCEEDINGS OF THE WORLD WIDE WEB CONFERENCE (WWW 2019), 2019, : 2203 - 2214
  • [5] On the Search for Feedback in Reinforcement Learning
    Wang, Ran
    Parunandi, Karthikeya S.
    Sharma, Aayushman
    Goyal, Raman
    Chakravorty, Suman
    2021 60TH IEEE CONFERENCE ON DECISION AND CONTROL (CDC), 2021, : 1560 - 1567
  • [6] Localizing search in reinforcement learning
    Grudic, G
    Ungar, L
    SEVENTEENTH NATIONAL CONFERENCE ON ARTIFICIAL INTELLIGENCE (AAAI-2001) / TWELFTH INNOVATIVE APPLICATIONS OF ARTIFICIAL INTELLIGENCE CONFERENCE (IAAI-2000), 2000, : 590 - 595
  • [7] A learning search algorithm with propagational reinforcement learning
    Zhang, Wei
    APPLIED INTELLIGENCE, 2021, 51 (11) : 7990 - 8009
  • [8] A learning search algorithm with propagational reinforcement learning
    Wei Zhang
    Applied Intelligence, 2021, 51 : 7990 - 8009
  • [9] Learning to rank code examples for code search engines
    Haoran Niu
    Iman Keivanloo
    Ying Zou
    Empirical Software Engineering, 2017, 22 : 259 - 291
  • [10] Learning to rank code examples for code search engines
    Niu, Haoran
    Keivanloo, Iman
    Zou, Ying
    EMPIRICAL SOFTWARE ENGINEERING, 2017, 22 (01) : 259 - 291