Psychology has been one of the inspirational disciplines for the creation of AI ever since researchers realised that they could make computers ‘think’. Since then, AI researchers have been ‘borrowing’ concepts from psychological schools of thought, as seen with the undeniable rise of reinforcement learning. Along with conditioning, the machine learning field also borrows another important idea from psychology; heuristics

While heuristic solutions are not 100% accurate, they provide quick solutions with a reasonable degree of accuracy. They can also be used to cut down on data bloat by creating data map structures which can then be accessed by using heuristic rules. This concept might be the key to enable low-computation costs for AI agents, and might even scale to the size of LLMs like GPT 3.5. Let’s delve deeper into whether heuristics can actually make AI agents better.

Heuristics Explained

Heuristics in computer science is used to refer to a wide range of software optimisations that solve problems quicker than the optimal solution. While it does provide a faster solution, heuristic methods usually sacrifice accuracy, precision or completeness in exchange for speed. Owing to this, heuristics are often effective but not guaranteed to work in every situation. 

Artificial intelligence algorithms have long been using heuristics in various forms ever since this concept was introduced. One of the first applications for heuristics was in search algorithms, which saw the usage of techniques such as the best first search heuristic method. Search algorithms pick a node that satisfies a certain set of criteria from a branching tree of options. The heuristic approach to this optimises for distance and expands the nodes of the graph by increasing the distance from the starting node. It does this until the goal node is reached, resulting in a quick solution a majority of the time. 

Other well-known heuristic optimisations include the nearest neighbour heuristic which is used to solve the ‘travelling salesman problem’. In the travelling salesman problem, an algorithm is required to find the shortest path between a huge number of cities. The nearest neighbour heuristic solves the problem by picking an as-of-yet unvisited city as the next destination. While this does not provide the most optimal solution, it does ensure that the problem is solved using a reasonable number of resources.

As we can see, heuristics are already a well-ingrained part of AI programming. However, the way the human brain approaches heuristics is fundamentally different; an approach that can revolutionise large neural networks. 

Read: Beware of ChatGPT Clones

Heuristics of the Future

In psychology, the term heuristics is used to refer to the mental shortcuts that human beings take in cognition. These heuristics are strategies that have been developed over years of evolution, and allow humans to quickly make decisions and find fast solutions to more complex problems. This concept was then adopted in computer science as a way to allow programmes to perform tasks quickly in a resource-constrained environment. 

In human psychology, there are multiple types of heuristics but there are some that will find success when applied to AI algorithms. The first of these is the ‘representativeness heuristic’, which can be applied to training tasks. The representativeness heuristic allows humans to make a decision by comparing a situation with the closest representative mental prototype.

Implementing this heuristic in a neural network could help to prevent AI bias. By creating a ‘representative state’ of the model which would depict the ideal state of the algorithm, it can be used as a reference for the agent. The agent can then be coded to refer back to the representative state when it comes up with a low confidence score for some of its results, reducing the amount of bias that creeps into decisions made by neural networks.

Read: ChatGPT is Great, but Competing with Google Takes More than That

The second type is the ‘availability heuristic’, which cuts down on the time required to make a decision by picking up information that is the most easily available. This is the heuristic that will find the most usage in AI if applied, especially in chatbot-focused LLMs like ChatGPT

By implementing the availability heuristic in ChatGPT, conversation memory can be preserved across chats with minimal resource utilisation. By creating an information map, AI agents can store the entire conversation history of a chat without needing to run it through the algorithm every time. This information can then be accessed by an interpretation of the availability heuristic, which can be used to find the most relevant keyword in the map based on its availability. 

However, heuristics often cause bias in the human thought process. In addition to this, heuristics in computer science also give inaccurate solutions due to sacrificing completeness or precision for speed. Most computer heuristics are also not based in the scientific method and are simply implementations of rules of thumb that happen to save resources in a majority of use cases. As with every other concept, heuristics must be used with moderation in modern AI agents, but an effective implementation can vastly reduce compute requirements. 

Read: Behind ChatGPT’s Wisdom: 300 Bn Words, 570 GB Data

The post Psychology in AI: Can Heuristics Make ChatGPT Better? appeared first on Analytics India Magazine.