Detecting Deceptive Behaviour Using Machine Learning

Jul 18, 2022by, Rishikesh K B

Machine Learning


Human beings often tend to lie. Usually, people who lie would portray body language that deviates from his/her normal behaviour. According to psychology when someone is lying there are certain body movements, variations in their voice, and speech that he/she portrays consciously or subconsciously. Deceptive behaviour in humans could be identified by analyzing visuals, audio, and text to create machine learning models which extract and select relevant and prominent features which contribute the most to the detection. These features can be used to train different Machine Learning models.

To sight out a few, it is psychologically shown that if a person’s eye movement is towards the left, supposedly he/she is telling the truth and if it’s towards the right, it possibly is a lie. In research, the pupil will experience enlargement when a person lies and increase the number of blinks of the eye to more than 8 times the initial blink rate before the question. A person who is nervous tends to touch or cover his/her face which could indicate deceptivity. It is also known that a person would stammer while speaking or have a gap or delay between words and sentences and could use phrases like ‘Umm’ or other stopwords while lying or making up stories.  

Proposed Solution

A possible solution is to identify facial features, expressions, audio variations, and text indicating that the person is lying. The features that lead to the above-mentioned conclusions can include gaze direction, blink rate, eyelid changes, visibility of 68 facial feature point landmarks, the ratio of the duration of speech, and the total duration of the audio, variation in frequency, number of stop words, etc. These features are reflexive and are uncontrollable by human interference. These features are much easier to extract and study. The diagrams below represent the process of video analysis. 


A set of labelled trial court videos could be used as the dataset for training.  A frame-by-frame analysis could be performed on videos to extract visual features. Analyzing the audio and converting it to waveform will help extract audio features. Using Natual Language Processing (NLP), the text could be analyzed. Various technologies like NLP, OpenCV, Dlib and other modules could be made used to extract the features. Performing Feature Selection and Data Cleaning would help remove redundant data and attributes, which would reduce the error. Feature selection is performed by removing features with the highest percentage of missing values, highly collinear features, zero importance, and features with a single unique value. An activity diagram provided below depicts the process of video analysis. 

Similar methods could be designed for analyzing audio and text from the subject videos based on the relevant features.


Following the steps mentioned above helps to detect whether a person is lying or not from the video of the subject. Different facial features like gaze direction, blink rate, change in eye size, and 68 facial landmarks could be extracted from the video to predict whether the person is lying or not. The accuracy of the prediction depends on video quality and frame rate. Inconsistent results could be expected for subjects with facial ailments. Various supervised learning algorithms like Logistic Regression, Linear and Polynomial SVM (Support Vector Machine), Random Forest, Decision Tree, Naive Bayes, K nearest neighbours, etc. could be used for the labelled training dataset to be fitted into these models. Different models can have different accuracies by fine-tuning them, choosing the model with the highest precision can be used to test deceptive behaviour in humans.

Future Scope 

Detecting deceptive behaviour using ML provides an effective solution for many current problems. The potential scope of this technology is vast. It helps us to simultaneously observe and study factors that may indicate a lie. With advances in AI and machine learning, it is very likely that we will soon live in a world where we know how to detect the truth. It acts as a toolkit for investigators, advertisers, and for anyone with internet access. It can be of immense help in courtrooms where we would be able to effectively differentiate between truth and lie. It can also be of help in cases where therapists actively notice changes in their patients, news shows identifying in real-time whether or not a guest believes what they are saying, companies re-framing interviews with active facial analysis, and quick border security questioning. It can be used to provide increased airport security. Fraud rates in insurance firms can be decreased by effectively detecting deception. News shows identifying in real-time whether the content given by a guest is legitimate or not. If you would like to know more about our services, click here.

Disclaimer: The opinions expressed in this article are those of the author(s) and do not necessarily reflect the positions of Dexlock.

  • Share Facebook
  • Share Twitter
  • Share Linkedin