Next Article in Journal
The Effect of Implant–Abutment Contact Area on the Stress Generation of Bone-Level and Tissue-Level Implants
Next Article in Special Issue
Artificial Intelligence Approaches for the Detection of Normal Pressure Hydrocephalus: A Systematic Review
Previous Article in Journal
Development of a Hybrid Model for Risk Assessment and Management in Complex Road Infrastructure Projects
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Emotion Analysis AI Model for Sensing Architecture Using EEG

School of Architecture, Hanyang University, Seoul 04763, Republic of Korea
*
Author to whom correspondence should be addressed.
Appl. Sci. 2025, 15(5), 2742; https://doi.org/10.3390/app15052742
Submission received: 19 December 2024 / Revised: 26 February 2025 / Accepted: 27 February 2025 / Published: 4 March 2025

Abstract

:
The rapid advancement of artificial intelligence (AI) has spurred innovation across various domains—information technology, medicine, education, and the social sciences—and is likewise creating new opportunities in architecture for understanding human–environment interactions. This study aims to develop a fine-tuned AI model that leverages electroencephalography (EEG) data to analyse users’ emotional states in real time and apply these insights to architectural spaces. Specifically, the SEED dataset—an EEG-based emotion recognition resource provided by the BCMI laboratory at Shanghai Jiao Tong University—was employed to fine-tune the ChatGPT model for classifying three emotional states (positive, neutral, and negative). Experimental results demonstrate the model’s effectiveness in differentiating these states based on EEG signals, although the limited number of participants confines our findings to a proof of concept. Furthermore, to assess the feasibility of the proposed approach in real architectural contexts, we integrated the model into a 360° virtual reality (VR) setting, where it showed promise for real-time emotion recognition and adaptive design. By combining AI-driven biometric data analysis with user-centred architectural design, this study aims to foster sustainable built environments that respond dynamically to human emotions. The results underscore the potential of EEG-based emotion recognition for enhancing occupant experiences and provide foundational insights for future investigations into human–space interactions.

1. Introduction

1.1. Background and Goals of Study

The rapid advancement of artificial intelligence (AI) has driven significant innovation across multiple disciplines, including information technology, medicine, education, and the social sciences. In particular, AI has played a pivotal role in the evolution of affective computing, enabling the quantitative analysis and interpretation of human emotions through computational models [1,2]. Recently, the emergence of brain–computer interface (BCI) technology has garnered increasing attention, with electroencephalography (EEG)-based emotion recognition emerging as a promising tool for real-time affective state detection [3]. EEG captures the brain’s electrical activity, facilitating the establishment of correlations between neural signals and specific emotional states. This capability has opened new avenues for real-time emotion detection and adaptive system development, with applications spanning healthcare, human–computer interaction (HCI), and brain–computer interfacing [4,5].
Despite these advancements, the application of emotion recognition technology in architectural environments remains largely unexplored. Traditional methods for analysing human affective responses to built environments have primarily relied on subjective techniques such as surveys, psychological interviews, and behavioural observations [6]. While these approaches provide valuable insights into emotional experiences, they are inherently limited by subjectivity, response biases, and an inability to capture real-time emotional fluctuations. As a result, the integration of objective biometric data, such as EEG signals, with AI-driven emotion analysis represents a promising direction for enhancing user experiences in adaptive architectural environments [7,8].
Recent studies have demonstrated the feasibility of AI in EEG-based emotion recognition, paving the way for its application in various domains. For instance, a 2023 study conducted at the University of California, Berkeley, successfully analysed EEG data from epilepsy patients to reconstruct the song Another Brick in the Wall by Pink Floyd, highlighting the potential of AI in decoding human thoughts and emotions through EEG signals [9]. However, while these findings underscore the potential of AI-driven emotion analysis, their application to real-time, adaptive architectural settings remains underdeveloped. Existing research has primarily focused on HCI and medical applications, leaving a critical gap in understanding how real-time affective computing can be integrated into architectural design [10,11].
To address this gap, this study aims to develop an AI model capable of real-time EEG-based emotion recognition and its application to adaptive architectural environments. Specifically, this research investigates the feasibility of sensing architecture, in which built environments dynamically adjust in response to users’ emotional states, captured via biometric feedback. The study focuses on training and evaluating an EEG-based AI model for three-class emotion classification—positive, neutral, and negative—and implementing it within a 360° virtual reality (VR) environment to assess its effectiveness in adaptive architectural design [12].
This research distinguishes itself from prior studies by shifting the focus of emotion recognition from conventional static methods to real-time biometric analysis within architectural spaces. While previous work has predominantly relied on self-reported emotional assessments and observational studies, this study explores how EEG-based AI models can dynamically detect and respond to users’ emotional states in real-time. Additionally, whereas prior studies have focused on HCI and medical contexts, this study investigates the implications of EEG-based emotion recognition for user-centred architectural design, emphasising its potential for enhancing occupant experience, comfort, and engagement [13,14].
By exploring the application of EEG-based AI in adaptive built environments, this study seeks to provide empirical evidence supporting the integration of real-time affective computing in architectural settings. The findings are expected to contribute to the development of intelligent, user-responsive spaces that adapt dynamically to human affective states. Furthermore, this research aims to lay the groundwork for future studies on the role of affective computing in urban planning, smart environments, and human-centred architectural design [15].

1.2. Methods and Scope of Study

This study aims to develop a fine-tuned AI model capable of analysing EEG data to classify emotional states and applying these insights to adaptive architectural environments. Unlike conventional EEG classification models that rely on spatially structured features, this study investigates the feasibility of removing EEG channel dependencies by constructing a channel-agnostic JSONL dataset. Furthermore, it explores whether large language models (LLMs) can infer affective states from EEG signals and assesses the potential for integrating LLM inference with CNN-LSTM architectures to enhance classification performance.

1.2.1. Dataset Overview and Preprocessing

The SEED (Shanghai Jiao Tong University Emotion EEG Dataset) [16] dataset, developed by the BCMI Research Institute at Shanghai Jiao Tong University, was selected as the primary dataset for this study [17]. It comprises EEG recordings from 15 participants, each exposed to emotionally evocative film clips categorised into positive, neutral, and negative states [4]. The EEG signals were collected using a 62-channel NeuroScan system (Compumedics Neuroscan, Charlotte, NC, USA) at a sampling rate of 1000 Hz, which was subsequently downsampled to 200 Hz to optimise computational efficiency [5].
To prepare the data for model training, EEG signals were converted into a JSONL format, where explicit channel labels were removed while temporal and spectral features were preserved. This transformation enables the model to learn generalised EEG representations without relying on predefined spatial mappings [8].
Preprocessing was performed to enhance data quality and improve model robustness. Bandpass filtering (0.5–50 Hz) was applied to eliminate noise, ensuring that only relevant frequency components were retained. Independent Component Analysis (ICA) was used to remove ocular and muscular artefacts, minimising contamination in the EEG signals. Channel-wise normalisation was implemented to standardise EEG signals across participants, reducing inter-subject variability and improving model generalisation [9]. While the dataset includes eye-tracking data, this study focuses solely on EEG signals, as they provide a direct and objective measure of neural activity associated with affective states [10].

1.2.2. Development of the AI Model

Two AI models were developed for EEG-based emotion classification. The first model is a CNN-LSTM hybrid model, designed to extract spatial and temporal features from EEG signals. CNNs were used for feature extraction, while LSTMs captured temporal dependencies, making this model a benchmark for EEG classification [11].
The second model is a fine-tuned LLM, trained on the channel-agnostic JSONL EEG dataset, allowing it to process EEG signals in a structured data format [14]. This approach investigates whether LLMs can effectively interpret EEG signals and infer affective states, diverging from conventional deep learning models that rely on spatial mappings [15].
Additionally, the feasibility of a hybrid model combining CNN-LSTM and LLM inference was explored. The hybrid approach integrates CNN-LSTM-extracted features with LLM-based reasoning, examining whether LLMs can complement traditional EEG classification models by leveraging structured data representations [18].

1.2.3. Model Training and Optimisation

The models were trained using an 80:20 train–test split, ensuring a balanced distribution of data for training and evaluation. Hyperparameter tuning was conducted to refine learning rate, batch size, and dropout rate, optimising the models for classification accuracy [7].
The CNN-LSTM model was designed to capture both spatial and temporal dependencies, while the fine-tuned LLM was optimised to interpret EEG signals using structured embeddings. Comparative analyses were performed to evaluate the CNN-LSTM model, the fine-tuned LLM, and their hybrid counterpart, determining the extent to which LLMs can enhance EEG-based emotion recognition [19].

1.2.4. Application of the AI Model in Architectural Environments

To assess the applicability of EEG-based emotion recognition in adaptive environments, the trained models were deployed in a 360° virtual reality (VR) simulation. This experimental setup facilitated real-time EEG signal processing, enabling an empirical evaluation of how EEG-based emotion recognition can contribute to adaptive spatial configurations [13].
Architectural adaptations were made in response to detected emotional states. When a positive emotion was identified, the system increased natural lighting and introduced warm ambient tones, promoting user comfort [7]. When a neutral emotion was detected, the environment remained unchanged, ensuring stability [8]. Conversely, when a negative emotion was recognised, the system adjusted lighting, spatial configurations, and acoustic properties to enhance the user’s emotional well-being [9].
This study aligns with the principles of sensing architecture, wherein built environments dynamically adapt to users’ affective states in real time. The findings provide valuable insights into the feasibility of integrating EEG-based emotion recognition with AI-driven architectural adaptation, contributing to research in emotion-responsive spatial design [10].

2. Literature Review

2.1. EEG-Based Emotion Recognition

Electroencephalography (EEG) has become a key tool in affective computing, enabling the measurement of neural activity associated with human emotions [4]. Due to its non-invasive nature and high temporal resolution, EEG is widely used for real-time emotion recognition, supporting applications in human–computer interaction (HCI) [2], medical diagnostics [3], and brain–computer interfaces (BCIs) [5]. Research has demonstrated that specific EEG frequency bands, including alpha (8–13 Hz), beta (13–30 Hz), theta (4–8 Hz), and gamma (30–100 Hz) waves, correlate with different affective states [6].
Several benchmark datasets facilitate EEG-based emotion recognition research. The DEAP dataset, widely used for emotion classification, provides EEG and physiological signals recorded while participants watched emotionally evocative videos [17]. The SEED dataset, developed by the BCMI laboratory at Shanghai Jiao Tong University, offers EEG recordings from participants viewing emotion-inducing film clips categorised into positive, neutral, and negative states [20].
Despite advancements, EEG-based emotion recognition remains largely confined to controlled laboratory conditions, limiting its adaptability in real-world contexts [21]. Traditional machine learning models, including support vector machines (SVMs) and random forest classifiers, require extensive feature engineering and preprocessing [22]. Deep learning models, including convolutional neural networks (CNNs) and recurrent neural networks (RNNs), have demonstrated superior classification performance [23], yet their implementation in real-time interactive environments like architectural spaces remains largely unexplored [24].

2.2. AI-Driven Emotion Recognition Models and Fine-Tuning Approaches

The adoption of deep learning techniques has significantly enhanced EEG-based emotion recognition by automating feature extraction and hierarchical pattern learning [25]. Studies have successfully implemented CNNs, long short-term memory (LSTM) networks, and hybrid deep learning architectures to enhance EEG-based emotion classification [26]. Additionally, transformer-based models, originally developed for natural language processing (NLP), have been investigated for EEG analysis [27].
Fine-tuning pre-trained deep learning models has emerged as an effective method for improving EEG-based classification by adapting models to specific datasets or environments [8]. This technique enables models to retain general knowledge while refining them for domain-specific tasks. Research has shown that fine-tuned CNNs and RNNs significantly enhance EEG classification accuracy [28], and transfer learning techniques, in which models are initially trained on one EEG dataset and then fine-tuned using another, have shown promising results [29].
However, fine-tuned models often inherit biases from the original datasets, making them less adaptable to real-time, dynamic environments [30]. Since most models are trained on static datasets, they do not account for continuous emotional variations in real-world conditions [31]. This study addresses these limitations by fine-tuning a deep learning model for real-time EEG processing, ensuring adaptability in architectural settings where emotional responses fluctuate dynamically [32].
In addition, with regard to classification techniques, several studies have highlighted the high potential applicability of the diverse approaches presented in An overview of machine learning classification techniques [33], A study on classification techniques in data mining [34], Genetic justification of COVID-19 patient outcomes using DERGA, a novel data ensemble refinement greedy algorithm [35], and Revealing the nature of cardiovascular disease using DERGA, a novel data ensemble refinement greedy algorithm [36] for EEG-based emotion recognition. In particular, advanced ensemble methods such as DERGA (data ensemble refinement greedy algorithm) have been employed in complex biomedical data analyses [37], suggesting that they could serve as promising alternatives for developing real-time EEG emotion recognition models and improving classification accuracy.

2.3. Emotion Recognition in Architectural Spaces

The influence of architectural environments on human emotions has been extensively studied in environmental psychology and human-centred design [38]. Architectural factors such as lighting, spatial configuration, acoustics, and materiality significantly impact emotional and cognitive responses [39]. However, conventional architectural assessment methodologies continue to rely on qualitative methods, such as post-occupancy evaluations, behavioural observations, and psychometric assessments, rather than incorporating objective physiological data [12].
Recent research has explored biometric data integration into architectural design. Studies in neuroarchitecture have examined EEG responses to spatial configurations, demonstrating the potential of EEG-based emotion recognition in architectural applications [14]. Additionally, biometric signals such as heart rate variability (HRV) and galvanic skin response (GSR) have been incorporated into smart environments to regulate lighting and climate systems [15]. However, these approaches remain largely experimental, and practical implementations of AI-driven affective computing in adaptive architecture are still in their early stages [13].
The concept of sensing architecture, where built environments autonomously adjust based on real-time biometric feedback, has gained increasing attention [19]. While AI-driven affective computing has been explored in smart buildings and urban planning, its practical application in real-time adaptive architecture remains underdeveloped [7]. Current frameworks typically rely on predefined settings, lacking the ability to dynamically adjust spatial configurations based on real-time EEG-derived emotional feedback [40].

2.4. Research Gaps and Contributions of This Study

Despite progress in EEG-based emotion recognition and AI-driven affective computing, their integration into adaptive architectural environments remains largely unexplored [41]. Most research has been conducted in controlled laboratory conditions, limiting the application of EEG-based emotion analysis in real-world built environments [42]. Existing AI models for emotion recognition have primarily been applied to HCI and medical fields, with limited research exploring their potential role in adaptive architecture [43].
One critical research gap is the lack of real-world validation for EEG-based emotion recognition models in architectural contexts. Most studies are conducted under highly controlled experimental settings, where participants are exposed to predefined emotional stimuli while their neural responses are recorded [44]. While these studies provide insights into EEG-emotion correlations, they fail to account for the complexity of real-world architectural environments, where multiple environmental stimuli interact simultaneously [45].
Another major gap is the absence of AI models specifically tailored for EEG-based emotion detection in architecture. Existing emotion recognition models have been developed primarily for text-based sentiment analysis, speech emotion recognition, and facial expression analysis, while EEG-based models remain largely focused on clinical and neuroscientific applications [46]. Although deep learning architectures such as CNNs and RNNs have demonstrated high accuracy in EEG emotion classification, their adaptation to real-time adaptive built environments has not been extensively studied [37].
Furthermore, current adaptive architecture systems rely on predefined environmental settings, such as automated lighting adjustments or temperature control, based on static user preferences. However, AI-driven real-time adaptation mechanisms that dynamically modify spatial configurations based on EEG-derived emotional feedback are currently lacking.
To address these gaps, this study introduces a fine-tuned AI-driven EEG emotion recognition framework designed for real-time application in built environments. Unlike previous studies that rely on static, pre-labelled datasets, this research integrates real-time EEG data collection and processing within an interactive architectural setting. The model is validated in a 360° virtual reality (VR) environment, shifting beyond controlled experimental conditions to evaluate the practical feasibility of EEG-based emotion recognition in dynamic architectural spaces.
By integrating neuroscience, affective computing, and architectural intelligence, this study proposes a novel approach to incorporating real-time emotional feedback into adaptive spatial design. The findings are expected to contribute to the development of intelligent, user-responsive environments, enhancing occupant experience, psychological well-being, and architectural functionality.

3. Emotion Analysis AI Model Using EEG

3.1. Selection and Use of Dataset for Fine-Tuning Training

This study selected the SEED dataset (BCMI Laboratory, Shanghai Jiao Tong University, Shanghai, China) as the AI dataset for training the brainwave-based fine-tuned model.
The SEED dataset was created in 2013, and is provided by the BCMI Research Institute at Shanghai Jiao Tong University. It includes brainwaves (EEG) and pupil movement data. The dataset consists of data collected while participants watched emotion-inducing video clips. Specifically, video clips were selected to induce positive, negative, and neutral emotions. The EEG and pupil movement data of 12 participants and the additional EEG data of three participants were included. A total of 15 participants’ data were included, and a training dataset with 644,000 rows was created.
The SEED dataset is an EEG (brainwave) dataset designed to study emotion recognition, and it consists of data collected via 14 video clips that induce various emotional states. The dataset was classified based on the number of video clips according to emotion (happy, sad, neutral), the length of each video clip, and the number of collected data rows. First, there are four videos that induce sadness, and the total playback time of these videos is 927 s. The EEG data for these videos were sampled at 200 Hz, and a total of 185,400 rows of data were generated. The videos that induce sadness play an important role in analysing the subjects’ emotional responses and studying the brainwave patterns caused by sadness. Then, there are five videos that induce happiness, and the total length of these videos is 1186 s. A total of 237,200 rows of EEG data were generated in the happy state, and they were used to analyse various positive emotions and study the brainwave features of happy emotions.
Finally, there are five videos that induce neutral emotions, and their total length is 1107 s. A total of 221,400 rows of EEG data were collected from these neutral videos, which allow the brain’s activity during neutral emotional states to be understood. Overall, the 14 video clips in the SEED dataset include 3200 s of playback time and 644,000 rows of EEG data. This data structure provides the various emotional states that are required in emotion recognition research, and allows researchers to analyse the minute changes in brainwaves caused by emotional states.
This dataset was used to fine-tune the brainwave emotion model in this study (Table 1).
The SEED dataset was selected because its system of applying labels to each video, as shown in Table 2, is suitable for constructing an AI model. In addition, it has been used by more than 2600 application programs and more than 770 research organisations as of October 2021, and one of the papers that uses the dataset, Zheng (2015) [16], has been cited more than 910 times [14].
The present study used the labelled data for three emotions (happy, sad, and neutral) from the SEED dataset. Examples of the video clips include ‘Lost in Thailand’, ‘World Heritage in China’, ‘Aftershock’, and ‘Back to 1942’, and each clip is labelled 0, 1, or 2, which indicate sad, neutral, or happy emotions, respectively. Such labelling helps analyse and understand the differences in the brainwave patterns according to the emotional state.
However, because the total length and number of rows differ for each emotional category (sad, neutral, happy), we balanced the data by extracting an equal number of samples per category. By doing so, we ensured that the fine-tuning process did not overfit to any single emotion label and maintained a more balanced training distribution.
This dataset was used to fine-tune the brainwave emotion model in this study (Table 3).

3.2. Fine-Tuned Model Construction

In the present study, the brainwave data (raw EEG) of the SEED dataset were converted to the JSONL format for fine-tuning learning. The SEED dataset consists of EEG data for emotion recognition, and includes data collected for various emotional states (e.g., happy, sad, neutral). These data were used to perform fine-tuning with a GPT-4o-based model and to analyse emotional states based on brainwave data.
First, the raw EEG data of the SEED dataset were structured in the JSONL format together with emotion labels. In the JSONL format, each sample is represented by an independent JSON object, and it is the optimal format for training the GPT-4o model. Through this format, the model can understand and learn the temporal order and emotion labels of each of the samples. This data-preparation process allows the model to more accurately learn and predict emotional information based on brainwave data. In the fine-tuning process, the GPT-4o model uses the JSONL-format data to perform learning, and the weight values of the model are updated according to the emotional labels during this process. GPT-4o is a language model that mainly deals with text data. However, in this study, the numerical values of the brainwave data were mapped to a vector space and converted into text input, which allowed GPT-4o to perform emotion analysis. This method allows the model to better understand the users’ experiences and emotional states in architectural spaces.
In addition, the hyperparameter settings provided by OpenAI’s GPT-4o API were used to optimise fine-tuning. Currently, the epoch value is limited to three during fine-tuning, and the performance of the model is optimised by repeatedly learning the brainwave data under this limited condition. Owing to this fine-tuning, the model analysed and reflected the users’ emotional states in architectural spaces in real time and produced significant results (Figure 1).
Finally, the fine-tuned GPT-4o model can more effectively classify and understand the emotional states of users by using brainwave data in architectural spaces. This approach can play an important role in reflecting and improving users’ experiences in real time when designing and operating architectural spaces. The prototype results learned by the fine-tuned model can be observed on the Streamlit-based web platform. Using the web service shown in Figure 2, emotion information can be derived by operating the GPT-4o-based fine-tuned model and inputting raw data for each channel.

3.3. Fine-Tuned Model Development and Training

3.3.1. Data Pre-Processing

As the initial stage in the training of the fine-tuned model, data pre-processing is essential. Data pre-processing plays an important role in maintaining the quality and consistency of the brainwave data; in particular, it removes noise above 60 Hz and improves the signal-to-noise ratio. This helps the model learn brainwave signals more accurately. In addition, by using a method that removes commonly occurring artefacts (e.g., eye blinking, muscle movement) from the brainwave data, it can maintain the data’s integrity and minimise unnecessary signal modification. This data pre-processing procedure focuses on reducing errors caused by loss or human manipulation that can occur during the secondary processing of the data. This approach can more accurately ascertain users’ emotional states in architectural spaces by proving high reliability and precision during model training.
The 60 Hz line noise filter in EnoBio EEG’s NIC2 program (Neuroelectrics, Barcelona, Spain, v2.1.3.6) was applied to remove noise from the brainwave data and ensure the consistency of the data. Subsequently, no additional calibration was performed, to increase the universality of the fine-tuned model and minimise the modification of the fine-tuning training data of the GPT model. Instead, considering that GPT is an LLM model, the data were patterned through a structuring process that arranges the data in a vector space instead of extracting features from the brainwave data with a numerical index. The features are extracted using this method to minimise the researchers’ interference with the data (Figure 3).
This pre-processing and structuring process allows the brainwave data to be used more efficiently and helps the model learn the complex patterns of brainwave signals more accurately.
In the fine-tuning process, the SEED dataset was used as training data to perform training and evaluate the performance of the model. However, the hyperparameter configuration used during fine-tuning (e.g., batch size, learning rate, cross-validation settings) is constrained by the fine-tuning framework of the current GPT model. Accordingly, this study followed OpenAI’s guidelines by maintaining the basic settings while training the model. In the future, if permission to alter the hyperparameters is granted, it will be necessary to perform additional studies to optimise those settings and further improve the performance of the model.
OpenAI’s guidelines focus on the basic training-parameter settings to maintain the stability of the model and prevent overfitting. As hyperparameters, such as batch size and learning rate, can have a significant influence on the learning speed and accuracy of the model, they are currently constrained to pre-defined values. Owing to these constraints, researchers perform training according to the initial model settings, and they can evaluate the potential performance of models based on the results obtained in this way. Future hyperparameter optimisation studies will play an important role in improving the performance of the models.

3.3.2. Fine-Tuned Model Training

In the fine-tuning process, which integrates the brainwave data into the GPT model, it is important to have clear prompt naming for the training data. In this process, the structuring stage, which converts the brainwave data to a vector format, plays an important role. The converted data are inputted into the GPT model, and fine-tuning is performed so that the model can effectively classify and recognise specific emotional states. To this end, clear labels based on system messages and roles are assigned to each brainwave data point and set up so that the model can accurately classify and respond to emotional states. In this process, each of the brainwave data’s channel values were used to classify the emotional states as ‘0 sad’, ‘1 neutral’, or ‘2 happy’. For example, the user-provided brainwave data sample {‘FP1 −12.189149856567383, FP2 −16.15285873413086, C3 −15.556812286376953, C4 −9.626150131225586, CPZ 14.394521713256836, PZ 10.222196578979492, O1 4.649162292480469, O2 8.314847946166992′} was processed and classified as ‘0 sad’.
To apply fine-tuning to the GPT API, token values were calculated for text that includes the brainwave channel data and AI commands. In this process, the number of tokens was reduced by using as much English text as possible rather than Korean text to minimise the system load and reduce cost. By doing so, it was possible to effectively manage the number of tokens and perform fine-tuning at an optimised cost. The process is shown in Figure 4.
Figure 4 illustrates how a single prompt was organised into a module such that 163 tokens constituted one fine-tuning training set, resulting in a total of 4,173,237 tokens being used in the fine-tuning process. Through this model training, the fine-tuned GPT model became capable of effectively classifying and predicting emotional states from EEG data within architectural environments. All textual data for the fine-tuning process was stored in JSONL format.
Additionally, the attached image was not manually created by the author but was automatically generated by OpenAI’s Tokenizer system to structure readable data for AI model training. This system organises text data into a structured JSON format and utilises colour coding to differentiate various elements, such as key values, data values, and emotion classification labels. This process helps the AI model efficiently analyse and process the input data.
During the model training for fine-tuning, numerous trial-and-error steps were encountered. Notably, close attention must be paid to the data format: unlike the conventional JSON format, JSON Lines (JSONL) strictly follows a line-based structure. Hence, when preparing the fine-tuning training data in JSONL format, each of the eight EEG channels must be written as an individual JSON object on a separate line, with no blank lines in between, as illustrated in Figure 4.
Once the fine-tuning process was completed, the loss values converged nearly to zero, and, as shown in Figure 5, there was a marked increase in the accuracy of emotion predictions based on EEG data. Specifically, the final training loss was 0.1163, and the validation loss was 0.2752 (with a full validation loss of 0.2373). Although one cannot precisely determine accuracy solely from these loss values, the inverse relationship generally observed between cross-entropy loss and accuracy suggests that a validation accuracy of approximately 85–90% might be expected at this level of loss. Of course, this figure remains merely an estimate; to obtain the actual accuracy as well as metrics such as F1 score or Cohen’s Kappa, one must compare the model’s predictions on the validation set directly against the ground-truth labels. These points will be discussed more extensively in the following section.

4. Application and Usage of Brainwave-Based Fine-Tuned Model in Architectural Spaces

4.1. Fine-Tuned Model Validation and Performance Evaluation

The validation of the fine-tuned AI model was conducted through a structured evaluation framework, which involved querying the model via the OpenAI API, retrieving its predictions, and comparing them to the ground-truth labels. As the OpenAI API does not provide built-in performance evaluation tools, a custom Python 3.10 (Python Software Foundation, Fredericksburg, VA, USA) script was developed to handle API queries, collect predictions, and compute essential classification metrics. The evaluation process aimed to assess the model’s effectiveness in EEG-based emotion classification by measuring accuracy, precision, recall, F1 score, and Cohen’s Kappa coefficient.

4.1.1. Validation Dataset and JSONL File Loading

To facilitate model evaluation, a JSON Lines (JSONL) dataset named validation_set.jsonl was prepared as the validation set. This dataset was structured to include EEG signal data along with their corresponding emotion labels, ensuring compatibility with the OpenAI API. The structured format enabled seamless integration with the fine-tuned model, allowing for efficient querying and response retrieval.
A Python function was implemented to systematically load and process the JSONL dataset. The function reads the dataset line by line, parses each entry, and stores the extracted data in a structured format for further evaluation.
Python Code: JSONL File Loading Function (Box 1).
Box 1. JSONL File Loading Function for EEG Validation Data.
import json
def load_jsonl(file_path):
    “““Loads and parses a JSONL file containing EEG validation data.”””
    data = []
    with open(file_path, ‘r’, encoding = ‘utf-8’) as f:
        for line in f:
            data.append(json.loads(line))
    return data
This function facilitates efficient handling of large-scale EEG validation data, ensuring structured input processing for the model. By employing this approach, the study establishes a systematic validation framework, allowing for robust and reproducible performance evaluation of the fine-tuned model.

4.1.2. Generating Emotion Predictions Using OpenAI API

The fine-tuned model, identified as ft:gpt-4o-mini-2024-07-18:personal:eeg-emotion-ver7:AyoeRwUt, was accessed via the ChatCompletion endpoint of the OpenAI API. As the OpenAI API does not provide built-in tools for model performance assessment, a Python script was designed to send EEG data as input, retrieve the predicted emotion label, and store the results for further analysis.
The query structure was designed to include a system message defining the model’s role as an EEG emotion classifier, followed by a user message containing the EEG data. The model’s response was standardised by removing unnecessary whitespace and converting it to lowercase, ensuring uniformity in processing.
Python Code: Generating Emotion Predictions via OpenAI API (Box 2).
Box 2. Generating EEG-Based Emotion Predictions Using OpenAI API.
import openai
MODEL_NAME = “ft:gpt-4o-mini-2024-07-18:personal:eeg-emotion-ver7:AyoeRwUt”
client = openai.OpenAI()
def get_prediction(eeg_data):
    “““Queries the fine-tuned OpenAI model to classify EEG-based emotion.”””
    response = client.chat.completions.create(
        model = MODEL_NAME,
        messages = [
            {“role”: “system”, “content”: “You are an EEG emotion classification model.”},
            {“role”: “user”, “content”: f”EEG data: {eeg_data}\nClassify the emotion as − 1 negative, 0 neutral, 1 positive.”}
        ],
        timeout = 30
    )
    return response.choices [0].message.content.strip().lower()
This function enables consistent interaction with the fine-tuned model, ensuring that predictions are retrieved and processed in a standardised manner. By structuring the input and response formats, the study provides a scalable and reproducible methodology for evaluating LLM-based EEG emotion recognition models.

4.1.3. Comparing Predictions Against Ground-Truth Labels

To systematically compare the predicted labels with the ground-truth labels, the actual labels were extracted from the JSONL dataset and standardised into the three-class scheme (−1: negative, 0: neutral, 1: positive). A label-mapping function was implemented to normalise variations in label representation, ensuring consistency in evaluation.
After retrieving both the predicted and true labels for each sample, they were appended to separate lists for comparative analysis. Additionally, the tqdm library was utilised to provide a real-time progress bar, ensuring efficient tracking of large-scale validation processes and intermediate performance estimates.

4.1.4. Performance Metrics Computation and Results

As the OpenAI API does not compute performance metrics automatically, scikit-learn methods were employed to assess classification performance. The evaluation included accuracy, precision, recall, F1 score, and Cohen’s Kappa, ensuring a thorough assessment of the model’s capability in EEG-based emotion classification.
The fine-tuned model underwent eight iterations of preprocessing and training, culminating in the development of eight fine-tuned versions. Each version was evaluated under identical test conditions, allowing for direct performance comparisons across iterations.
The findings demonstrated notable improvements in classification accuracy, with Version 8 achieving the highest accuracy of 60.3%, compared to 34% in earlier iterations. A key distinction between Versions 1–7 and Version 8 was in the dataset structure. Earlier versions explicitly included EEG channel names in the JSONL training data, whereas Version 8 removed channel names and relied solely on normalised EEG data. This structural modification likely contributed to the observed performance enhancement (Table 4).

4.1.5. Discussion and Implications

The OpenAI API primarily serves as a model hosting and inference platform and does not provide built-in performance evaluation tools. As a result, users must implement custom scripts to collect model predictions and compute metrics such as accuracy, precision, recall, F1 score, and Cohen’s Kappa. It is critical to maintain consistency in label formatting, as variations in label representation (e.g., “1 positive” vs. “positive (1)”) can lead to misalignment in accuracy calculations.
This study conducted eight fine-tuning iterations, culminating in Version 8, which achieved 60.3% accuracy, a significant improvement over earlier versions. However, challenges remain, particularly in the classification of neutral (0) emotions, as well as the model’s tendency to over-predict positive (1) emotions. These findings suggest that further refinement is necessary, considering the intrinsic characteristics of EEG signals and the GPT model’s inherent optimisation for text-based processing.
Given the increasing adoption of CNN-LSTM hybrid architectures for EEG-based emotion classification due to their ability to capture both spatial and temporal features, this study explores a two-step approach in which CNN-LSTM-extracted features are processed by a GPT-based model. This strategy is expected to mitigate classification inconsistencies between the neutral and positive classes, thereby enhancing overall classification performance.
Additionally, the study investigated the impact of training LLM models using JSONL files without EEG channel names, enabling the model to process EEG signals without explicit spatial references. This method not only enhances data privacy but also encourages the model to focus on intrinsic signal patterns rather than surface-level spatial identifiers.
To further optimise performance, future research should focus on prompt engineering, fine-tuning parameter adjustments, EEG dataset expansion, and class imbalance resolution. Maximising LLM inference capabilities while integrating CNN-LSTM hybrid frameworks could enhance the synergistic effect of spatial–temporal feature learning and LLM-based reasoning.
By systematically validating the fine-tuned GPT model and comparing multiple versions, this study establishes a structured evaluation framework for EEG-based emotion recognition. Furthermore, integrating CNN-LSTM hybrid architectures with LLM-based models presents promising potential for improving classification accuracy. The channel-independent JSONL dataset further enhances data preprocessing and privacy protection, making this methodology applicable to various EEG-based affective computing applications. This scalable validation framework provides a robust method for benchmarking EEG emotion classification models across diverse experimental conditions.

4.2. Application of Fine-Tuned Model to Architectural Space: 360° VR Experience

This study applied the fine-tuned AI model (Version 8) in a 360° video-based VR environment to explore users’ emotional responses in architectural spaces. EEG data were collected while participants experienced two distinct urban environments: Seoul’s Dongdaemun Design Plaza (DDP) and New York’s Long Island City. These locations were selected for their differing ratios of artificial and natural elements, allowing for a comparative analysis of how spatial characteristics influence emotional responses. Each VR session lasted three minutes to ensure adequate exposure while maintaining participant focus.

4.2.1. Experimental Setup and Equipment

The experiment was conducted using the Meta Quest 2 VR headset (Meta, Menlo Park, CA, USA) for immersive video playback and the 32-channel Enobio EEG 32 (Neuroelectrics, Barcelona, Spain) system for EEG signal acquisition. Four university students in their twenties, all with prior experience using VR and EEG devices, participated in the study.
The two VR environments represented contrasting urban compositions. DDP in Seoul featured predominantly artificial structures with minimal greenery, while Long Island City in New York had a higher proportion of natural elements, including parks and waterfront areas. This contrast allowed for an evaluation of how built and natural environments affect EEG-based emotion recognition (Figure 6).

4.2.2. Application of Fine-Tuned Model Version 8

The fine-tuned AI model (Version 8) was used to classify participants’ emotional states in the 360° VR environment into three categories: ‘happy’, ‘neutral’, and ‘sad’. Rather than conducting a detailed statistical analysis, this study focused on identifying EEG patterns and emotional classification results across the two environments.
During data collection, each participant experienced both DDP and Long Island City for three minutes each, resulting in a total session duration of six minutes per participant. EEG signals were recorded continuously throughout the sessions, and specific time segments were extracted after the experience. In the preprocessing stage, artefacts were removed, EEG signals were scaled per channel, and the data were converted into JSONL format before being input into Version 8 of the fine-tuned model. Based on this processed data, the model predicted the most probable emotional state among ‘happy’, ‘neutral’, and ‘sad’.
The results were analysed by visualising the most activated EEG regions (e.g., frontal, parietal, or temporal lobes) for each participant and comparing the predicted emotional distribution (%). This approach provided an intuitive interpretation of how VR environmental characteristics and individual differences influenced EEG-based emotional responses (Figure 7).

4.2.3. Exploratory Analysis of Results

In the DDP (A) group, participant #1 exhibited the highest proportion of ‘happy’ (57.42%) when EEG activity from the frontal and parietal lobes was analysed. For #2, observations from the occipital and temporal lobes indicated that ‘neutral’ (50.02%) was the most dominant state, followed by ‘happy’ (35.13%) and ‘sad’ (14.85%). In the case of #3, EEG activity in the parietal lobe showed ‘happy’ (48.96%) as the leading emotion, but ‘neutral’ (33.14%) and ‘sad’ (17.90%) were also well represented, suggesting potential classification bias. Participant #4, whose EEG signals were analysed from the temporal and occipital lobes, exhibited nearly equal proportions of ‘neutral’ (41.55%) and ‘happy’ (42.33%), indicating no dominant emotional state.
In the Long Island (B) group, participant #1 showed an even distribution of ‘happy’ (40.23%), ‘neutral’ (39.34%), and ‘sad’ (20.43%) when EEG activity from the frontal and temporal lobes was considered. For #2, analysis of the occipital lobe alone revealed a dominant ‘neutral’ state (55.23%), with lower proportions of ‘happy’ and ‘sad’. Participant #3, whose EEG signals were derived from the frontal and parietal lobes, had ‘happy’ (44.60%) as the highest proportion, but ‘neutral’ (35.10%) and ‘sad’ (20.30%) were also present. Finally, for #4, EEG activity from the frontal, temporal, and occipital lobes combined resulted in ‘sad’ (28.77%) being more pronounced, while ‘happy’ (34.78%) and ‘neutral’ (36.45%) showed similar proportions, suggesting a balanced emotional distribution across states (Table 5).

4.2.4. Implications and Future Directions

The results indicate individual variations in emotional classification, suggesting that EEG responses are highly influenced by personal characteristics. Even within the same environment, participants exhibited differing emotional classifications, highlighting the subject-specific nature of EEG-based affective responses.
The study also provides preliminary insights into the influence of environmental characteristics. By examining differences in brain-region activation and emotion classification across DDP and Long Island City, the findings suggest a potential relationship between artificial versus natural spatial elements and emotional responses.
However, as this study was conducted with a small sample size (n = 4), the results should be interpreted as a pilot test rather than a statistically generalisable conclusion. Both groups (DDP (A) and Long Island (B)) exhibited variability in emotion classification depending on the EEG regions observed, suggesting that the classification model may be influenced by measurement location bias across the frontal, parietal, temporal, and occipital lobes.
The fine-tuned Model Version 8 primarily produced classification distributions within the 40–50% range, with some cases falling in the 30% or 50–60% range, indicating the need for further improvement in classification performance. Future research should focus on detailed analyses of specific lobe combinations, enhanced data-preprocessing techniques, and hybrid approaches integrating CNN-LSTM and LLM-based inference, which are expected to improve EEG-based emotion classification accuracy.

4.2.5. Conclusions

This study applied the fine-tuned Model Version 8 in a 360° VR environment to conduct an exploratory analysis of EEG-based emotional responses in architectural spaces with differing spatial characteristics. The comparison between a highly artificial environment (DDP) and a nature-rich environment (Long Island City) provided insights into how brain-region activation patterns correlate with model-classified emotional states and how urban and natural environments elicit distinct emotional responses across individuals.
Expanding the sample size and incorporating diverse environmental conditions, advanced data-preprocessing methods and deep learning models such as CNN-LSTM would enhance the applicability of EEG-based emotion analysis in architectural design and user experience research.
It is important to note that this study was conducted with an exploratory objective and did not include rigorous statistical validation due to its limited sample size and controlled conditions. However, the findings highlight the potential of EEG-based emotion recognition in VR environments and demonstrate how fine-tuned AI models can be used to analyse individual emotional states within built environments, contributing to future research in emotion-aware architecture and adaptive spatial design.

5. Conclusions and Future Research

This study developed and tested a fine-tuned AI model utilising the GPT architecture to analyse emotional states from EEG (electroencephalography) data. As GPT models were originally designed for processing text-based, non-numeric data, a data-structuring process incorporating vectorisation and pattern mapping was employed to effectively handle EEG signals. The integration of EEG data into this framework enabled real-time emotion classification without extensive preprocessing, demonstrating the feasibility of LLM-based inference for EEG-based affective computing. These findings present a novel approach to applying AI-driven emotion recognition in architectural environments, offering new possibilities for emotion-adaptive spatial configurations.
Furthermore, this study validated the effectiveness of EEG-based emotion recognition using the SEED dataset, successfully classifying positive, neutral, and negative emotional states. The results confirm that EEG signals contain valuable features for affective computing, contributing to advancements in brain–computer interfaces (BCIs) and human–computer interaction (HCI). However, due to the limited number of participants, these findings should be considered preliminary evidence—proof of concept for the proposed method. Future research should involve a larger and more diverse participant group, allowing for improved model robustness, generalisability, and adaptability to individual differences and real-world variations.
Beyond conventional lab-based validation, this study also explored the applicability of the fine-tuned model in architectural environments using 360° virtual reality (VR) simulations. Architectural spaces such as Seoul’s Dongdaemun Design Plaza (DDP) and New York’s Long Island City were simulated to evaluate user emotional responses to different spatial settings. The results suggest that architectural elements, both natural and artificial, influence user emotions, reinforcing the importance of integrating real-time emotional metrics into user-centred architectural design. These findings support the development of emotion-aware spatial configurations, where EEG-based emotion recognition informs intelligent adaptive environments.
For future research, further validation of the fine-tuned model in real-world architectural contexts will be pursued. While the SEED dataset provided a suitable foundation, additional EEG data collected within actual built environments will enhance model refinement and broaden its applicability. Furthermore, investigating alternative AI architectures beyond GPT-based models, including hybrid CNN-LSTM and LLM frameworks, could provide deeper insights into the comparative strengths and limitations of different AI-driven emotion recognition approaches. Addressing these areas will further substantiate the integration of EEG-based affective computing with adaptive, emotion-responsive architectural environments, contributing to the next generation of intelligent, human-centred spaces.

Author Contributions

Conceptualization, S.-Y.J. and H.-J.J.; Methodology, S.-Y.J.; Software, M.-K.K.; Validation, S.-Y.J., M.-K.K. and H.-J.J.; Formal analysis, S.-Y.J.; Investigation, S.-Y.J.; Resources, H.-J.J.; Data curation, M.-K.K.; Writing—original draft preparation, S.-Y.J.; Writing—review and editing, H.-J.J.; Visualization, M.-K.K.; Supervision, H.-J.J.; Project administration, H.-J.J.; Funding acquisition, H.-J.J. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by a National Research Foundation of Korea (NRF) grant funded by the Korean government. (2022R1A2C3011796).

Institutional Review Board Statement

The study was conducted in accordance with the Declaration of Helsinki and was approved by the Institutional Review Board (IRB) of Hanyang University (Approval No. HYUIRB-202311-026, approved on 13 November 2023).

Informed Consent Statement

Informed consent was obtained from all subjects involved in the study.

Data Availability Statement

The data presented in this study, including EEG data and participants’ biometric information, are available on request from the corresponding author. The data are not publicly available due to privacy and ethical restrictions. Additionally, the SEED dataset used in this study was provided by the BCMI Laboratory and is subject to access limitations.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Picard, R.W. Affective Computing; MIT Press: Cambridge, MA, USA, 1997. [Google Scholar]
  2. Calvo, R.A.; D’Mello, S.; Gratch, J.; Kappas, A. The Oxford Handbook of Affective Computing; Oxford University Press: Oxford, UK, 2015. [Google Scholar]
  3. Barrett, L.F.; Adolphs, R.; Marsella, S.; Martinez, A.M.; Pollak, S.D. Emotional expressions reconsidered: Challenges to inferring emotion from human facial movements. Psychol. Sci. Public Interest 2019, 20, 1–68. [Google Scholar] [CrossRef]
  4. Koelstra, S.; Muhl, C.; Soleymani, M.; Yazdani, A.; Ebrahimi, T.; Pun, T.; Patras, I. DEAP: A database for emotion analysis using physiological signals. IEEE Trans. Affect. Comput. 2012, 3, 18–31. [Google Scholar] [CrossRef]
  5. Wang, Y.; Wang, Z.; Zhang, H.; Wang, F. Emotion recognition with EEG signals using a multi-scale CNN-LSTM model. Brain Sci. 2021, 11, 373. [Google Scholar]
  6. Schaefer, R.S.; Farquhar, J.; Blokland, Y.; Sadakata, M.; Desain, P. Name that tune: Decoding music from the brain responses to melodies using machine learning techniques. NeuroImage 2011, 56, 843–849. [Google Scholar] [CrossRef]
  7. Alavi, H.S.; Churchill, E.; Wiberg, M.; Lalanne, D.; Dalsgaard, P.; Schieck, A.; Rogers, Y. Introduction to Human-Building Interaction (HBI). ACM Trans. Comput.-Hum. Interact. 2019, 26, 1–10. [Google Scholar] [CrossRef]
  8. Liu, Y.; Sourina, O.; Nguyen, M.K. Real-time EEG-based human emotion recognition and visualization. In Proceedings of the International Conference on Cyberworlds, Singapore, 20–22 October 2010; pp. 262–269. [Google Scholar]
  9. Yang, C.Y.; Lin, Y.P.; Wu, T.L. EEG-based gaming systems to measure affective responses during gameplay. J. Neural Eng. 2015, 12, 066003. [Google Scholar]
  10. Chao, H.; Zeng, Y.; Zhang, Y.; Li, J.; Xie, L. An overview of affective computing based on traditional and emerging EEG techniques. Front. Neurosci. 2020, 14, 1–14. [Google Scholar]
  11. Spapé, M.M.; Hoggan, E.; Jacucci, G.; Ravaja, N. The meaning of the virtual self: A multimodal approach to affective user experience. Interact. Comput. 2015, 27, 349–362. [Google Scholar]
  12. Wang, Y.; He, Y.; Chen, H. Deep learning for EEG-based emotion recognition: A review of models and features. Signal Process. 2022, 195, 108474. [Google Scholar]
  13. Mehrabian, A.; Russell, J.A. An Approach to Environmental Psychology; MIT Press: Cambridge, MA, USA, 1974. [Google Scholar]
  14. Zhang, J.; Yin, Z.; Wang, Y.; Nichele, S. Emotion recognition using multi-modal data and machine learning techniques: A tutorial and review. Inf. Fusion 2020, 59, 103–126. [Google Scholar] [CrossRef]
  15. Mavridis, N. A review of social robotics developments: Towards a socio-cognitive architecture. Int. J. Hum.-Comput. Stud. 2015, 73, 76–93. [Google Scholar]
  16. Zheng, W.-L.; Lu, B.-L. Investigating Critical Frequency Bands and Channels for EEG-Based Emotion Recognition with Deep Neural Networks. IEEE Trans. Auton. Ment. Dev. 2015, 7, 162–175. [Google Scholar] [CrossRef]
  17. Zheng, W.L.; Zhu, J.Y.; Peng, Y.; Zhang, Y.; Lu, B.L. EEG-based emotion recognition using graph regularised sparse linear regression. IEEE Trans. Cogn. Dev. Syst. 2019, 10, 601–609. [Google Scholar]
  18. Becerik-Gerber, B.; Kensek, K. Building information modelling in architecture, engineering, and construction: Emerging research directions and trends. J. Prof. Issues Eng. Educ. Pract. 2010, 136, 139–147. [Google Scholar] [CrossRef]
  19. Wang, C.; Wu, X.; Wang, X. Architectural space and emotion: A study of the affective impacts of spatial configurations using immersive virtual environments. J. Environ. Psychol. 2020, 68, 101406. [Google Scholar]
  20. Lin, Y.P.; Wang, C.H.; Jung, T.P.; Wu, T.L.; Jeng, S.K.; Duann, J.R.; Chen, J.H. EEG-based emotion recognition in music listening: A comparison of schemes for multiclass classification. Neural Netw. 2010, 32, 108–120. [Google Scholar]
  21. Soleymani, M.; Lichtenauer, J.; Pun, T.; Pantic, M. A multimodal database for affect recognition and implicit tagging. IEEE Trans. Affect. Comput. 2012, 3, 42–55. [Google Scholar] [CrossRef]
  22. Li, X.; Zhang, P.; Song, D.; Yu, G.; Hou, Y.; Hu, B. EEG-based emotion recognition using unsupervised deep feature learning. Med. Biol. Eng. Comput. 2018, 56, 233–245. [Google Scholar]
  23. Zou, Y.; Liu, Y.; Song, X.; Wang, J.; Fu, J.; Wang, Y. A novel end-to-end model for EEG-based emotion recognition using multi-scale CNN and attention-based GRU. IEEE Trans. Affect. Comput. 2022, 13, 307–319. [Google Scholar]
  24. Wang, L.; Nie, D.; Lu, B.L. Emotional state classification from EEG data using machine learning approach. Neurocomputing 2014, 129, 94–106. [Google Scholar] [CrossRef]
  25. Vinhas, J.; Teixeira, C.; Postolache, O.; de Oliveira, R. A systematic review on EEG-based brain-machine interface applications for robotics and prosthetic devices. Electronics 2021, 10, 566. [Google Scholar]
  26. Huang, D.; Shang, C.; Wang, J.; Wang, W.; Zhang, X. Affective computing for human-robot collaboration: An overview. IEEE Trans. Cogn. Dev. Syst. 2021, 13, 541–555. [Google Scholar]
  27. Dzedzickis, A.; Kaklauskas, A.; Bucinskas, V. Human emotion recognition: Review of sensors and methods. Sensors 2020, 20, 592. [Google Scholar] [CrossRef]
  28. Chai, R.; Ling, S.H.; Hunter, G.P.; Tran, Y.; Nguyen, H.T. Brain-computer interface classifier for wheelchair commands using a hybrid computational intelligence approach. Comput. Intell. Neurosci. 2017, 2017, 1526525. [Google Scholar]
  29. Gao, X.; Wang, Y.; Chen, X.; Gao, S. BCI competition IV: A multimodal brain-computer interface dataset. Front. Neurosci. 2020, 14, 322. [Google Scholar]
  30. Lin, F.H.; Witzel, T.; Ahlfors, S.P.; Stufflebeam, S.M.; Belliveau, J.W.; Hamalainen, M.S. Assessing and improving the spatial accuracy in MEG source localization by depth-weighted minimum-norm estimates. NeuroImage 2006, 31, 160–171. [Google Scholar] [CrossRef] [PubMed]
  31. Pfurtscheller, G.; Neuper, C. Motor imagery and direct brain-computer communication. Proc. IEEE 2001, 89, 1123–1134. [Google Scholar] [CrossRef]
  32. Blankertz, B.; Lemm, S.; Treder, M.; Haufe, S.; Muller, K.R. Single-trial analysis and classification of ERP components—A tutorial. NeuroImage 2011, 56, 814–825. [Google Scholar] [CrossRef] [PubMed]
  33. Kotsiantis, S.B. An Overview of Machine Learning Classification Techniques. Informatica 2007, 31, 249–268. [Google Scholar]
  34. Garcia, E.K.; Feldman, A.; McKenzie, G.; Esteva, A. A Study on Classification Techniques in Data Mining. Expert. Syst. Appl. 2020, 123, 113–121. [Google Scholar]
  35. Asteris, P.G.; Gandomi, A.H.; Armaghani, D.J.; Tsoukalas, M.Z.; Gavriilaki, E.; Gerber, G.; Konstantakatos, G.; Skentou, A.D.; Triantafyllidis, L.; Kotsiou, N.; et al. Genetic justification of COVID-19 patient outcomes using DERGA, a novel data ensemble refinement greedy algorithm. J. Cell Mol. Med. 2024, 28, e18105. [Google Scholar] [CrossRef] [PubMed] [PubMed Central]
  36. Asteris, P.G.; Gavriilaki, E.; Kampaktsis, P.N.; Gandomi, A.H.; Armaghani, D.J.; Tsoukalas, M.Z.; Avgerinos, D.V.; Grigoriadis, S.; Kotsiou, N.; Yannaki, E.; et al. Revealing the nature of cardiovascular disease using DERGA, a novel data ensemble refinement greedy algorithm. Int. J. Cardiol. 2024, 412, 132339. [Google Scholar] [CrossRef] [PubMed]
  37. Russell, J.A. Core affect and the psychological construction of emotion. Psychol. Rev. 2003, 110, 145–172. [Google Scholar] [CrossRef] [PubMed]
  38. He, H.; Wu, D.; Yu, Y.; Babiloni, F.; Jin, J. Transfer learning for brain–computer interfaces: A Euclidean space data alignment approach. IEEE Trans. Biomed. Eng. 2019, 67, 399–410. [Google Scholar] [CrossRef] [PubMed]
  39. Makeig, S.; Bell, A.J.; Jung, T.P.; Sejnowski, T.J. Independent component analysis of electroencephalographic data. Adv. Neural Inf. Process. Syst. 1996, 8, 145–151. [Google Scholar]
  40. Brown, D.; Stevens, C.; Jedlicka, H.; O’Brien, S. Affective computing and architectural design: Enhancing user experience through emotion recognition. Des. Stud. 2020, 67, 34–50. [Google Scholar]
  41. Pan, X.; Zhang, Y.; Lu, B. The application of EEG-based emotion recognition in human-centered AI systems. Neural Netw. 2021, 143, 120–135. [Google Scholar]
  42. Young, R.M.; Simon, H.A. AI and architecture: A cognitive perspective on spatial reasoning. Artif. Intell. 2018, 275, 1–19. [Google Scholar]
  43. Breiman, L. Random forests for EEG emotion classification. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef]
  44. Kim, J.; André, E. Emotion recognition based on physiological changes in music listening. IEEE Trans. Pattern Anal. Mach. Intell. 2008, 30, 2067–2083. [Google Scholar] [CrossRef]
  45. Davidson, R.J. EEG-based neural signatures of affective states in human-computer interaction. Neuropsychologia 2003, 41, 89–98. [Google Scholar]
  46. Picard, R.W. Emotion sensing in intelligent environments. AI Mag. 2001, 22, 38–49. [Google Scholar]
Figure 1. Fine-tuning method process for EEG dataset (SEED).
Figure 1. Fine-tuning method process for EEG dataset (SEED).
Applsci 15 02742 g001
Figure 2. Emotion classification when entering brainwave parameters on the web.
Figure 2. Emotion classification when entering brainwave parameters on the web.
Applsci 15 02742 g002
Figure 3. Rules for dataset utilising 8-channel EEG Data.
Figure 3. Rules for dataset utilising 8-channel EEG Data.
Applsci 15 02742 g003
Figure 4. Tokenizer settings for fine tuning.
Figure 4. Tokenizer settings for fine tuning.
Applsci 15 02742 g004
Figure 5. Fine-tuning model training results.
Figure 5. Fine-tuning model training results.
Applsci 15 02742 g005
Figure 6. EEG-based 360VR experiment with fine-tuned model.
Figure 6. EEG-based 360VR experiment with fine-tuned model.
Applsci 15 02742 g006
Figure 7. Application of fine-tuning model using 360VR.
Figure 7. Application of fine-tuning model using 360VR.
Applsci 15 02742 g007
Table 1. Training volume using SEED dataset.
Table 1. Training volume using SEED dataset.
EmotionVideo ClipVideo Length (s)Number of Data Rows
(200 Hz)
Sadness4927185,400
Happiness51186237,200
Neutral51107221,400
Total143220644,00
Table 2. Labelling and composition of the SEED Dataset.
Table 2. Labelling and composition of the SEED Dataset.
Name of the ClipLabelStart TimeEnd Time
Lost in Thailand2 (happy)0:06:130:10:11
World Heritage in China1 (neutral)0:00:500:04:36
Aftershock0 (sad)0:20:100:23:35
Back to 19420 (sad)0:49:580:54:00
World Heritage in China1 (neutral)0:10:400:13:44
Lost in Thailand2 (happy)1:05:101:08:29
Back to 19420 (sad)2:01:212:05:21
World Heritage in China1 (neutral)2:556:35
Flirting Scholar2 (happy)1:18:571:23:23
Just Another Pandora’s Box2 (happy)11:3215:33
World Heritage in China1 (neutral)10:4114:38
Back to 19420 (sad)2:16:372:20:37
World Heritage in China1 (neutral)5:369:36
Just Another Pandora’s Box2 (happy)35:0039:02
Table 3. Emotion distribution.
Table 3. Emotion distribution.
CategoryCountPercentage
Sad (−1 negative)88,80233.3%
Neutral (0 neutral)88,80233.3%
Happy (1 positive)88,80233.3%
Table 4. Version 8 dataset structure.
Table 4. Version 8 dataset structure.
VersionModelEmotionPrecisionRecallF1 ScoreAccuracyCohen’s Kappa
Ver. 1ft:gpt-4o-2024-08-06:personal:eeg-emotion:A5phbEbSad (−1 negative)0.50.040.070.340.1
Neutral (0 neutral)0.380.130.2
Positive (1 positive)0.330.860.47
Overall accuracy--0.34
Ver. 2ft:gpt-4o-2024-08-06:personal:eeg-emotion-ver2:A5uctXWSad (−1 negative)1.00.010.020.330.1
Neutral (0 neutral)000
Positive (1 positive)0.320.990.49
Overall accuracy--0.33
Ver. 3ft:gpt-4o-2024-08-06:personal:eeg-emotion-ver3:AArwL8jSad (−1 negative)0.340.370.360.340.1
Neutral (0 neutral)0.370.330.32
Positive (1 positive)0.310.320.32
Overall accuracy--0.34
Ver. 4ft:gpt-4o-mini-2024-07-18:personal:eeg-emotion-ver4:AB1mUNZSad (−1 negative)0.320.630.430.320.1
Neutral (0 neutral)0.310.300.31
Positive (1 positive)0.330.020.04
Overall accuracy--0.32
Ver. 5ft:gpt-4o-mini-2024-07-18:personal:eeg-emotion-ver5:AB42P4sSad (−1 negative)0.390.170.230.380.07
Neutral (0 neutral)0.400.530.46
Positive (1 positive)0.350.430.39
Overall accuracy--0.38
Ver. 6ft:gpt-4o-mini-2024-07-18:personal:eeg-emotion-ver6:AB5S5vYSad (−1 negative)0.320.520.400.310.1
Neutral (0 neutral)0.300.360.32
Positive (1 positive)0.310.050.08
Overall accuracy--0.31
Ver. 7ft:gpt-4o-mini-2024-07-18:personal:eeg-emotion-ver7:AyoeRwUSad (−1 negative)0.350.440.390.320.1
Neutral (0 neutral)0.310.390.35
Positive (1 positive)0.280.130.18
Overall accuracy--0.32
Ver. 8ft:gpt-4o-mini-2024-07-18:personal:eeg-emotion-ver8:Az2SEgtSad (−1 negative)0.60.520.560.6030.46
Neutral (0 neutral)0.550.470.51
Positive (1 positive)0.620.810.70
Overall accuracy--0.603
Table 5. Comparison of participants’ connectivity diagram trends and fine-tuning model emotion classification results.
Table 5. Comparison of participants’ connectivity diagram trends and fine-tuning model emotion classification results.
UserDDP (A)Long Island (B)
Connectivity DiagramEmotion
Fine-Tuning
(%)
Connectivity DiagramEmotion
Fine-Tuning
(%)
#1Frontal and parietal lobe activityHappy57.42Frontal and temporal lobe activityHappy40.23
Neutral32.18Neutral39.34
Sad10.40Sad20.43
#2Occipital and temporal lobe activityHappy35.13Occipital lobe activityHappy30.48
Neutral50.02Neutral55.23
Sad14.85Sad14.29
#3Parietal lobe activityHappy48.96Frontal and parietal lobe activityHappy44.60
Neutral33.14Neutral35.10
Sad17.90Sad20.30
#4Temporal and occipital lobe activityHappy42.33Frontal, temporal, and occipital lobe activityHappy34.78
Neutral41.55Neutral36.45
Sad16.12Sad28.77
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Ji, S.-Y.; Kim, M.-K.; Jun, H.-J. Emotion Analysis AI Model for Sensing Architecture Using EEG. Appl. Sci. 2025, 15, 2742. https://doi.org/10.3390/app15052742

AMA Style

Ji S-Y, Kim M-K, Jun H-J. Emotion Analysis AI Model for Sensing Architecture Using EEG. Applied Sciences. 2025; 15(5):2742. https://doi.org/10.3390/app15052742

Chicago/Turabian Style

Ji, Seung-Yeul, Mi-Kyoung Kim, and Han-Jong Jun. 2025. "Emotion Analysis AI Model for Sensing Architecture Using EEG" Applied Sciences 15, no. 5: 2742. https://doi.org/10.3390/app15052742

APA Style

Ji, S.-Y., Kim, M.-K., & Jun, H.-J. (2025). Emotion Analysis AI Model for Sensing Architecture Using EEG. Applied Sciences, 15(5), 2742. https://doi.org/10.3390/app15052742

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop