kth.sePublications KTH
Change search
Link to record
Permanent link

Direct link
Publications (10 of 12) Show all publications
Ye, H. & Monperrus, M. (2024). ITER: Iterative Neural Repair for Multi-Location Patches. In: ICSE 2024 - Proceedings of the 46th IEEE/ACM International Conference on Software Engineering: . Paper presented at 46th IEEE/ACM International Conference on Software Engineering, ICSE 2024, Lisbon, Portugal, Apr 14 2024 - Apr 20 2024. Association for Computing Machinery (ACM)
Open this publication in new window or tab >>ITER: Iterative Neural Repair for Multi-Location Patches
2024 (English)In: ICSE 2024 - Proceedings of the 46th IEEE/ACM International Conference on Software Engineering, Association for Computing Machinery (ACM) , 2024Conference paper, Published paper (Refereed)
Abstract [en]

Automated program repair (APR) has achieved promising results, especially using neural networks. Yet, the overwhelming majority of patches produced by APR tools are confined to one single location. When looking at the patches produced with neural repair, most of them fail to compile, while a few uncompilable ones go in the right direction. In both cases, the fundamental problem is to ignore the potential of partial patches. In this paper, we propose an iterative program repair paradigm called ITER founded on the concept of improving partial patches until they become plausible and correct. First, ITER iteratively improves partial single-location patches by fixing compilation errors and further refining the previously generated code. Second, ITER iteratively improves partial patches to construct multi-location patches, with fault localization re-execution. ITER is implemented for Java based on battle-proven deep neural networks and code representation. ITER is evaluated on 476 bugs from 10 open-source projects in Defects4J 2.0. ITER succeeds in repairing 15.5% of them, including 9 uniquely repaired multi-location bugs.

Place, publisher, year, edition, pages
Association for Computing Machinery (ACM), 2024
National Category
Computer Sciences
Identifiers
urn:nbn:se:kth:diva-344024 (URN)10.1145/3597503.3623337 (DOI)2-s2.0-85185535944 (Scopus ID)
Conference
46th IEEE/ACM International Conference on Software Engineering, ICSE 2024, Lisbon, Portugal, Apr 14 2024 - Apr 20 2024
Funder
Wallenberg AI, Autonomous Systems and Software Program (WASP)
Note

Part of proceedings ISBN 9798400702174

QC 20240305

Available from: 2024-02-28 Created: 2024-02-28 Last updated: 2024-07-01Bibliographically approved
Zhong, W., Guo, L., Gao, Q., Ye, H. & Wang, Y. (2024). MemoryBank: Enhancing Large Language Models with Long -Term Memory. In: Wooldridge, M Dy, J Natarajan, S (Ed.), THIRTY-EIGHTH AAAI CONFERENCE ON ARTIFICIAL INTELLIGENCE, VOL 38 NO 17: . Paper presented at 38th AAAI Conference on Artificial Intelligence (AAAI) / 36th Conference on Innovative Applications of Artificial Intelligence / 14th Symposium on Educational Advances in Artificial Intelligence, FEB 20-27, 2024, Vancouver, CANADA (pp. 19724-19731). ASSOC ADVANCEMENT ARTIFICIAL INTELLIGENCE
Open this publication in new window or tab >>MemoryBank: Enhancing Large Language Models with Long -Term Memory
Show others...
2024 (English)In: THIRTY-EIGHTH AAAI CONFERENCE ON ARTIFICIAL INTELLIGENCE, VOL 38 NO 17 / [ed] Wooldridge, M Dy, J Natarajan, S, ASSOC ADVANCEMENT ARTIFICIAL INTELLIGENCE , 2024, p. 19724-19731Conference paper, Published paper (Refereed)
Abstract [en]

Large Language Models (LLMs) have drastically reshaped our interactions with artificial intelligence (AI) systems, showcasing impressive performance across an extensive array of tasks. Despite this, a notable hindrance remains the deficiency of a long-term memory mechanism within these models. This shortfall becomes increasingly evident in situations demanding sustained interaction, such as personal companion systems, psychological counseling, and secretarial assistance. Recognizing the necessity for long-term memory, we propose MemoryBank, a novel memory mechanism tailored for LLMs. MemoryBank enables the models to summon relevant memories, continually evolve through continuous memory updates, comprehend, and adapt to a user's personality over time by synthesizing information from previous interactions. To mimic anthropomorphic behaviors and selectively preserve memory, MemoryBank incorporates a memory updating mechanism, inspired by the Ebbinghaus Forgetting Curve theory. This mechanism permits the AI to forget and reinforce memory based on time elapsed and the relative significance of the memory, thereby offering a more human -like memory mechanism and enriched user experience. Memory Bank is versatile in accommodating both closed-source models like ChatGPT and open -source models such as ChatGLM. To validate MemoryBank's effectiveness, we exemplify its application through the creation of an LLM-based chatbot named SiliconFriend in a long-term AI Companion scenario. Further tuned with psychological dialog data, SiliconFriend displays heightened empathy and discernment in its interactions. Experiment involves both qualitative analysis with real world user dialogs and quantitative analysis with simulated dialogs. In the latter, ChatGPT acts as multiple users with diverse characteristics and generates long-term dialog contexts covering a wide array of topics. The results of our analysis reveal that SiliconFriend, equipped with MemoryBank, exhibits a strong capability for long-term companionship as it can provide emphatic response, recall relevant memories and understand user personality.

Place, publisher, year, edition, pages
ASSOC ADVANCEMENT ARTIFICIAL INTELLIGENCE, 2024
Series
AAAI Conference on Artificial Intelligence, ISSN 2159-5399
National Category
Psychology
Identifiers
urn:nbn:se:kth:diva-352544 (URN)001239407300136 ()
Conference
38th AAAI Conference on Artificial Intelligence (AAAI) / 36th Conference on Innovative Applications of Artificial Intelligence / 14th Symposium on Educational Advances in Artificial Intelligence, FEB 20-27, 2024, Vancouver, CANADA
Note

QC 20240903

Available from: 2024-09-03 Created: 2024-09-03 Last updated: 2024-09-03Bibliographically approved
Zhong, W., Guo, L., Gao, Q., Ye, H. & Wang, Y. (2024). MemoryBank: Enhancing Large Language Models with Long-Term Memory. In: Proceedings Of The Aaai Conference On Artificial Intelligence: . Paper presented at 38th AAAI Conference on Artificial Intelligence, AAAI 2024, Feb 20-27 2024 Vancouver, Canada (pp. 19724-19731). Association for the Advancement of Artificial Intelligence (AAAI), 38
Open this publication in new window or tab >>MemoryBank: Enhancing Large Language Models with Long-Term Memory
Show others...
2024 (English)In: Proceedings Of The Aaai Conference On Artificial Intelligence, Association for the Advancement of Artificial Intelligence (AAAI) , 2024, Vol. 38, p. 19724-19731Conference paper, Published paper (Refereed)
Abstract [en]

Large Language Models (LLMs) have drastically reshaped our interactions with artificial intelligence (AI) systems, showcasing impressive performance across an extensive array of tasks. Despite this, a notable hindrance remains—the deficiency of a long-term memory mechanism within these models. This shortfall becomes increasingly evident in situations demanding sustained interaction, such as personal companion systems, psychological counseling, and secretarial assistance. Recognizing the necessity for long-term memory, we propose MemoryBank, a novel memory mechanism tailored for LLMs. MemoryBank enables the models to summon relevant memories, continually evolve through continuous memory updates, comprehend, and adapt to a user’s personality over time by synthesizing information from previous interactions. To mimic anthropomorphic behaviors and selectively preserve memory, MemoryBank incorporates a memory updating mechanism, inspired by the Ebbinghaus Forgetting Curve theory. This mechanism permits the AI to forget and reinforce memory based on time elapsed and the relative significance of the memory, thereby offering a more human-like memory mechanism and enriched user experience. MemoryBank is versatile in accommodating both closed-source models like ChatGPT and open-source models such as ChatGLM. To validate MemoryBank’s effectiveness, we exemplify its application through the creation of an LLM-based chatbot named SiliconFriend in a long-term AI Companion scenario. Further tuned with psychological dialog data, SiliconFriend displays heightened empathy and discernment in its interactions. Experiment involves both qualitative analysis with real-world user dialogs and quantitative analysis with simulated dialogs. In the latter, ChatGPT acts as multiple users with diverse characteristics and generates long-term dialog contexts covering a wide array of topics. The results of our analysis reveal that SiliconFriend, equipped with MemoryBank, exhibits a strong capability for long-term companionship as it can provide emphatic response, recall relevant memories and understand user personality.

Place, publisher, year, edition, pages
Association for the Advancement of Artificial Intelligence (AAAI), 2024
Series
Proceedings of the AAAI Conference on Artificial Intelligence, ISSN 2159-5399
National Category
Computer Sciences Psychology
Identifiers
urn:nbn:se:kth:diva-345727 (URN)10.1609/aaai.v38i17.29946 (DOI)2-s2.0-85189642631 (Scopus ID)
Conference
38th AAAI Conference on Artificial Intelligence, AAAI 2024, Feb 20-27 2024 Vancouver, Canada
Note

Part of proceedings ISBN: 978-1-57735-887-9

QC 20240424

Available from: 2024-04-18 Created: 2024-04-18 Last updated: 2024-04-24Bibliographically approved
Zhao, K., Li, Z., Li, J., Ye, H., Luo, X. & Chen, T. (2023). DeepInfer: Deep Type Inference from Smart Contract Bytecode. In: Chandra, S Blincoe, K Tonella, P (Ed.), Proceedings Of The 31St Acm Joint Meeting European Software Engineering Conference And Symposium On The Foundations Of Software Engineering, Esec/Fse 2023: . Paper presented at 31st ACM Joint Meeting of the European Software Engineering Conference / Symposium on the Foundations-of-Software-Engineering (ESEC/FSE), DEC 03-09, 2023, San Francisco, CA (pp. 745-757). Association for Computing Machinery (ACM)
Open this publication in new window or tab >>DeepInfer: Deep Type Inference from Smart Contract Bytecode
Show others...
2023 (English)In: Proceedings Of The 31St Acm Joint Meeting European Software Engineering Conference And Symposium On The Foundations Of Software Engineering, Esec/Fse 2023 / [ed] Chandra, S Blincoe, K Tonella, P, Association for Computing Machinery (ACM) , 2023, p. 745-757Conference paper, Published paper (Refereed)
Abstract [en]

Smart contracts play an increasingly important role in Ethereum platform. It provides various functions implementing numerous services, whose bytecode runs on Ethereum Virtual Machine. To use services by invoking corresponding functions, the callers need to know the function signatures. Moreover, such signatures provide crucial information for many downstream applications, e.g., identifying smart contracts, fuzzing, detecting vulnerabilities, etc. However, it is challenging to infer function signatures from the bytecode due to a lack of type information. Existing work solving this problem depended heavily on limited databases or hardcoded heuristic patterns. However, these approaches are hard to be adapted to semantic differences in distinct languages and various compiler versions when developing smart contracts. In this paper, we propose a novel framework DeepInfer that first leverages deep learning techniques to automatically infer function signatures and returns. The novelties of DeepInfer are: 1) DeepInfer lifts the byte-code into the Intermediate Representation (IR) to preserve code semantics; 2) DeepInfer extracts the type-related knowledge (e.g., critical data flows, constant values, and control flow graphs) from the IR to recover function signatures and returns. We conduct experiments on Solidity and Vyper smart contracts and the results show that DeepInfer performs faster and more accurate than existing tools, while being immune to changes in different languages and various compiler versions.

Place, publisher, year, edition, pages
Association for Computing Machinery (ACM), 2023
Keywords
Smart Contract, Type Inference, Deep Learning
National Category
Computer Sciences
Identifiers
urn:nbn:se:kth:diva-343617 (URN)10.1145/3611643.3616343 (DOI)001148157800061 ()2-s2.0-85179840189 (Scopus ID)
Conference
31st ACM Joint Meeting of the European Software Engineering Conference / Symposium on the Foundations-of-Software-Engineering (ESEC/FSE), DEC 03-09, 2023, San Francisco, CA
Note

Part of ISBN: 979-8-4007-0327-0

QC 20240223

Available from: 2024-02-23 Created: 2024-02-23 Last updated: 2024-02-26Bibliographically approved
Ye, H., Martinez, M., Luo, X., Zhang, T. & Monperrus, M. (2023). SelfAPR: Self-Supervised Program Repair with Test Execution Diagnostics. In: Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering: . Paper presented at the 37th IEEE/ACM International Conference on Automated Software Engineering. Association for Computing Machinery (ACM)
Open this publication in new window or tab >>SelfAPR: Self-Supervised Program Repair with Test Execution Diagnostics
Show others...
2023 (English)In: Proceedings of the 37th IEEE/ACM International Conference on Automated Software Engineering, Association for Computing Machinery (ACM) , 2023Conference paper, Published paper (Refereed)
Abstract [en]

Learning-based program repair has achieved good results in a recent series of papers. Yet, we observe that the related work fails to repair some bugs because of a lack of knowledge about 1) the application domain of the program being repaired, and 2) the fault type being repaired. In this paper, we solve both problems by changing the learning paradigm from supervised training to self-supervised training in an approach called SelfAPR. First, SelfAPR generates training samples on disk by perturbing a previous version of the program being repaired, enforcing the neural model to capture project-specific knowledge. This is different from the previous work based on mined past commits. Second, SelfAPR executes all training samples and extracts and encodes test execution diagnostics into the input representation, steering the neural model to fix the kind of fault. This is different from the existing studies that only consider static source code as input. We implement SelfAPR and evaluate it in a systematic manner. We generate 1 039 873 training samples obtained by perturbing 17 open-source projects. We evaluate SelfAPR on 818 bugs from Defects4J, SelfAPR correctly repairs 110 of them, outperforming all the supervised learning repair approaches.

Place, publisher, year, edition, pages
Association for Computing Machinery (ACM), 2023
Series
ASE ’22
National Category
Computer Sciences
Identifiers
urn:nbn:se:kth:diva-323660 (URN)10.1145/3551349.3556926 (DOI)001062775200034 ()2-s2.0-85146336362 (Scopus ID)
Conference
the 37th IEEE/ACM International Conference on Automated Software Engineering
Funder
Wallenberg AI, Autonomous Systems and Software Program (WASP)
Note

QC 20230214

Available from: 2023-02-08 Created: 2023-02-08 Last updated: 2025-12-05Bibliographically approved
Ye, H., Gu, J., Martinez, M., Durieux, T. & Monperrus, M. (2022). Automated Classification of Overfitting Patches with Statically Extracted Code Features. IEEE Transactions on Software Engineering, 48(8), 2920-2938
Open this publication in new window or tab >>Automated Classification of Overfitting Patches with Statically Extracted Code Features
Show others...
2022 (English)In: IEEE Transactions on Software Engineering, ISSN 0098-5589, E-ISSN 1939-3520, Vol. 48, no 8, p. 2920-2938Article in journal (Refereed) Published
Abstract [en]

Automatic program repair (APR) aims to reduce the cost of manually fixing software defects. However, APR suffers from generating a multitude of overfitting patches, those patches that fail to correctly repair the defect beyond making the tests pass. This paper presents a novel overfitting patch detection system called ODS to assess the correctness of APR patches. ODS first statically compares a patched program and a buggy program in order to extract code features at the abstract syntax tree (AST) level. Then, ODS uses supervised learning with the captured code features and patch correctness labels to automatically learn a probabilistic model. The learned ODS model can then finally be applied to classify new and unseen program repair patches. We conduct a large-scale experiment to evaluate the effectiveness of ODS on patch correctness classification based on 10,302 patches from Defects4J, Bugs.jar and Bears benchmarks. The empirical evaluation shows that ODS is able to correctly classify 71.9% of program repair patches from 26 projects, which improves the state-of-the-art. ODS is applicable in practice and can be employed as a post-processing procedure to classify the patches generated by different APR systems. 

Place, publisher, year, edition, pages
Institute of Electrical and Electronics Engineers Inc., 2022
Keywords
Automatic program repair, Code features, Feature extraction, Maintenance engineering, Overfitting patch, Patch assessment, Predictive models, Software, Syntactics, Tools, Training
National Category
Computer Sciences Software Engineering Computer Systems
Identifiers
urn:nbn:se:kth:diva-308879 (URN)10.1109/TSE.2021.3071750 (DOI)000846878500013 ()2-s2.0-85104193931 (Scopus ID)
Funder
Swedish Foundation for Strategic Research, TrustfullWallenberg AI, Autonomous Systems and Software Program (WASP)
Note

QC 20220216

Available from: 2022-02-16 Created: 2022-02-16 Last updated: 2023-02-08Bibliographically approved
Ye, H., Martinez, M. & Monperrus, M. (2022). Neural Program Repair with Execution-based Backpropagation. In: ICSE '22: Proceedings of the 44th International Conference on Software Engineering: . Paper presented at 44th ACM/IEEE International Conference on Software Engineering, ICSE 2022, Pittsburgh, 22 May 2022, through 27 May 2022 (pp. 1506-1518). Association for Computing Machinery (ACM)
Open this publication in new window or tab >>Neural Program Repair with Execution-based Backpropagation
2022 (English)In: ICSE '22: Proceedings of the 44th International Conference on Software Engineering, Association for Computing Machinery (ACM) , 2022, p. 1506-1518Conference paper, Published paper (Refereed)
Abstract [en]

Neural machine translation (NMT) architectures have achieved promising results for automatic program repair. Yet, they have the limitation of generating low-quality patches (e.g., not compilable patches). This is because the existing works only optimize a purely syntactic loss function based on characters and tokens without incorporating program-specific information during neural network weight optimization. In this paper, we propose a novel program repair model called RewardRepair. The core novelty of RewardRepair is to improve NMT-based program repair with a loss function based on program compilation and test execution information, rewarding the network to produce patches that compile and that do not overfit. We conduct several experiments to evaluate RewardRepair showing that it is feasible and effective to use compilation and test execution results to optimize the underlying neural repair model. RewardRepair correctly repairs 207 bugs over four benchmarks. we report on repair success for 121 bugs that are fixed for the first time in the literature. Also, RewardRepair produces up to 45.3% of compilable patches, an improvement over the 39% by the state-of-the-art.

Place, publisher, year, edition, pages
Association for Computing Machinery (ACM), 2022
Series
International Conference on Software Engineering, ISSN 0270-5257
National Category
Specific Languages Computer Sciences
Identifiers
urn:nbn:se:kth:diva-316694 (URN)10.1145/3510003.3510222 (DOI)000832185400122 ()2-s2.0-85130298109 (Scopus ID)
Conference
44th ACM/IEEE International Conference on Software Engineering, ICSE 2022, Pittsburgh, 22 May 2022, through 27 May 2022
Funder
Wallenberg AI, Autonomous Systems and Software Program (WASP)
Note

QC 20221109

Part of proceedings: ISBN 978-145039221-1

Available from: 2022-09-05 Created: 2022-09-05 Last updated: 2023-02-08Bibliographically approved
Ye, H., Martinez, M., Durieux, T. & Monperrus, M. (2021). A comprehensive study of automatic program repair on the QuixBugs benchmark. Journal of Systems and Software, 171, Article ID 110825.
Open this publication in new window or tab >>A comprehensive study of automatic program repair on the QuixBugs benchmark
2021 (English)In: Journal of Systems and Software, ISSN 0164-1212, E-ISSN 1873-1228, Vol. 171, article id 110825Article in journal (Refereed) Published
Abstract [en]

Automatic program repair papers tend to repeatedly use the same benchmarks. This poses a threat to the external validity of the findings of the program repair research community. In this paper, we perform an empirical study of automatic repair on a benchmark of bugs called QuixBugs, which has been little studied. In this paper, (1) We report on the characteristics of QuixBugs; (2) We study the effectiveness of 10 program repair tools on it; (3) We apply three patch correctness assessment techniques to comprehensively study the presence of overfitting patches in QuixBugs. Our key results are: (1) 16/40 buggy programs in QuixBugs can be repaired with at least a test suite adequate patch; (2) A total of 338 plausible patches are generated on the QuixBugs by the considered tools, and 53.3% of them are overfitting patches according to our manual assessment; (3) The three automated patch correctness assessment techniques, RGTEvosuite, RGTInputSampling and GTInvariants, achieve an accuracy of 98.2%, 80.8% and 58.3% in overfitting detection, respectively. To our knowledge, this is the largest empirical study of automatic repair on QuixBugs, combining both quantitative and qualitative insights. All our empirical results are publicly available on GitHub in order to facilitate future research on automatic program repair. 

Place, publisher, year, edition, pages
Elsevier Inc., 2021
Keywords
Automatic program repair, Bug benchmark, Patch correctness assessment, Software engineering, Assessment technique, Automatic programs, Empirical studies, External validities, Overfitting, Repair tools, Research communities, Automatic test pattern generation
National Category
Computer Systems
Identifiers
urn:nbn:se:kth:diva-285291 (URN)10.1016/j.jss.2020.110825 (DOI)000592499600001 ()2-s2.0-85091196139 (Scopus ID)
Funder
Wallenberg AI, Autonomous Systems and Software Program (WASP)
Note

QC 20201202

Available from: 2020-12-02 Created: 2020-12-02 Last updated: 2024-03-18Bibliographically approved
Baudry, B., Chen, Z., Etemadi, K., Fu, H., Ginelli, D., Kommrusch, S., . . . Yu, Z. (2021). A Software-Repair Robot Based on Continual Learning. IEEE Software, 38(4), 28-35
Open this publication in new window or tab >>A Software-Repair Robot Based on Continual Learning
Show others...
2021 (English)In: IEEE Software, ISSN 0740-7459, E-ISSN 1937-4194, Vol. 38, no 4, p. 28-35Article in journal (Refereed) Published
Abstract [en]

Software bugs are common, and correcting them accounts for a significant portion of the costs in the software development and maintenance process. In this article, we discuss R-Hero, our novel system for learning how to fix bugs based on continual training.

Place, publisher, year, edition, pages
Institute of Electrical and Electronics Engineers (IEEE), 2021
Keywords
Maintenance engineering, Computer bugs, Software development management, Bot (Internet), Training data, Machine learning
National Category
Software Engineering Computer Sciences
Identifiers
urn:nbn:se:kth:diva-299103 (URN)10.1109/MS.2021.3070743 (DOI)000664984000005 ()2-s2.0-85103775192 (Scopus ID)
Funder
Wallenberg AI, Autonomous Systems and Software Program (WASP)Swedish Foundation for Strategic Research , trustfull
Note

QC 20210805

Available from: 2021-08-05 Created: 2021-08-05 Last updated: 2022-06-25Bibliographically approved
Ye, H., Martinez, M. & Monperrus, M. (2021). Automated patch assessment for program repair at scale. Empirical Software Engineering, 26(2), Article ID 20.
Open this publication in new window or tab >>Automated patch assessment for program repair at scale
2021 (English)In: Empirical Software Engineering, ISSN 1382-3256, E-ISSN 1573-7616, Vol. 26, no 2, article id 20Article in journal (Refereed) Published
Abstract [en]

In this paper, we do automatic correctness assessment for patches generated by program repair systems. We consider the human-written patch as ground truth oracle and randomly generate tests based on it, a technique proposed by Shamshiri et al., called Random testing with Ground Truth (RGT) in this paper. We build a curated dataset of 638 patches for Defects4J generated by 14 state-of-the-art repair systems, we evaluate automated patch assessment on this dataset. The results of this study are novel and significant: First, we improve the state of the art performance of automatic patch assessment with RGT by 190% by improving the oracle; Second, we show that RGT is reliable enough to help scientists to do overfitting analysis when they evaluate program repair systems; Third, we improve the external validity of the program repair knowledge with the largest study ever.

Place, publisher, year, edition, pages
Springer Nature, 2021
Keywords
Automatic program repair, Automatic patch assessment
National Category
Electrical Engineering, Electronic Engineering, Information Engineering
Identifiers
urn:nbn:se:kth:diva-292295 (URN)10.1007/s10664-020-09920-w (DOI)000620938900001 ()2-s2.0-85101589275 (Scopus ID)
Funder
Wallenberg AI, Autonomous Systems and Software Program (WASP)Swedish Foundation for Strategic Research , trustfull
Note

QC 20210406

Available from: 2021-04-06 Created: 2021-04-06 Last updated: 2023-02-08Bibliographically approved
Organisations
Identifiers
ORCID iD: ORCID iD iconorcid.org/0000-0003-4807-2110

Search in DiVA

Show all publications