Back to Case Studies

Personality Profiling from Text

MBTI Classification with BERT and Why the Startup Behind It Closed

ResearchVentureMedia, Marketing & Language ServicesJan 2020 – May 2023NLP, Knowledge Systems & Generative AI
0.92
F1 for 16 MBTI types, balanced data
18
Model–dataset pairs, 10 runs each
~106k
Texts across 16 personality types
≤ 0.44
Accuracy of the LIWC dictionary method

My Role

Role
Co-founder & researcher (Master's thesis)
Own venture
Team
3 co-founders; 2 of us wrote the code
Stage reached
Published thesis; startup closed
Key decisions
  • Balance by copying; never copy validation texts
  • Keep stop words as a writing-style signal
  • Average every model-dataset pair over 10 runs

Approach at a Glance

Details
  1. 1Three Dataset Versions to Test the Effect of Balancing
  2. 2Light Preprocessing by Design
  3. 3Six Models, 18 Combinations, 10 Runs Each
  4. 4What the Results Showed
  5. 5The Dictionary Approach as a Negative Result
  6. 6Demo Application on Azure

Executive Summary

Can you tell a person's personality type from how they write? This was the research behind AINOVA, a startup I co-founded in 2020 to personalise content by personality: the same message, product page or recommendation adapted to the reader's behavioural patterns. I turned that research into my Master's thesis in Artificial Intelligence at NURE in 2023.

The task was to classify the author of a text into one of the 16 Myers-Briggs (MBTI) types. I compared six approaches, from classical models to a BERT-based classifier, on three versions of a heavily imbalanced corpus of about 106,000 texts: 18 combinations, each averaged over 10 runs with different splits. With the right balancing, the BERT classifier reached an F1 of 0.92, and logistic regression and SVM reached 0.89. The dictionary approach with LIWC, often used in psychology research, didn't exceed 0.44 accuracy.

I also built a demo web application on Azure: paste a text, get the author's type, and use a GPT-4 service to rewrite the text for a chosen personality type.

The startup itself closed. The models worked, but we couldn't make the product cheap enough for users and, at the same time, compliant with GDPR for models trained on personal texts. That lesson is part of this case.


Research Context

Content personalisation usually relies on behaviour: clicks, purchases, watch history. Personality is a deeper signal, since it shapes which arguments, tone and format a person responds to. Until now, personality was assessed mainly by psychologists or with questionnaires, and automated methods used other modalities than text. Text is everywhere, so a model that reads personality from writing could feed recommendation systems, marketing and content adaptation.

The data made it hard:

  • Extreme imbalance: in the public corpus of posts from Reddit and PersonalityCafe, two of the 16 types (INTP and INTJ) make up almost half the data. This reflects how unevenly types are spread in society and online, so a naive model just learns to predict the common types.
  • Noisy, informal text: posts of up to 500 words, with links, slang and special characters.
  • Weak dictionary baselines: word-counting tools give interpretable features, but it was unclear whether they could classify types at all.

Technical Approach

  1. Three Dataset Versions to Test the Effect of Balancing – Earlier studies trained on the raw, imbalanced data. I built three versions to show how much balancing matters:

    • Default: the data as it is.
    • Trimmed: large classes cut down to 5,000 texts each.
    • Balanced by copying: the trimmed set plus copies of texts in small classes. Texts in the validation set were never copied, so no copy could leak from training into evaluation.

    I didn't use SMOTE or synthetic text generation. Both need every text projected into a latent space first, which conflicted with part of the classical models I wanted to compare on their own terms.

  2. Light Preprocessing by Design – Only lemmatisation and removal of noise such as links and special characters. I deliberately kept stop words: the way people use small function words is part of their writing style, it keeps the model closer to real-world text, and it keeps preprocessing simple.

  3. Six Models, 18 Combinations, 10 Runs Each – Logistic regression, a decision tree, a random forest, multinomial naive Bayes, a linear SVM and a BERT-based classifier, trained on all three datasets. Each combination was measured over 10 different splits and initialisations, and the F1 was averaged, so a lucky split couldn't decide the comparison. The experiments ran on Azure Machine Learning with a GPU machine, because the free Colab tier wasn't stable enough for BERT.

  4. What the Results Showed – The overall F1 scores:

    DatasetBERTLogistic regressionSVMNaive BayesDecision treeRandom forest
    Default0.840.800.810.520.620.49
    Trimmed0.830.800.330.100.250.06
    Balanced by copying0.920.890.890.790.630.68
    • Trimming alone backfired, and unequally: BERT and logistic regression barely changed, while the SVM and the tree models collapsed. Less data hurt more than imbalance did.
    • Balancing by copying gave the best results for every model, with BERT above 0.9.
    • BERT handled rare types best, even on the raw data: on ESFJ, one of the rarest classes, it scored 0.59 against 0.24 for logistic regression.
  5. The Dictionary Approach as a Negative Result – With LIWC, I analysed which linguistic categories correlate with which types. Some patterns were clear: emotional language ("affect") correlated with INFP and ENTP, and negations with ESTJ and ESFP. But a classifier built on these features didn't exceed 0.44 accuracy. My conclusion: dictionaries are useful for explaining why a model decides something, as a validator or one voter in an ensemble, but not as the classifier.

  6. Demo Application on Azure – A web application to show the research working:

    • Architecture: microservices on Azure, with API Management, App Service and Kubernetes (AKS), Docker containers and CI/CD pipelines in Azure DevOps.
    • Services: a React interface and a Python/Flask REST backend, with requests going through a task queue.
    • No stored data: user texts are kept only in the queue while a task runs. Nothing is saved.
    • Generative AI: besides classification, a GPT-4 service rewrites a text for a chosen personality type through prompt engineering. This was the personalisation use case AINOVA was built around.

Outcome

The thesis showed that personality types can be read from writing with high quality: with careful balancing, a BERT classifier reached 0.92 F1 across 16 MBTI types, and simpler models came close at 0.89. It also showed what doesn't work: training on the raw imbalanced data, cutting data to balance it, and relying on dictionaries alone.

Why AINOVA closed. The research worked, but the business didn't. We couldn't fund the startup, for two reasons:

  • Unit economics: we couldn't make the app and its access model cheap enough for users.
  • GDPR compliance: the models learn from personal texts. If users ask to delete their data from the training set, which at the start of an app could be a large share of them every month, the models would need retraining again and again. And we couldn't guarantee that no personal or sensitive data would end up in the training set.

So we closed the startup we had run since 2020 and moved on to other projects. I kept the last real value from it by turning the research into my thesis. The lesson stayed with me: for an AI product built on personal data, data deletion and retraining cost belong in the architecture and the business model from day one, not after the model works.

Technologies

NLPBERTTransformersscikit-learnLIWCClass BalancingAzure Machine LearningDockerKubernetesFlaskReactGPT-4

Planning something similar?

Tell me about it on a short call. New projects can start within 2 weeks