LLM 기반 상관관계 분석의 Semantic Causality 평가
Semantic Causality Evaluation of Correlation Analysis Utilizing Large Language Models
TL;DR Highlight
LLM 전문가 대역 활용이 상관관계 데이터에서 진짜 인과관계를 자동으로 식별한다.
Who Should Read
데이터 분석 결과에서 의미 있는 상관관계와 우연한 상관관계를 구분하고 싶은 데이터 분석가 또는 ML 엔지니어. 특히 도메인 전문가 없이 미지의 데이터셋을 탐색해야 하는 상황에 유용.
Core Mechanics
- 상관관계(correlation)는 인과관계(causality)가 아닌데, 지금까지는 이걸 구분하려면 도메인 전문가가 직접 봐야 했음
- GPT 계열 LLM을 도메인 전문가 대역으로 써서 각 상관관계가 실제 인과적 의미가 있는지 자동 판별
- 결과를 'Causal heatmap'이라는 시각화 모델로 표현 — 의미 있는 관계는 강조, 우연한 관계는 억제
- 모르는 데이터셋(unknown dataset)에서도 작동 — 전문 지식 없이 탐색적 분석 가능
- 시각적 품질, 인과 판별 품질, 비교 분석 세 가지 축으로 모델 평가 수행
Evidence
- 실험 결과에서 Causal heatmap이 흥미로운 관계를 명확히 부각하고 무관한 관계를 억제하는 효과가 입증됨 (논문 내 실험적 평가 근거)
- LLM이 인과 평가 태스크에서 사용 가능한 수준의 품질을 보임을 비교 분석으로 확인 — 단, 구체적 수치는 abstract에 미포함
- 미지의 데이터셋에서도 접근법의 잠재적 유용성(potential)이 확인됨
How to Apply
- 기존 상관관계 행렬(correlation matrix)을 만든 뒤, 각 (변수 A, 변수 B) 쌍을 LLM에 넘겨 '이 두 변수 간 인과관계가 실제로 존재하는가?'를 물어보는 파이프라인을 추가하면 됨
- LLM 응답을 점수화해서 heatmap에 오버레이 — 인과 가능성 높은 셀만 강조하도록 시각화 레이어를 수정하는 경우에 적용 가능
- 도메인 전문가가 없는 해커톤, PoC, 탐색적 EDA 단계에서 '일단 LLM한테 물어보고 필터링'하는 빠른 스크리닝 도구로 활용
Code Example
import openai
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
def causal_score(var_a: str, var_b: str, context: str = "") -> float:
"""LLM에게 두 변수 간 인과 가능성을 0~1로 평가하도록 요청"""
prompt = f"""두 변수 사이에 실제 인과관계(causality)가 존재할 가능성을 평가하세요.
변수 A: {var_a}
변수 B: {var_b}
{f'컨텍스트: {context}' if context else ''}
0.0(완전히 우연/무관) ~ 1.0(명확한 인과관계) 사이의 숫자 하나만 출력하세요."""
response = openai.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": prompt}],
temperature=0
)
try:
return float(response.choices[0].message.content.strip())
except:
return 0.0
def causal_heatmap(df: pd.DataFrame, context: str = ""):
"""상관관계 행렬에 LLM 인과 점수를 곱해 Causal heatmap 생성"""
corr = df.corr()
cols = corr.columns.tolist()
causal_matrix = pd.DataFrame(np.zeros_like(corr.values), index=cols, columns=cols)
for i, a in enumerate(cols):
for j, b in enumerate(cols):
if i < j:
score = causal_score(a, b, context)
causal_matrix.loc[a, b] = score
causal_matrix.loc[b, a] = score
elif i == j:
causal_matrix.loc[a, b] = 1.0
# 상관관계 * 인과 점수 = Causal heatmap
weighted = corr.abs() * causal_matrix
plt.figure(figsize=(10, 8))
sns.heatmap(weighted, annot=True, fmt=".2f", cmap="YlOrRd", vmin=0, vmax=1)
plt.title("Causal Heatmap (correlation × causal score)")
plt.tight_layout()
plt.show()
return weighted
# 사용 예시
# causal_heatmap(df, context="의료 환자 데이터, 변수는 나이/혈압/콜레스테롤 등")Terminology
관련 논문
Mindwalk – 코딩 에이전트 세션을 코드베이스 3D 맵 위에서 재생하는 시각화 도구
Claude Code나 Codex 같은 AI 코딩 에이전트가 세션 중 코드베이스의 어떤 파일을 탐색하고 수정했는지를 3D 지도 형태로 시각화해서 재생해주는 로컬 도구다. 에이전트가 작업을 어떻게 이해했는지 한눈에 파악할 수 있다.
Ghost Font: 사람은 읽을 수 있지만 AI는 읽기 어려운 안티-AI 폰트 실험
움직임(모션)을 이용해 글자를 표현해서 AI 모델이 정적 이미지 분석으로는 메시지를 해독하지 못하게 막는 실험적 프로젝트인데, 커뮤니티에서는 이미 GPT-5.6, Claude Opus 등으로 해독에 성공한 사례가 속출해 실효성 논쟁이 뜨겁다.
GPT-5.6, Grok 4.5, Claude, Muse Spark 등 12개 모델이 동일한 앱 4개를 빌드한 결과 비교
12개 LLM 모델에게 레이캐스터 미로, 루빅스 큐브, 계산기, Game of Life 앱을 각각 5번씩 만들게 해서 성공률·비용·속도를 비교한 실전 벤치마크다. GPT-5.6 Sol이 전반적으로 가장 일관된 결과를 냈고, Grok 4.5는 가성비 면에서 눈에 띄었다.
Databricks가 수백만 라인 실제 코드베이스로 Coding Agent를 벤치마킹한 결과
Databricks가 자사 실제 코드베이스를 기반으로 여러 AI 코딩 에이전트의 성능과 비용을 직접 측정했고, 모델 토큰 가격과 실제 태스크 비용이 전혀 다르다는 점, 그리고 오픈소스 모델이 이제 최상위 수준에 도달했다는 점을 확인했다.
Reasoning에서 Uncertainty 추정하기: LLM의 다국어 및 교차언어 MCQA 성능 대규모 연구
LLM이 저자원 언어 질문을 받을 때 영어로 추론하게 하면 불확실성 추정 성능이 고자원 언어 수준으로 올라온다.
LLM-as-a-Verifier: 범용 Verification 프레임워크
LLM의 토큰 확률 분포를 활용해 discrete 점수 대신 continuous 점수를 뽑아내면, 추가 학습 없이 코딩·로봇·의료 에이전트 평가 정확도를 SOTA로 끌어올릴 수 있다.
Original Abstract (Expand)
: It is known that correlation does not imply causality. Some relationships identified in the analysis of data are coincidental or unknown, and some are produced by real-world causality of the situation, which is problematic, since there is a need to differentiate between these two scenarios. Until recently, the proper − semantic − causality of the relationship could have been determined only by human experts from the area of expertise of the studied data. This has changed with the advance of large language models, which are often utilized as surrogates for such human experts, making the process automated and readily available to all data analysts. This motivates the main objective of this work, which is to introduce the design and implementation of a large language model-based semantic causality evaluator based on correlation analysis, together with its visual analysis model called Causal heatmap. After the implementation itself, the model is evaluated from the point of view of the quality of the visual model, from the point of view of the quality of causal evaluation based on large language models, and from the point of view of comparative analysis, while the results reached in the study highlight the usability of large language models in the task and the potential of the proposed approach in the analysis of unknown datasets. The results of the experimental evaluation demonstrate the usefulness of the Causal heatmap method, supported by the evident highlighting of interesting relationships, while suppressing irrelevant ones.