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?
Tom’s progression · Post 12 of 14
This post sits in Cognition: Generation.