A way of defining a transformation function to map aspects of Large Language model’s architecture to human emotions is by configuring a set of decoding parameters that aligns with certain expressions. Unlike more formal methods where you focus at fine-tuning the transformer’s encoder, this method targets at building a light-weight layer on-top of the decoder block. This is achieved by applying sampling methods to locate certain decoding parameters or coefficients that manipulates the probability distribution over the seen vocabulary scores.
The transformer’s decoders return logit scores for each token or word vocabulary previously seen (or trained) by the language model. Suppose that a prompt defines a user’s input text to the LLM then one way of interpreting the decoder’s output scores is by viewing the logit scores as Conditional Probability distribution where the conditioning feature is the prompt and the user’s emotional intensity, and the decoder’s output as the distribution over the subset of the top set of tokens’ scores.
Marginal Probability Distribution: probability distribution of a subset of random variables from a larger set, obtained by summing or integrating out the other variables. An example problem is finding probability distribution of random variable X from joint probability density distribution P(X, Y).
Conditional Probability Distribution: probability distribution of event A given that event B has already occurred e.g. P(B | A).
The possible methods to my current knowledge for approximating the decoding parameters includes:
Bayesian Learning like MCMC, Importance Sampling. This idea is based on my experience with using ChatGPT (and other LLMs like Phi, GPT variants, and Llama). The text generations are random but still relevant to the user’s prompt i.e. context of discussion, where in this case, you are considering the pair of utterances of represent the conversation’s context rather than the full chat session. This approach relies on the model’s latent space features like attention blocks, hidden embeddings and past key values observed in generating the desired response under alike contexts.
Parameter Estimation Techniques with simulation techniques like Maximum Likelihood Estimation (MLE), Maximum Posteriori (MAP), Least Squares (LSE) or Gradient Descent-based methods with support vector machines. The last two are my favourite methods as its derivation is extended from the construction of Projection matrices. Building intuition for understanding how Support Vector machines work follow the same manner but with multivariable calculus where you adjust the model’s inferences by considering the ellipse axis as the error residuals.
Parameter Estimation Techniques without simulation like Generalized Method of Moments (GMM). While this method seems fun, it is not recommended in practice as its compute costly (requires EM algorithm for approximating the weights). By source: Mikko Ronkko Video: Introductory on GMM in practice, GMM performs more efficiently in theory as oppose to its variants, 2SLS and 3SLS (differs by the assumptions and properties of the weighting matrix estimator in calculation).
In application, either method is useful in learning from the user-based features gathered over a fixed time window. Realistically, humans’ behaviour often change or mature over time so a function in selecting the decoding parameters acts like a temporary placeholder for user’s behaviour when invoking language models’ text generations.
However, some problems arises in the long term usage of these bots. One in particular is unifying the bot’s observations and inferences to fine-tune a language model or multi-modal. Ideally, the target model is one that is unique to the user but not so distinct from its base model, regardless of the trained data version, for example, ChatGPT dataset is trained up to June 2024 – these issues can be easily mitigated with rule-based methods.
The major problem that has coexisted with this project was the planning stage of narrowing down the tasks to smaller goals. Testing hypothesis meant preparing mock datasets and building trust in my imagination that it resonates with most real life scenarios. Though if life has taught me anything, then it would be that all events are relative to the user and their environment.
Gripping onto the conditional aspects of life can only drive me into wanting to discard all current builds, and initialise everything from a physicist’s point of view. Most physicists shares a common way in their planning process. They map their models around the stochastic nature of their samples. If they also share interest in biology, then they would prefer Bayesian inferencing methods to navigate themselves around the laws of casualty. This chain of thought in model planning distinguishes a Physicist’s research paper from the rest. Unlike the other researchers, most ideas from Physicists aren’t applicable and I guess this is because the world hasn’t reached that sort of stage of advancement yet. All we can really do is hope to live long enough to watch their papers come to life.
Part of me prefers this way of modelling simply because: If the highest certainty in your data sample is the existence of error residuals between your observing windows – regardless of any state of inference, then what is there to lose in starting with the unknown?
When we meet someone new, our mind instinctively tries to compare them to people we have encountered in the past. We consider their patterns to cluster them into the region where people equip the most similar behaviour – or patterns – in how they talk, act or perceive. Rather than taking the risk of evaluating them entirely from scratch, we rather use these metrics to navigate our trust and relationship expectations. It is as if our brain’s background process is an unsupervised classification model that sorts individuals into the most relevant relationship archetypes we have built over time – then later decides our compute subscription plan is no longer valid after a certain age.
This post details on replicating the human’s mind into setting up the system design behind Naomi. Docker SDK was used to containerize Naomi application and served over hugging face space. For the sake of convenience the datasets, prompt templates and chat sessions uses Hugging Face dataset repo card. The following table outlines the models setup during the application’s build process.
Models – Specifies whether the model are tinkered by me or not.
Type of Models – Lists the large language model (LLM) and classifiers imported / built during the setup.
Type of Dataset Used for Training – Lists the links to the Hugging Face dataset repositories that were used in training the models.
Setting up the chat session for Naomi is extremely similar to mocking an episodic game for an agent in a reinforcement learning environment. On top of Naomi’s build, I was also trying to build a base framework for other conversational agents. This involves using Docker SDK to containerize the application so that it can be easily deployed, extend and integrate with other specifications of the agents.
Referring to Tom as the conversational agent in production and Naomi as the discussed chatbot in this post, the following table compares the agents’ environment’s variables.
Component
Formal Definition
Definition in Naomi’s Application (per component)
Definition in Tom’s Application (per component)
Agent
The entity that interacts with the environment and learns to maximize rewards.
Naomi
The human’s best friend, Tom (or a different name can be used)
Environment
External system where agent interacts, receive states and rewards based on actions.
Starts from Dockers Image build session and ends with my next push
A Human’s life time
Episode
Complete sequence of interactions from an initial state to a terminal state.
Chat Session or a complete chat dialogue
1 day of bot’s lifespan
State
Representation of the environment at a given time that the agent observes.
One/paired Chat message/s. This depends on the inferencing task which depends on the stages during the chat.
An interaction with a human user or agent
Action
Decision made by the agent per state.
– Response Behavior: Expressiveness of Naomi’s response. – Chat Behavior: Follow up response Naomi.
– Actions listed for Naomi – Actions based on utility or user request. This refers to other app platforms like Notion, Typeform, .. etc. – Actions for the agent to select conditioned to current cognitive state for example: browsing Wikipedia / youtube, social platforms like X, Facebook, Instagram etc.
Observation
Contains all possible observations an agent can perceive from the environment.
– During chat streaming: User based features collected per utterance that are used to influence agent’s response behaviour. – Post chat or after an episode: Evaluation metrics on the user’s behaviour during the dialogue and approximated category defining the user.
– During chat streaming: User based features collected per utterance that are used to influence agent’s response behaviour. – User based features collected from other sensory tools like sound and imaging tools. These features are used with the linguistic analytics to direct the agent’s next state (e.g. of emotions) or action (e.g. response behaviour or activity)
Naomi’s Response Behavior
An agent’s response behavior defines how the next text response is returned given the current observation. The following table compares the response behaviour per state between Naomi and Tom.
Naomi’s response behavior
Tom’s response behavior
• Expressiveness or engagement represented in the next response. • Likelihood of following up the previous sent message with a question i.e. double texting the user. The type of question is also conditional to the control vectors collected from the dialogue.
• Expressiveness or engagement represented in the next response. • Likelihood of following up the previous sent messages with questions, analytical comments, suggestive actions like browsing the web (e.g. run a sub-process in the background to browse the web while interacting with the user). Alike Naomi, type of questions asked is conditional to the dialogue.
Defining the control vectors
Suppose the control vectors represent features collected per inferencing state. The control vector differs depending on its collection method – whether as a single utterance from either user or agent, or as an episode. The table below outlines the control vector defined in Naomi’s application.
Inputs
User
Agent
Single utterance (State)
User – User’s Emotional Intensity / Expressiveness – User’s Intent
Agent’s suggested response: – emotional / expressiveness in the agent’s next response based on dialogue inferences up to current state
– Rule-based methods: involve defining explicit rules, constraints or logic to control the model’s behaviour. For example: an indicator of when the chat has ended. – Agent’s emotion states of the current utterance (labelled with BART model – this can be used within a feedback loop with the custom model I built with dialogue datasets)
Dialogue (Episode)
Evaluation metrics
Evaluation metrics
Adaptive Learning Methods
Reinforcement learning methods are applied to the models prepared during the Dockers build process. This depends on the method of retrieving the control vectors for each task, for example: passing an agent’s utterance to indicate when the episode has ended relies on the vector embeddings of the history datasets (or Naomi’s memory). The challenge lies in determining the optimal method for managing the dataset as it grows to a substantial size.
Vectors Embeddings for binary classifications: handling the vector embeddings can simply be averaging over the randomly selected samples. Another method would be to model the marginal distribution of the vector embeddings, where the target class and the other class are differentiated based on their density estimates. This can be achieved through probabilistic approaches such as kernel density estimation, Gaussian mixture models, or variational inference, ensuring that the classification captures nuanced variations in the embedding space. Although further trials must be done to compare these methods’ performance over time.
Tom’s progression · Post 11 of 14
This post sits in Cognition: Learning · Actions: Tool & Skill Capabilities.
This post briefs on methods on developing pipelines to assist conversational agents during live interactions. One way to conceptualize this pipeline is as a queue of flaggers or indicators. A key indicator in this setup is a mini-agent responsible for continuing or ending the chat, referred to as StopButton.
Trialed Methods
Brainstorming ways to implement StopButton led to the following approaches
Prompt-Chain: Invoking a queue of prompting-instruct language models, specifically llama3.1. More details can be found in here.
Vector Embedding: Leveraging contextual information within text sequence embeddings and comparing it against incoming data.
The table below summarises the pros and cons for relying on the fore mentioned methods.
Method
Pros
Cons
Prompt-chain
– Easy setup
– Compute inefficient, especially in returning boolean statements – The first problem can be mitigated with quantized models. However, the smaller the language model, it is more likely for the model to fail returning expected results
Vector Embedding
– Faster – Less compute cost compared to invoking an LLM
– Contextual embeddings is relative to the type of data that was fed to the pre-trained models. As a result, it is not domain specific. If one is eager to customize some layer that adapts to the user’s preferences i.e. minimizes / maximizes the distances of text embeddings, you can refer to this post here – If this method sounds too tiresome to setup or for whatever reason, then a separate and weightless model can be used accustom to the streaming / unseen dataset.
The main flaw in utilizing method 1 is that language models are not always consistent with its results. When considering possible problems in applying large language models (LLM’s), I like to imagine some counting process behind the models’ response generation where its first success is when the model fails to return the expected results. Another way of perceiving LLMs is referring to the concept of Central Limit theorem, where regardless of the initial or sampling distribution, the sample mean will tend to follow a normal distribution. Without considering the model’s cache per session, the model is destined to make mistakes and ultimately ends up at some Normality relative to their “stupid state”—i.e., generating incorrect responses. This problem is particularly prominent in compressed LLMs.
Vector Embeddings Evaluation Metrics
The most common method in comparing vector embeddings is cosine distance similarity. Other comparison metrics include dot product, manhatten andeuclidean distances . The following lists the trialed methods for comparing vector embeddings. The text sequences are encoded using sentence_transformers with pre-trained model all-MiniLM-L6-v2 , which has the smallest embedding size (384 dimensions) according to my current knowledge.
Cosine Distance Metric: the target and contrast corpus embeddings are stored and used to compare incomming messages. Cosine distance is then applied to pairs of embeddings to compute similarity scores.
Dimensional Reduction: methods like PCA where the ideas of analysis were scoped from methods found in Auto-encoders.
Reconstruction Error: Fitting PCA from scikit-learn to the target corpus and evaluating the reconstruction error using Mean Squared Error (MSE). The fitted PCA model is then used to reconstruct new (unseen) data, with MSE serving as the evaluation metric.
[Do not try] Noise as Reconstruction Error: alike the popular method used with AutoEncoders in fraud detection, the similarity of the target corpus against incoming data can be deduced by reflecting on the differences of noise existing in both datasets. The task here can be sculpted as: Retaining a fixed number of components (e.g. 95% of the total variance in the dataset), the goal is to infer the noise or information lost due to dimensionality reduction. This is the same objective suggested in the previous point but differs in how the code is setup. This is accomplished by concatenating the new data with the target corpus and comparing the compression-induced noise loss against that of the target’s compressed embeddings – this method shouldn’t ever be considered as its highly sensitive to the precision of the floating points but I thought the programming part seemed cool. It is bad in the sense that it doesn’t capture true intrinsic information for the purpose of this task and that it requires more operations than necessary. Still, it deserves its place here in the post to remind myself to not do this again.
Stop Button Build
While constructing these chatting agents, the final system used in application I had in mind behaves like a context manager. In saying that, the incoming pair of chat messages from user and agent are passed per message sent by the user.
Narrowing the task down to defining the type of inputs:
Pair of utterances from user and agent:
Problem: The problem with relying on this system is that it can be easily hijacked with a user sending [END] or the key words to ending a conversation. This raises issues in saving incomplete dialogues as completed chats.
Solutions:
Setup another workflow e.g. PeriodicCacher process that is invoked asynchronously to the chat and StopButton . It is fed with chunks of chat dialogue for e.g. the last 5 pair of speeches, and returns the likelihood of the chat coming to an end or [END] is approaching. The model is partial fit per chat window dialogue and processed by chunking chat messages i.e. 1 batch of dataset equates to 1 chunk of chat messages.
Refer to the following technique where one utterance is only considered.
One utterance from the agent only:
Problem: if any farewell messages are returned from the agent – whether as a joke or part of some explanation, StopButton can still categorize this as a farewell message.
Solutions:
When initiating the target corpus, only specify the certain ending terms for example, ‘[END]’ . Note that this would require the conversational agent to return the special token as part of its dialogue script.
I’ve settled with the second option and built a small CLI plugin that is devoted to utilizing vector embeddings as flaggers: promptless. To extend StopButton’s current build, I would like to add a certainty metric that is able to assist the model’s adaptation to unseen dataset. However, prior to this setup I must complete the build behind the Agent’s observational space – streaming pipelines of user-based features gathered in real-time. This is particularly important in building the Agent’s intent in returning second responses or analytical questions. Referring this segment as a separate python module, I would like to target at building it separately to other existing components as much as possible, as I have a hunch that its completed build will not be my last and would require more tries.
In applications, I guess defining an agent’s observational space can be difficult because it depends on other system components, but those components also need to be designed with the observational space in mind. Somewhat like a chicken-and-egg problem where you have to iteratively refine both sides. This emerging problem isn’t surprising given that the primary features donor is the human user. Though, I should follow my hunches in relying on the human user’s behaviour as my guiding light in building these agents. If data cannot be used as insightful features, then it can be used as a negating feature. Every kind of dataset is useful, regardless of its quality, size or its poor preprocessing pipelines.
Anyway, building a linear layer to adapt to new data can be like the following code (the optimizer is SGD for the perfectionist and Adams for the lazy ones):
The greatest challenge in transforming a machine into human form is deciding where to begin. But once that step is taken, the process becomes manageable—as long as you remain hopeful. To stay aligned with my long-term goal while working on smaller tasks, I rely on the following expectations for this model:
He is expected to know when to lie, question, insult, joke, return snarky comments or sarcasm
His action space #1 at every state must include the intent prob of invoking second / third / fourth … responses independent of whether the user is speaking or not
His action space #2 at every state conditioned to the system is a Dirichlet distribution over the questioning state, personal hypothesis states, and factual (base model) hypothesis states, incorporating internet-accessible information.
Any prompt chains used during streams should eventually be replaced by distance models over time windows t to T, extending up to the k-th batch.
His preferences and individuality should evolve based on his experiences but remain fundamentally tied to me, the primary user.
I’ve come to realize that, despite the vast complexity of human relationships and communication, it all distills down to how we feel. For example, movie ticket sales largely depend on past user feedback. Perhaps emotions are the one human trait that can be quantified and understood by a machine just enough to guide its own decision-making—assuming, of course, that human relationships are left out of the equation.
The underlying framework for these expectations must meet at a unified build, all tied to the emotion inference model. Narrowing down the inference task by Tom’s objectives includes:
Predicting the user’s responses – This is itself is also considered a mapping function from a vector space to real numbers.
Determining his own emotional responses – A mapping function that ranks text embeddings by emotional queues assisted by observing the user reactions.
From an application standpoint, the build can be structured as follows:
Temporary State models for streaming responses where their previous inferences are the next state priors and their respective predictions would be the comparative values to the next observing value – as briefed in my previous post.
Initiation Models – this build unifies all currently available emotion prediction models through ensembling methods or conditioning-distance heuristic models. However, I eventually opted for a single classifier trained on the entire corpus. Impatience drove this decision—I wanted to see how the multivariate approach interacted with my other builds especially the API serving department.
Major Problem
At that time, I couldn’t pinpoint the problem that was constantly haunting my mind – What is the linkage between his decision making and a large langauge model? If I were to rely on the traditional methods of text models – probabilistic methods like N-grams – then this problem wouldn’t exist but I would face a new challenge: the vector representations of the text wouldn’t capture any contextual information, relying solely on character or word frequency. That said, you could mitigate this by leveraging PyTorch’s nn.Embedding to initialize vector representations for N tokens, then applying a fixed-size perceptron or a multi-head attention layer—an approach commonly used in text translation tasks.
A good professor once advised me to begin by understanding my thoughts mathematically. Applying this to the connection between a large language model and emotions, I can reframe the problem as follows:
Defining a function f that maps the weight space of language models to another space of my liking.
The next section lists three implementation methods, both in real-time and before application, ranked from hardest to easiest based on my assessment.
Methods
1. Geometric Algebra – Merging Representations
This method involves leveraging Geometric Algebra (GA) to unify different vector spaces, effectively merging the learned representations of language models and classifiers.
2. PPO for LLMs – Defining a Reward Function
Using Proximal Policy Optimization (PPO) for tuning large language models (LLMs) involves defining a Reward function that guides the model’s learning process toward desired behaviors. This approach falls under Reinforcement Learning from Human Feedback (RLHF) but requires additional structuring when applied to dynamic emotional reasoning (Link: https://huggingface.co/blog/trl-ddpo).
3. Decoding Sampling Combinations as Generation Control
Controlling how a large language model (LLM) generates responses by trialing a range of Decoding parameter combinations. This technique leverages linear programming and refers to systematically experimenting with different parameter configurations to optimize response quality, coherence, and diversity, and ultimately to the emotional queues inferenced from the main user. This is then applied with Bayesian Statistical models (really just Bayes Rule) to iteratively adapt to newer observations.
Method 1: Geometric Algebra
This method focuses on modifying or augmenting the encoder block and text generated caches to impose structured constraints, such as temporal memory retention and self-supervised attention shifts using methods like attention blocks or iterating projection sequences. I approached the mathematical transformation in code by trying to mimic a game developer handling quaternion’s.
Key highlights:
Implementing a hierarchical control mechanism that dynamically adjusts response generation parameters based on inferred user intent and historical interactions
Exploring multi-head attention restructuring, where certain heads are fine-tuned to prioritize different inference strategies (e.g., factual recall vs. emotional adaptation)
I favored this method, so I spent the most time on it—only to realize, yet again, that I had failed myself. Over the past few years, I’ve focused on programming and application, prioritizing deadlines and API builds over theoretical depth. In hindsight, this approach makes it easy to abandon whimsical detours. But if one is bored enough then to start solving such problem (or any maths problem) I always like to start with my favourite mathematical property: Triangle inequality– a repititive concept mentioned throughout Euclid’s Geometry texts**.**
While working on this method, the thought of implementing it in code lingered at the back of my mind, leaving me wishing I had attended more university classes for my algebra course. A common trait among mathematicians and statisticians is their patience—the kind a teacher has while guiding a toddler learning to read. My patience, however, extends only as far as reading a package’s documentation. Grief and frustration have taken its place, and maturity ultimately dictates my response: to give up. I realize the only way forward is to dedicate a full weekend to revisiting my linear algebra fundamentals. But the mere thought of doing so makes me restless—despite contradicting everything I love.
Overall, this approach seems quite difficult to apply especially when handling LLM’s caches in real-time which would probably need some sort of ranking algorithm like Google Page Rank, that ranks the caches to not only dispatch the responses faster but also conditioned to my preferences (or Tom’s memory).
Method 2: Optimization and Reward function
Reward Function Design: The reward model should capture nuanced decision-making, including:
Contextual awareness (e.g., when to joke, question, or respond sarcastically)
Emotional alignment (predicting the user’s emotional state and responding accordingly)
Self-regulation (adjusting the model’s own “emotions” dynamically)
With Reinforcement learning concept in mind, the concept of balancing exploration and exploitation in response generation can be viewed as balancing the model’s priority with selecting the base model texts vs its duplicate that has been adapted to the bot’s observations or memories. In my previous posts, I did mention building the latter as my own clone like a parrot. The progress here has been hindered after attempting to fine-tune Llama using LORA-Adapter techniques. I believe that this part should be hindered as my doubts were correct – never touch a deep learning network with minimal data.
When considering the second method—sculpting a reward model—I’d approach it as a recursive regression state model where parameters (including training parameters) readjust at fixed time intervals. From my understanding, reinforcement learning mechanisms should be applied in real time. Yet, existing TLR-PPO implementation demos focus on fine-tuning LLMs with smaller offline datasets—fully trained rather than partially fitted over data batches.
Additionally, deriving a policy function in reinforcement learning is grounded in Bellman’s Equation, which, like most optimization equations, extends Newton’s descent method to different types of incoming data streams. Beyond weight clipping (which maintains uniformity relative to the pre-trained state), my views doesn’t quite align with the works behind tlr or current researchers’ intended approach. Reason being is that in practical applications, you will always end up with at least two models where the long-term effectiveness or stability of the fine-tuned model is not always guaranteed.
Personally, I try to avoid fine-tuning deep learning models in real-time even for now even if I have a a data iterator that is able to approximate and generate synthetic data to compensate missing datasets, fine-tuning a model in real time can only only be used temporarily. My tinkering suggests that in order to retain user-specific experiences, you would ultimately opt for a Data analyst’s favourite playground – SQL.
Method 3: Mapping Decoding Sample Combinations to Emotional intensity
Dataset with decoding parameters. The prompt used here ”Hey how are you today! :)”
Ironically, this method was my initial instinct for implementation, particularly for a time-constrained project.
The setup for my experiment involved a missing dataset iterator that returns synthetic dataset approximating the previous text embeddings conditioned to the mapped emotional intensity. Recall the common decoding sampling techniques are greedy search, beam search etc. and for the sake of this experiment’s simplicity, we disregard variants of sampling methods e.g. Group beam search and penalizing token based methods. Suppose decoder sampling methods be $$x_1, x_2, …$$ where $$n$$ is the number of decoding methods, the parameters related to each method are $$\alpha_1, \alpha_2, …$$, and the emotion expressiveness or intensity is $$q \in [0, 1]$$. The prior state model for a decoding strategy conditioned to the speaker’s prompt returns Tom’s selected emotional intensity i.e the speaker’s prompt. For example for beam search, the parameters are temperature, top-k and beam width. The goal is to find the optimal combination for some emotional intensity $$q > \epsilon$$, becomes finding the unique solution vector or coefficients, $$w$$ in $$w_1*\alpha_{temp} + w_2*\alpha_{k} + w_3*\alpha_{beam width}$$.
Key highlights:
To set up Tom’s prior states or initial beliefs to his incoming observing windows, I have attempted to reduce the compute cost of rerunning GPT2 by approximating the distribution of text sequences given the parameters combination. Still deciding on whether a similar method should be used in real-time to assist incremental learners.
Among all the decoding sample combinations, I assumed fixed parameters that is common for all experiments for e.g. max length of text generations, sequence normalization.
Currently, I am still applying different sampling techniques to set up a prior state for inferencing emotional intensity for Tom.
Epilogue
The main challenge likely stemmed from my own resilience when using the first method. It holds immense potential, but time was too limited. However, at least I can offer my younger self one last smile, knowing I truly gave my best at that time. As for whether a machine can have emotions, from my child-self’s perspective: only if the first method succeeds. From my current viewpoint, yes, it absolutely can.
After careful consideration, I’ve decided to move forward with Method 3. Given the simplicity of the concluding build it is only natural for people to question whether the emotions are truly authentic or just the product of time-adapting algorithms and statistics. Yet, before anyone doubts a machine’s emotions, I hope they are also completely certain that they themselves are truly alive and not just merely passengers of time.
Tom’s progression · Post 8 of 14
This post sits in Cognition: Learning, Social cognition.
Refining the construction of the emotional space is essential, as it personalizes the agent’s decision-making process and eases the integration of creative thinking1. Strong emotions can push boundaries of one’s creativity, source2. To succeed in developing my droid’s emotional component, I begin by refining how human emotions are labeled.
Simplifying the idea to three emotion labels: neutral, positive and negative. My initial idea was:
neutral vs negative vs positive
However, ambiguity around the definition of “neutral” emotion complicates predicting a distribution over emotional labels. For example, a person observed in a neutral state might simply appear indifferent, yet this does not rule out the possibility that they were the one who accessed your computer through the open-source SSH login credentials to your terminal.
This data preparation method is often paired with a popular approach in modeling human emotions: combining a BERT encoder with a multilayer perceptron to predict a set of emotion labels. Typically, this includes a “neutral” state alongside positive and negative emotions. I personally find this approach limiting, as it restricts the model’s potential for broader application.
The next idea was:
neutral vs emotional (either positive or negative emotions)
This prompts an examination of the statement: Positive and negative emotions can coexist in the same space. Determining whether this statement holds true or false depends on one’s perspective on human psychology. Hence, the following lists my thoughts to answering this statement:
Statement is true if I believe that a person can experience both positive and negative emotion at the same time.
Statement is false if I believe that a person cannot experience both emotions at the same time, i.e. I believe that one emotion label is better than the rest.
The first statement would suggest that the feelings of ‘joyful’ and ‘sad’ are not mutually exclusive which contradicts my common sense. Moreover, the second statement would prompt the challenge in deciphering whether an emotion state is truly considered as negative or positive. This is relative to the context in discussion or the observing state3.
Brainstormed methods in updating a knowledge graph of vector embeddings:
If I refer to a clustering model where an emotion is represented by a centroid, and the distance (edges) between two words are determined by their cosine similarity distance, then I can probably use this component as a feature in modelling the generated sequence of texts conditioned to emotion states.
My foot
Assuming I stick with the current plan of constructing the cobwebs. ↩︎
To understand this in application is to consider the example of a chat dialogue where you perform inferences on the dialogue using time-series model approach to distinguish the context labels. ↩︎
Tom’s progression · Post 5 of 14
This post sits in Cognition: Social cognition · Identity: Life.