computational_analysis_social_roles.pdfPDFI'm implementing this paper.
I already implemented all GCA aspects with minor changes and clustered the resulting GCA vectors.
Then I ran LLM as a Judge on 20% of the discussions to evaluate the aspects.
Help me implement the next part
Assistant
User
I thought the next step was to meassure the group performance with Topic Modeling
Assistant
User
I will run LDA directly on the transcripts.
I don't want to use manual selection
Assistant
Got it 👍
If you want to avoid manual topic selection, you’ll need an automatic way to decide which topics are “on-task” vs. “off-task.”
Here are some strategies (all fully automatic):
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
Clustered the GCA vectors (to derive social roles).
Validated them partially with an LLM-as-Judge on ~20% of discussions.
👉 The next part in the paper is to connect these roles to learning outcomes and group performance using linear mixed-effects models (LMMs).
Here’s the pipeline from the paper:
Role diversity didn’t matter much, but the proportion of productive vs. unproductive roles strongly affected group performancecomputational_analysis_social_r….
They reported AIC, log-likelihood, likelihood ratio tests, and pseudo- Rm2R^2_mRm2, Rc2R^2_cRc2computational_analysis_social_r….
How You Can Implement
In Python (using statsmodels or lme4 in R):
pythonCopy codeimport statsmodels.formula.api as smf
✅ So your next implementation step after clustering + LLM validation is:
Run multilevel mixed-effects models to test how roles (and their distribution) predict individual learning gains and group performance.
Do you want me to draft Python code templates for each of the models (1–9 from the paper), so you can plug in your clustered roles + outcome measures?
You’re absolutely right — I jumped ahead to the modeling step.
In the paper, before running the mixed-effects models, they constructed the group performance measure using topic modeling (LDA)computational_analysis_social_r….
Here’s the flow:
🔹 Step: Group Performance via Topic Modeling
The idea is to quantify how much of the group’s discussion was on-task (relevant to the assigned domain).
Build corpus
They created a “seed corpus” = transcripts + any associated reading material.
Then expanded it with external documents (e.g., Wikipedia articles) on those seed termscomputational_analysis_social_r….
This becomes your background corpus for topic modeling.
Run LDA (Latent Dirichlet Allocation)
Fit LDA on the expanded corpus to learn KKK latent topics.
Each contribution ctc_tct gets a topic distribution:
tq(ct)=P(topic q∣ct)t_q(c_t) = P(\text{topic } q \mid c_t)tq(ct)=P(topic q∣ct)
with ∑qtq(ct)=1\sum_q t_q(c_t) = 1∑qtq(ct)=1.
Identify on-task vs. off-task topics
Manually (or semi-automatically) label topics into two sets:
Q′Q′Q′ = on-task (relevant) topics.
Q°Q°Q° = off-task topics.
Compute group performance
For each contribution:
T′(ct)=∑q∈Q′tq(ct)T′(c_t) = \sum_{q \in Q′} t_q(c_t)T′(ct)=q∈Q′∑tq(ct)
For the entire discussion:
T′=1n∑t=1nT′(ct)T′ = \frac{1}{n} \sum_{t=1}^{n} T′(c_t)T′=n1t=1∑nT′(ct)
where nnn = number of contributions.
This gives the proportion of on-task discussion = group performance.
🔹 Implementation (Python sketch)
pythonCopy codefrom sklearn.decomposition import LatentDirichletAllocation
from sklearn.feature_extraction.text import CountVectorizer
import numpy as np
import pandas as pd
Suppose df has: group_id, contribution_text
1. Vectorize text
vectorizer = CountVectorizer(stop_words='english')
X = vectorizer.fit_transform(df['contribution_text'])
✅ So yes — the next step is topic modeling to derive group performance.
Then you feed that group performance (and individual learning gains, if available) into the mixed-effects models.
Do you want me to help you set up the seed corpus + expansion step (like they did with Wikipedia enrichment), or should we start with a simpler baseline LDA directly on your transcripts?
🔹 1. Use Prompt/Keyword Matching (Simple & Practical)
Define a small set of domain keywords (from the task instructions, reading material, or even from your LLM judge prompts).
For each topic (distribution over words), compute overlap with the keyword list.
Label the topic as on-task if the overlap is above a threshold.
on_task_topics = []
for i, dist in enumerate(topic_terms):
words = [vectorizer.get_feature_names_out()[j] for j in dist.argsort()[-20:]]
if len(domain_keywords.intersection(set(words))) > 0:
on_task_topics.append(i)
🔹 2. Automatic Relevance via Coherence or Similarity
Compute topic coherence (e.g., UMass, CV) for all topics.
Assume the most coherent topics are on-task, the rest are off-task.
Alternatively, embed the top words of each topic with a pretrained model (e.g., SBERT) and compare with a domain description embedding.