Robustness (computer science): Difference between revisions

Content deleted Content added
short description, links
Tags: Mobile edit Mobile app edit iOS app edit
Move hatnote text to See also. {{see also}} is not suitable for the top of an article
 
(8 intermediate revisions by 8 users not shown)
Line 1:
{{short description|Ability of a computer system to cope with errors during execution}}
{{see also|Fault-tolerant computer system}}
{{Complex systems}}
 
Line 11 ⟶ 10:
 
== Challenges ==
Programs and software are tools focused on a very specific task, and thus aren'tare not generalized and flexible.<ref name="MIT" /> However, observations in systems such as the [[internet]] or [[biological system]]s demonstrate adaptation to their environments. One of the ways biological systems adapt to environments is through the use of [[redundancy (engineering)|redundancy]].<ref name="MIT" /> Many organs are redundant in humans. The [[kidney]] is one such example. [[Human]]s generally only need one kidney, but having a second kidney allows room for failure. This same principle may be taken to apply to software, but there are some challenges. When applying the principle of redundancy to computer science, blindly adding code is not suggested. Blindly adding code introduces more errors, makes the system more complex, and renders it harder to understand.<ref>{{cite web|url=http://www.cse.sc.edu/~huhns/journalpapers/V6N2.pdf |title=Building Robust Systems an essay |author=Agents on the wEb : Robust Software |website=Cse.sc.edu |access-date=2016-11-13}}</ref> Code that does not provide any reinforcement to the already existing code is unwanted. The new code must instead possess equivalent [[function (engineering)|functionality]], so that if a function is broken, another providing the same function can replace it, using manual or automated [[software diversity]]. To do so, the new code must know how and when to accommodate the failure point.<ref name="MIT" /> This means more [[logic]] needs to be added to the system. But as a system adds more logic, [[Software component#Software component|components]], and increases in size, it becomes more complex. Thus, when making a more redundant system, the system also becomes more complex and developers must consider balancing redundancy with complexity.
When applying the principle of redundancy to computer science, blindly adding code is not suggested. Blindly adding code introduces more errors, makes the system more complex, and renders it harder to understand.<ref>{{cite web|url=http://www.cse.sc.edu/~huhns/journalpapers/V6N2.pdf |title=Building Robust Systems an essay |author=Agents on the wEb : Robust Software |website=Cse.sc.edu |access-date=2016-11-13}}</ref> Code that doesn't provide any reinforcement to the already existing code is unwanted. The new code must instead possess equivalent [[function (engineering)|functionality]], so that if a function is broken, another providing the same function can replace it, using manual or automated [[software diversity]]. To do so, the new code must know how and when to accommodate the failure point.<ref name="MIT" /> This means more [[logic]] needs to be added to the system. But as a system adds more logic, [[Software component#Software component|components]], and increases in size, it becomes more complex. Thus, when making a more redundant system, the system also becomes more complex and developers must consider balancing redundancy with complexity.
 
Currently, computer science practices do not focus on building robust systems.<ref name="MIT" /> Rather, they tend to focus on [[scalability]] and [[Algorithmic efficiency|efficiency]]. One of the main reasons why there is no focus on robustness today is because it is hard to do in a general way.<ref name="MIT" />
Line 26 ⟶ 24:
;Stupidity: The programmer assumes users will try incorrect, bogus and malformed inputs.<ref name="robust_programming" /> As a consequence, the programmer returns to the user an unambiguous, intuitive error message that does not require looking up error codes. The error message should try to be as accurate as possible without being misleading to the user, so that the problem can be fixed with ease.
 
;Dangerous implements: Users should not gain access to [[Library (computing)|libraries]], [[data structure]]s, or [[Pointer (computer programming)|pointers]] to data structures.<ref name="robust_programming" /> This information should be hidden from the user so that the user doesn'tdoes not accidentally modify them and introduce a bug in the code. When such [[Interface (object-oriented programming)|interfaces]] are correctly built, users use them without finding loopholes to modify the interface. The interface should already be correctly implemented, so the user does not need to make modifications. The user therefore focuses solely on their own code.
 
;[[Assertion (software development)|Can't happen]]: Very often, code is modified and may introduce a possibility that an "impossible" case occurs. Impossible cases are therefore assumed to be highly unlikely instead.<ref name="robust_programming" /> The developer thinks about how to handle the case that is highly unlikely, and implements the handling accordingly.
 
===Robust machine learning===
Robust machine learning typically refers to the robustness of machine learning algorithms. For a machine learning algorithm to be considered robust, either the testing error has to be consistent with the training error, or the performance is stable after adding some noise to the dataset.<ref>{{cite web |author=El Sayed Mahmoud |url=https://www.researchgate.net/post/What_is_the_definition_of_the_robustness_of_a_machine_learning_algorithm |title=What is the definition of the robustness of a machine learning algorithm? |url=https://www.researchgate.net/post/What_is_the_definition_of_the_robustness_of_a_machine_learning_algorithm |access-date=2016-11-13}}</ref> Recently, consistently with their rise in popularity, there has been an increasing interest in the robustness of neural networks. This is particularly due their vulnerability to adverserial attacks.<ref>{{cite arXiv |last1=Li |first1=Linyi |last2=Xie |first2=Tao |last3=Li |first3=Bo |title=SoK: Certified Robustness for Deep Neural Networks |eprint=2009.04131 |date=9 September 2022|class=cs.LG }}</ref>
 
===Robust network design===
Line 38 ⟶ 36:
=== Robust algorithms ===
 
There existsexist algorithms that tolerate errors in the input.<ref>{{cite book |last1=Carbin |first1=Michael |title=Proceedings of the 19th international symposium on Software testing and analysis - ISSTA '10 |last2=Rinard |first2=Martin C. |chapter=Automatically identifying critical input regions and code in applications |date=12 July 2010 |pages=37–48 |doi=10.1145/1831708.1831713 |publisher=ACM |isbn=9781605588230 |s2cid=1147058 |chapter-url=http://people.csail.mit.edu/rinard/paper/issta10.pdf |isbn=9781605588230 |s2cid=1147058 }}</ref> or during the computation.<ref name="Danglot">{{cite journal |last1=Danglot |first1=Benjamin |last2=Preux |first2=Philippe |last3=Baudry |first3=Benoit |last4=Monperrus |first4=Martin |title=Correctness attraction: a study of stability of software behavior under runtime perturbation |journal=Empirical Software Engineering |date=21 December 2017 |volume=23 |issue=4 |pages=2086–2119 |doi=10.1007/s10664-017-9571-8 |url=https://hal.archives-ouvertes.fr/hal-01378523/document|arxiv=1611.09187 |s2cid=12549038 }}</ref> In that case, the computation eventually converges to the correct output. This phenomenon has been called "correctness attraction".<ref name="Danglot"/>
 
==See also==
*[[Fault tolerance]]
* [[Defensive programming]]
* [[Non-functional requirement]]