10,303 research outputs found

    Testing and Validating Machine Learning Classifiers by Metamorphic Testing

    Get PDF
    Machine Learning algorithms have provided important core functionality to support solutions in many scientific computing applications - such as computational biology, computational linguistics, and others. However, it is difficult to test such applications because often there is no "test oracle" to indicate what the correct output should be for arbitrary input. To help address the quality of scientific computing software, in this paper we present a technique for testing the implementations of machine learning classification algorithms on which such scientific computing software depends. Our technique is based on an approach called "metamorphic testing", which has been shown to be effective in such cases. Also presented is a case study on a real-world machine learning application framework, and a discussion of how programmers implementing machine learning algorithms can avoid the common pitfalls discovered in our study. We also conduct mutation analysis and cross-validation, which reveal that our method has very high effectiveness in killing mutants, and that observing expected cross-validation result alone is not sufficient to test for the correctness of a supervised classification program. Metamorphic testing is strongly recommended as a complementary approach. Finally we discuss how our findings can be used in other areas of computational science and engineering

    Методи та програмні засоби метаморфічного тестування програмних систем автоматичної кластеризації природномовних текстових даних

    Get PDF
    Забезпечення якості програмних систем досі залишається актуальною задачею в галузі ІТ, адже помилки в програмному забезпеченні можуть призводити до фінансових та/чи репутаційних втрат, створювати проблеми з безпекою, а в найгіршому випадку – і призводити до людських жертв. На забезпечення якості програмних систем щорічно витрачаються мільярди доларів – за даними World Quality Report 2021, витрати на підтримку якості програмного забезпечення складають від 18 до 35 відсотків всього ІТ-бюджету середньостатистичної компанії – тому будь-яке збільшення ефективності в даній галузі призводитиме до значної економії. Існує багато методологій забезпечення якості програмних систем, таких як контроль якості програмних артефактів, стандартизація та сертифікація процесів розроблення, робота з вимогами, організація підтримки тощо. Однією із найпоширеніших методологій є контроль якості програмних артефактів за допомогою методів ручного та/або автоматизованого тестування – ця методологія використовується при розроблені практично 100% програмних продуктів. 36% від бюджету забезпечення якості ПЗ (за даними того ж World Quality Report 2021) припадає на розроблення та/чи купівлю програмних засобів для тестування. При цьому з кожним роком зростає відсоток використання методів автоматизованого тестування програмного забезпечення замість ручного тестування людиною, відповідно і в категорії програмних засобів зміщується акцент на розроблення саме автоматизованих тестів та програмних засобів для їх написання. Незважаючи на наявність достатньо широкого спектру методів автоматизованого тестування, досі залишається актуальною задача підвищення ефективності контролю якості ПЗ за критерієм кількості потенційно знайдених дефектів за рахунок розроблення нових та вдосконалення існуючих методів тестування. Крім того, важливою проблемою є застосування автоматизованого тестування при розробленні складних програмних систем з великою потужністю множини можливих вхідних даних та внутрішніх станів, таких як програмні системи автоматичної кластеризації природномовних текстових даних. Зазвичай, застосування методів автоматизованого тестування в таких системах обмежується найпростішими модульними тестами, що перевіряють тривіальні випадки, але досягти можна значно більшого. Таким чином, вище описані задачі визначають актуальну науковотехнічну задачу вдосконалення теоретичних (методів) та практичних (програмних засобів) основ тестування програмних систем автоматичної кластеризації природномовних текстових даних, яка вирішується у даній дисертаційній роботі. Метою дисертаційної роботи є підвищення ефективності розроблення програмних засобів тестування програмних систем автоматичної кластеризації природномовних текстових даних за рахунок розроблення нових архітектур та шаблонів проєктування та підвищення ефективності тестування програмних систем автоматичної кластеризації природномовних текстових даних за рахунок розроблення нових методів їх тестування. У першому розділі дисертаційної роботи проаналізовано основні методи кластеризації природномовних текстових даних, які використовуються у програмних системах, основні методи тестування таких програмних систем та основні методи оцінювання ефективності методів кластеризації текстів, що дозволило сформувати ключові вимоги до методів та програмних засобів тестування програмних систем кластеризації природномовних текстових даних. У другому розділі дисертаційної роботи розроблено методи та програмні засоби генерування корпусів текстових даних, зокрема, визначено основні підходи до підготовки вхідних даних для тестування програмних систем кластеризації текстів, розроблено та досліджено сімейство методів генерування корпусів текстових даних CorDeGen, розроблено та досліджено програмне забезпечення для генерування корпусів текстів запропонованими методами, показано перспективи використання запропонованих методів генерування корпусів текстів не тільки в контексті метаморфічного тестування. У третьому розділі дисертаційної роботи розроблено методи та програмні засоби проєктування безсерверного програмного забезпечення для метаморфічного тестування, зокрема, обґрунтовано можливість застосування підходу безсерверних обчислень до метаморфічного тестування, розроблено та досліджено узагальнену безсерверну архітектуру програмного забезпечення для метаморфічного тестування, розроблено та досліджено шаблон проєктування програмного забезпечення «Metamorphic Testing-as-a-Service», розроблено та досліджено програмні засоби для проєктування програмних систем метаморфічного тестування з використанням шаблону проєктування «MTaaS», розглянуто можливість узагальнення шаблону проєктування «MTaaS» для будь-яких кінцевих представлень. У четвертому розділі дисертаційної роботи розроблено методи та програмні засоби метаморфічного тестування програмних систем автоматичної кластеризації текстів, зокрема, розроблено та досліджено методи метаморфічного тестування MEETC і MEETC-k, розроблено та досліджено програмний засіб метаморфічного тестування програмних систем автоматичної кластеризації природномовних текстових даних. У дисертаційній роботі отримано низку нових наукових результатів, зокрема, уперше розроблено метод метаморфічного тестування програмних систем автоматичної кластеризації природномовних текстових даних MEETC, який, на відміну від існуючих методів, є застосовним до програмних реалізацій будь-яких детермінованих методів кластеризації текстів без вхідного параметру кількості кластерів та забезпечує ефективність мутаційного тестування за показником оцінки мутації у 81-100%. Уперше розроблено метод метаморфічного тестування програмних систем автоматичної кластеризації природномовних текстових даних MEETC-k, який, на відміну від існуючих методів, є застосовним до програмних реалізацій будь-яких детермінованих методів кластеризації текстів з вхідним параметром кількості кластерів та забезпечує ефективність мутаційного тестування за показником оцінки мутації у 86-100%. Уперше запропоновано узагальнену архітектуру програмного забезпечення для метаморфічного тестування на основі використання моделі безсерверних обчислень, що дозволяє спростити процес розроблення програмних засобів для метаморфічного тестування та досягти прискорення виконання тестування програмних систем кластеризації текстів у 34-50%, в порівнянні з існуючими архітектурами. Уперше розроблено архітектурний шаблон проєктування програмного забезпечення «Metamorphic Testing-as-a-Service», характерною рисою якого є декомпозиція метаморфічного зв’язку на окремі складові та кодогенерація тіл метаморфічних зв’язків і безсерверних функцій. Використання запропонованого шаблону дозволяє зменшити дублювання і зв’язність програмного коду при розробленні програмних засобів для безсерверного метаморфічного тестування та покращує стандартні метрики якості коду: кількість рядків виконуваного коду та зв’язність класів в цілому, цикломатичну складність та індекс підтримуваності для окремих компонент. Уперше розроблено сімейство методів генерування корпусів текстових даних CorDeGen, характерною рисою яких є детермінованість та легкість апріорного опису структури отримуваного корпусу та які, на відміну від існуючих методів генерування корпусів, приймають на вхід мінімально можливу кількість параметрів, таким чином спрощуючи опис, зберігання та відтворення результатів: 1. базовий метод CorDeGen – на відміну від інших методів сімейства, забезпечує найвищу швидкість генерування корпусів за рахунок використання більш складного апріорного опису структури отримуваного корпусу, що викликано видаленням частини генерованих термів методами попереднього оброблення природномовних текстових даних; 2. метод CorDeGen+ – на відміну від інших методів сімейства, уникає видалення частини генерованих термів з корпусу, завдяки чому полегшується апріорний опис структури отримуваного корпусу; 3. метод SemCorDeGen – на відміну від інших методів сімейства, генерує корпуси текстів, які можливо використовувати разом з методами оброблення природномовних текстових даних на основі застосування семантичних моделей за рахунок розширення кількості вхідних параметрів. Практичне значення одержаних результатів полягає у спрощенні процесу розроблення програмних засобів для метаморфічного тестування в цілому (за рахунок використання узагальненої безсерверної архітектури та шаблону проєктування «MTaaS») та, зокрема, для тестування програмних систем автоматичної кластеризації природномовних текстових даних (за рахунок використання сімейства методів генерування корпусів текстів CorDeGen). Крім того, сімейство методів CorDeGen також може використовуватись на практиці в наукових дослідженнях для підвищення їх відтворюваності. Розроблені програмні засоби опубліковано у відкритому доступі, для їх частини створено та опубліковано загальнодоступні NuGet пакети, які можуть під’єднуватись та використовуватись сторонніми розробниками. Основні результати дисертаційної роботи опубліковано у 6 наукових працях, зокрема, у 3 наукових статтях, з яких 1 статтю опубліковано у закордонному фаховому виданні третього квартиля (Q3), яке проіндексоване в базі даних Scopus, і 2 статті опубліковано у фахових виданнях, включених до переліку наукових фахових видань України з присвоєнням категорії «Б», та у 3 матеріалах науково-технічних конференцій, з яких 1 публікація у матеріалах міжнародної наукової конференції, що проіндексовано у базі даних Scopus.Quality assurance of software systems is still an urgent problem in the IT area because software errors may lead to financial and/or reputational losses, create security problems, and in the worst case – lead to human fatality. Billions of dollars are spent annually on software quality assurance – according to the World Quality Report 2021, the software quality assurance expenditures amount at 18 through 35 percent of the total IT budget of an average company – therefore, any increase in efficiency in this area will lead to significant savings. There are many methodologies for ensuring the quality of software systems, such as quality control of software artifacts, standardization and certification of development processes, work with requirements, organization of support, etc. One of the most common methodologies is the quality control of software artifacts using manual and/or automated testing methods – this methodology is used in the development of almost 100% of software products. 36% of the quality assurance budget (according to the same World Quality Report 2021) is spent on the development and/or purchase of testing software tools. At the same time, the share of automated software methods use instead of manual human testing increases every year, and, correspondingly, in the category of software tools the emphasis shifts to the development of automated tests and software tools for their implementation. Despite the presence of a sufficiently wide range of automated testing methods, the task of increasing the effectiveness of quality control based on the criterion of the number of potentially found defects by developing new and improving existing testing methods is still relevant. In addition, an important problem is the application of automated testing in the development of complex software systems with a large capacity of the space of possible input data and internal states, such as software systems for automatic clustering of natural language text data. Usually, the application of automated testing methods in such systems is limited to the simplest unit tests that test trivial cases, but much more can be achieved. Thus, the tasks described above define the actual scientific and technical task of improving the theoretical (methods) and practical (software) foundations of testing software systems for automatic clustering of natural language text data, which is solved in this dissertation. The purpose of the dissertation is to increase the effectiveness of the development of software tools for testing software systems for automatic clustering of natural language text data by developing new architectures and design patterns and to increase the effectiveness of testing software systems for automatic clustering of natural language text data by developing new methods of their testing. The first section of the dissertation analyzed the main methods of clustering natural language text data used in software systems, the main methods of testing such software systems, and the main methods of evaluating the effectiveness of text clustering methods (according to the criterion of the quality of the results), which made it possible to formulate key requirements for methods and software tools of testing software systems for natural language text data clustering. In the second section of the dissertation, methods and software tools for generating corpora of text data are developed, in particular, the main methods of preparing input data for testing text clustering software systems are defined, the family of methods for generating corpora of textual data CorDeGen was developed and researched, developed and researched software for generating text corpora using the proposed methods, the prospects of using the proposed methods of generating text corpora are shown not only in the context of metamorphic testing. In the third section of the dissertation, methods and software tools for designing serverless software for metamorphic testing are developed, in particular, the possibility of applying the approach of serverless computing to metamorphic testing is substantiated, developed and investigated the basic serverless architecture of software for metamorphic testing, the "Metamorphic Testing-as-a-Service" software design pattern was developed and researched, developed and researched software tools for designing metamorphic testing software systems using the "MTaaS" design pattern, the possibility of generalizing the "MTaaS" design pattern for any end views is considered. In the fourth section of the dissertation, methods and software tools for metamorphic testing of automatic text clustering software systems were developed, in particular, MEETC and MEETC-k metamorphic testing methods were developed and researched, a software tool for metamorphic testing of software systems for automatic clustering of natural language text data was developed and researched. The dissertation provides several new scientific results, in particular, for the first time, the method of metamorphic testing of software systems for automatic clustering of natural language text data MEETC was developed, which, unlike existing methods, is applicable to software implementations of any deterministic methods of text clustering without the input parameter of the number of clusters and ensures the effectiveness of mutation testing according to the mutation score in 81- 100%. For the first time, the method of metamorphic testing of software systems for automatic clustering of natural language text data MEETC-k was developed, which, unlike existing methods, is applicable to software implementations of any deterministic text clustering methods with the input parameter of the number of clusters and ensures the effectiveness of mutation testing according to the mutation score in 86-100%. For the first time, the basic software architecture for metamorphic testing based on the use of a serverless computing model is proposed, which allows to simplify the process of developing software tools for metamorphic testing and to achieve an acceleration of the testing of text clustering software systems by 34-50%, compared to existing architectures. For the first time, the architectural software design pattern "Metamorphic Testing-as-a-Service" was developed, the characteristic feature of which is the decomposition of the metamorphic relation into separate components and the code generation of the bodies of metamorphic relations and serverless functions. The use of the proposed pattern makes it possible to reduce the duplication and coupling of the software code when developing software tools for serverless metamorphic testing and improves the standard metrics of code quality: the number of lines of executable code and the class coupling as a whole, the cyclomatic complexity and the maintainability index for individual components. For the first time, the family of methods for generating corpora of text data CorDeGen has been developed, the characteristic feature of which is the determinism and ease of a priori description of the structure of the received corpus, and which, unlike the existing corpus generation methods, accept as input the minimum possible number of parameters, thus simplifying the description, storage and reproduction of results: 1. the basic CorDeGen method – unlike other methods of the family, provides the highest speed of corpora generation due to the use of a more complex a priori description of the structure of the received corpus, which is caused by the removal of a part of the generated terms by methods of pre-processing of natural language text data; 2. the CorDeGen+ method – unlike other methods of the family, it avoids removing part of the generated terms from the corpus, which facilitates the a priori description of the structure of the resulting corpus; 3. the SemCorDeGen method – unlike other methods of the family, generates corpora of texts that can be used together with natural language text data processing methods based on the application of semantic models due to the expansion of the number of input parameters. The practical significance of the obtained results lies in the simplification of the process of developing software tools for metamorphic testing in general (due to the use of the basic serverless architecture and the "MTaaS" design pattern) and, in particular, for testing software systems for automatic clustering of natural language text data (due to the use of the family of text corpora generation methods CorDeGen). In addition, the CorDeGen family of methods can also be used in practice in scientific research, to increase their reproducibility. The developed software tools are published in open access, for some of them publicly available NuGet packages have been created and published, which can be connected and used by third-party developers. The main results of the dissertation were published in 6 scientific papers, in particular, in 3 scientific articles, including 1 article published in a foreign scientific journal of the third quartile (Q3), which is indexed in the Scopus database, and 2 articles published in scientific journals included in the list of scientific journals of Ukraine in category «Б», as well as in 3 materials of scientific and technical conferences, including 1 paper in the proceedings of the international scientific conference indexed in Scopus database

    Метаморфне тестування нейронних мереж для розпізнавання об’єктів

    Get PDF
    Актуальність теми. Важливість тестування програмного забезпечення завжди залишається актуальною проблемою. Користувачі потребують надійне програмне забезпечення, яке не становить загрозу їхнім пристроям. Для тестування створюється все більше програмних засобів та утиліт. Не виняток і сфера машинного навчання. Системи основані на машинному навчанні потребують ретельної перевірки працездатності. Традиційні методи тестування не завжди можуть бути використані через необхідність у величезних об’ємах даних. Тому в 1998році було запропоноване метаморфне тестування. Особлива перевага якого це генерація нових тестових випадків з вже існуючих, що виключає необхідність в створенні або пошуку великих об’ємів даних для тестування систем. Об’єктом дослідження є тестування програмного забезпечення на основі машинного навчання. Предметом дослідження є метаморфний метод тестування нейронних мереж для розпізнавання зображень. Мета роботи: покращити тестове покриття нейронних мереж для розпізнавання об’єктів за допомогою визначення метаморфних відношень, які в свою чергу дозволяють застосовувати метаморфне тестування. Наукова новизна полягає в наступному: 1. Вперше запропоновано метаморфні відношення для нейронних мереж розпізнавання зображень, що дозволяє досягнути створення в 49 раз більшої кількості тестових випадків на кожен з існуючих у порівнянні з традиційним підходом. Практична цінність описані метаморфні відношення можуть бути запроваджені у вже існуючі проекти, які основані на використанні машинного навчання, реалізований програмний модуль для модифікації може бути доповнений новими методами модифікації зображень, оскільки реалізований в досить простий та зручний спосіб для розширення. Апробація роботи. Запропонований підхід був представлений та обговорений на науковій конференції магістрантів та аспірантів «Прикладна математика та комп‘ютинг» ПМК-2022 (Київ, 16 - 18 листопада 2022 р.) та на IX Міжнародній науковотехнічній Internet конференції «Сучасні методи, інформаційне, програмне та технічне забезпечення систем керування організаційно-технічними та технологічними комплексами», яка проводилась 25 листопада 2022 р. у Національному університеті харчових технологій. Структура та обсяг роботи. Магістерська дисертація складається з вступу, чотирьох розділів та висновків. У вступі подано загальну характеристику роботи, показано наукову новизну і практичну цінність роботи. У першому розділі розглянуто проблематику тестування сучасного програмного забезпечення та розглянуто методи тестування програмного забезпечення. У другому розділі наведено опис теоретичної частини та визначення метаморфних відношень для нейронних мереж розпізнавання зображень. У третьому розділі наведено особливості практичної реалізації програмної бібліотеки, переваги використання обраної мови програмування, а також додаткових інструментів У четвертому розділі проведено тестування існуючих систем для розпізнавання зображень метаморфним тестуванням. У висновках представлені результати проведеної роботи. Робота представлена на 80 аркушах, містить посилання на список використаних літературних джерел. Ключові слова: тестування програмного забезпечення, метаморфне тестування, нейронні мережі розпізнавання зображень, метаморфні відношення.Actuality of theme. The importance of software testing is always a pressing issue. Users need reliable software that does not pose a threat to their devices. More and more software and utilities are being created for testing. The field of machine learning is no exception. Systems based on machine learning require thorough performance testing. Traditional testing methods cannot always be used due to the need for huge amounts of data. Therefore, metamorphic testing was proposed in 1998. The special advantage of which is the generation of new test cases from existing ones, which eliminates the need to create or search for large volumes of data for testing systems. The object of research is software testing based on machine learning. The subject of research is the metamorphic method of testing neural networks for image recognition. The goal of the work: to improve the test coverage of neural networks for object recognition by defining metamorphic relations, which in turn allow the application of metamorphic testing. The scientific novelty consists in the following: 1. For the first time, metamorphic relations for neural networks of image recognition are proposed, which allows to achieve the creation of 49 times more test cases for each of the existing ones compared to the traditional approach. The practical value of the described metamorphic relations can be introduced into already existing projects that are based on the use of machine learning, the implemented software module for modification can be supplemented with new methods of image modification, since it is implemented in a fairly simple and convenient way for expansion. Approbation of work. The proposed approach was presented and discussed at the scientific conference of master's and postgraduate students "Applied mathematics and computing" PMK-2022 (Kyiv, November 16 - 18, 2022) and at the IX International scientific and technical Internet conference "Modern methods, information, software and technical provision of management systems of organizational, technical and technological complexes", which was held on November 25, 2022 at the National University of Food Technologies. Structure and scope of work. The master's thesis consists of an introduction, four chapters and conclusions. The introduction gives a general description of the work, shows the scientific novelty and practical value of the work. In the first chapter, the problems of modern software testing are considered and software testing methods are considered. The second chapter provides a description of the theoretical part and definition of metamorphic relations for neural networks of image recognition. In the third section, the features of the practical implementation of the software library, the advantages of using the selected programming language, and additional tools are given In the fourth chapter, existing systems for image recognition are tested by metamorphic testing. The results of the work are presented in the conclusions. The work is presented on 81 sheets, contains links to the list of used literary sources. Keywords: software testing, metamorphic testing, neural networks for image recognition, metamorphic relations

    Fault Detection Effectiveness of Metamorphic Relations Developed for Testing Supervised Classifiers

    Full text link
    In machine learning, supervised classifiers are used to obtain predictions for unlabeled data by inferring prediction functions using labeled data. Supervised classifiers are widely applied in domains such as computational biology, computational physics and healthcare to make critical decisions. However, it is often hard to test supervised classifiers since the expected answers are unknown. This is commonly known as the \emph{oracle problem} and metamorphic testing (MT) has been used to test such programs. In MT, metamorphic relations (MRs) are developed from intrinsic characteristics of the software under test (SUT). These MRs are used to generate test data and to verify the correctness of the test results without the presence of a test oracle. Effectiveness of MT heavily depends on the MRs used for testing. In this paper we have conducted an extensive empirical study to evaluate the fault detection effectiveness of MRs that have been used in multiple previous studies to test supervised classifiers. Our study uses a total of 709 reachable mutants generated by multiple mutation engines and uses data sets with varying characteristics to test the SUT. Our results reveal that only 14.8\% of these mutants are detected using the MRs and that the fault detection effectiveness of these MRs do not scale with the increased number of mutants when compared to what was reported in previous studies.Comment: 8 pages, AITesting 201

    Identifying Implementation Bugs in Machine Learning based Image Classifiers using Metamorphic Testing

    Full text link
    We have recently witnessed tremendous success of Machine Learning (ML) in practical applications. Computer vision, speech recognition and language translation have all seen a near human level performance. We expect, in the near future, most business applications will have some form of ML. However, testing such applications is extremely challenging and would be very expensive if we follow today's methodologies. In this work, we present an articulation of the challenges in testing ML based applications. We then present our solution approach, based on the concept of Metamorphic Testing, which aims to identify implementation bugs in ML based image classifiers. We have developed metamorphic relations for an application based on Support Vector Machine and a Deep Learning based application. Empirical validation showed that our approach was able to catch 71% of the implementation bugs in the ML applications.Comment: Published at 27th ACM SIGSOFT International Symposium on Software Testing and Analysis (ISSTA 2018
    corecore