Comment: Code optimisation in the AI ecosystem

3 min read

Dr Leslie Kanthan, co-founder and CEO of TurinTech, outlines the importance of code quality for optimising AI performance and the emerging skills gap in the sector.

Adobe Stock

The AI ecosystem consists of several critical elements. In order to achieve optimal AI performance, each of these component parts needs to function at its highest capacity. In this article, we discuss the key elements in the AI space and the value of code optimisation in achieving optimal AI performance.

Boosting performance is a priority in the AI space. Businesses will not hesitate to make large investments to achieve even a marginal improvement (e.g. increased accuracy, speed) in AI systems. A range of factors impact the performance of AI; high-quality data, infrastructure, code, and the right talent are all crucial elements of a thriving AI ecosystem. 

In order to achieve optimal performance, an AI system must in essence maximise results while minimising inefficiencies and costs. In this article, we discuss the four pillars on which AI relies on, and why each needs to be optimised. 

Factors underlying optimal AI performance

Data

AI systems and machine learning models are built, trained, tested, and deployed based on data. Incomplete, invalid, or corrupt data compromises the quality of AI systems. Training and test data used in an AI system must also be a representative sample of the population. Non-representative datasets pose the risk of introducing biases to AI systems. Selecting a good dataset and data preprocessing are essential first steps in ensuring strong AI performance. 

Infrastructure

Infrastructure and hardware make it possible to host data, models, and software needed for AI solutions. Processing, memory, networking, and storage tasks are particularly enabled via infrastructure. Processing and logic devices such as CPUs, GPUs, FPGAs and/or ASICs, temporary storage and long-term storage solutions, and devices that enable connectivity make up the essential hardware bundle for AI. Improving the performance of AI systems is inevitably tied to hardware capacity.

However, it is doubtful that the capacity of hardware can be increased exponentially without innovative interventions. For instance, following Moore’s law, there are concerns that we may be reaching the limits of the physical capacity of computing power. In order to power the AI of the future, bleeding-edge infrastructure solutions will be essential. 

Code 

Code that underlies AI systems is crucial to ensure that solutions function as expected and do so without error. Good code is reliable, clear, and consistent. Availability of documentation makes code bases easier to maintain. The ever-evolving AI ecosystem requires high-performance software, making code efficiency critical. Even the slightest increase in code efficiency can accelerate application speed and boost productivity and profits. 

A study on the business impact of code quality reported that the Time-in-Development for Alert level 1 codebases is 124% more than that of Healthy level code. In a survey of C-level executives conducted by Stripe, it was reported that bad code costs companies $85 billion annually. Technical debt in machine learning piles extremely fast meaning that bad quality code can set even the most experienced teams back for half a year. 

Talent 

AI is envisioned, developed and maintained by data scientists, software engineers and various other personnel in the AI ecosystem. Engaging the best talent leads to AI solutions that are innovative, efficient, and profitable. LinkedIn 2020 Emerging Jobs Report UK identifies Artificial Intelligence Specialist as UK’s top emerging job, highlighting the value and demand for AI talent.

However, due to the time and training required for specialisation, it can often be difficult to find and recruit AI specialists. Organisations may feel the need to curtail the scope of their AI applications if they are unable to find the right talent for the task.

Despite being essential in the AI ecosystem, each of these elements presents its own set of challenges and limitations. Innovative solutions are required to ensure that AI can be scaled without being hindered by complications. Code optimisation is one area with a promising outlook for achieving optimal AI performance. 

The bottom line

The benefits of code optimisation are manifold. Optimisation makes code bases cleaner, clearer, and more consistent, making the software perform with greater efficiency. End-users of this software receive an enhanced user experience with better results and increased speed. Code optimisation also makes code more readable, ultimately making it easier for multiple stakeholders to work and collaborate easily on a single code base. 

Dr Leslie Kanthan is co-founder and CEO of TurinTech