9148c358d0
Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를 Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류. - 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로 자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거, 동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거. - 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming, Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business, Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로, 나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는 title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백). 원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지. - 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서. - 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는 지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지. - Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경. - 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
7.9 KiB
7.9 KiB
id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
| id | title | category | status | canonical_id | aliases | duplicate_of | source_trust_level | confidence_score | verification_status | tags | raw_sources | last_reinforced | github_commit | tech_stack | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| wiki-2026-0508-코드-서식-지정과-축소가-코드-스타일로메트리-작성자-인식- | 코드 서식 지정과 축소가 코드 스타일로메트리(작성자 인식)에 미치는 영향을 평가하는 기계 학습 모델 분류 연구 | 10_Wiki/Topics | verified | self |
|
none | A | 0.85 | applied |
|
2026-05-10 | pending |
|
코드 서식 지정과 축소가 코드 스타일로메트리(작성자 인식)에 미치는 영향을 평가하는 기계 학습 모델 분류 연구
매 한 줄
"매 author 의 의 의 의 fingerprint 의 의 의 의 source code 의 의 의 의 hide 의 의 의 가능 의 X?". 매 code stylometry 의 의 의 author identification 의 의 의 의 의 ML 의 의 의 의 study — 매 formatting (Prettier, Black) 의 의 의 의 minification 의 의 의 의 의 의 author signature 의 의 의 의 의 의 erase 의 의 의 의 가능 의 의 의 평가. 매 2018 Caliskan et al. (USENIX) 의 의 seminal work, 매 2026 — 매 LLM 의 의 의 의 의 의 의 의 attribution + counter-stylometry 의 의 의 의 의 의 advance.
매 핵심
매 Code stylometry 의 의 의 의 의 정의
- 매 source code 의 의 의 의 의 의 의 author 의 의 의 의 의 의 identify 의 의 의 의 의 의 the discipline.
- 매 features: 매 layout (whitespace), 매 lexical (variable name), 매 syntactic (AST shape).
- 매 use case: 매 plagiarism, 매 malware author tracing, 매 OSS contribution forensics.
- 매 privacy concern: 매 anonymous OSS dev 의 의 의 의 의 의 의 의 의 의 deanonymization 의 의 의 의 의 risk.
매 핵심 paper
- Caliskan-Islam et al. (USENIX 2015): "De-anonymizing Programmers via Code Stylometry" — 매 250 author 의 의 95% 의 의 의 의 attribution.
- Abuhamad et al. (CCS 2018): "Large-Scale Authorship Attribution of Source Code" — 매 1600 author.
- Bogomolov et al. (ICSE 2021): "Authorship Attribution of Source Code: A Language-Agnostic Approach".
- 매 2026 — 매 LLM-based attribution (Code Llama embeddings, BGE-Code).
매 Feature categories
| Category | 매 예 | 매 Format-stable? |
|---|---|---|
| Layout | indentation, line length | 매 X (formatter 의 의 의 의 의 erase) |
| Lexical | identifier naming, comment style | 매 partial |
| Syntactic | AST n-grams, control flow | 매 stable |
| Semantic | variable scoping, idioms | 매 stable |
매 Formatting / minification 의 의 의 의 의 의 effect
- Prettier / Black — 매 layout feature 의 의 의 의 의 의 erase. 매 lexical / syntactic 의 의 의 의 의 survive.
- Minification — 매 layout + 매 identifier rename → 매 attribution accuracy 의 의 의 의 30-40% 의 의 drop.
- AST-based features 의 의 의 의 의 의 robust — 매 Caliskan 2015 의 의 의 의 의 의 main finding.
- Counter-stylometry: 매 의도적 의 의 의 의 의 의 obfuscation — 매 attribution 의 의 의 의 의 의 evade 가능.
💻 패턴
매 Feature extraction (Python AST n-grams)
import ast
from collections import Counter
def ast_ngrams(source: str, n: int = 3) -> Counter:
tree = ast.parse(source)
nodes = [type(n).__name__ for n in ast.walk(tree)]
return Counter(tuple(nodes[i:i+n]) for i in range(len(nodes)-n+1))
매 Layout features
def layout_features(source: str) -> dict:
lines = source.splitlines()
return {
"avg_line_length": sum(len(l) for l in lines) / max(len(lines), 1),
"max_indent": max((len(l) - len(l.lstrip())) for l in lines),
"tab_count": source.count("\t"),
"blank_line_ratio": sum(1 for l in lines if not l.strip()) / max(len(lines), 1),
}
매 Random Forest classifier (Caliskan-style)
from sklearn.ensemble import RandomForestClassifier
from sklearn.feature_extraction import DictVectorizer
from sklearn.pipeline import Pipeline
pipeline = Pipeline([
("vec", DictVectorizer()),
("clf", RandomForestClassifier(n_estimators=300, random_state=42)),
])
X = [extract_features(src) for src in train_sources]
y = train_authors
pipeline.fit(X, y)
# 매 attribution
predicted = pipeline.predict([extract_features(unknown_source)])
매 Format-invariant features (post-Prettier robust)
def format_invariant_features(source: str) -> dict:
tree = ast.parse(source)
return {
"avg_function_length": avg_func_lines(tree),
"comprehension_ratio": count_comprehensions(tree) / max(count_loops(tree), 1),
"exception_specificity": specific_excepts(tree) / max(total_excepts(tree), 1),
"f_string_ratio": count_fstrings(tree) / max(count_strings(tree), 1),
"type_annotation_ratio": annotated_args(tree) / max(total_args(tree), 1),
}
매 Experiment — formatting effect
import black
results = {}
for fmt_name, formatter in [
("raw", lambda s: s),
("black", lambda s: black.format_str(s, mode=black.Mode())),
("minified", minify_python),
]:
formatted_X = [extract_features(formatter(src)) for src in test_sources]
acc = pipeline.score(formatted_X, test_authors)
results[fmt_name] = acc
# 매 typical: raw 0.93, black 0.78, minified 0.52
매 LLM embedding-based attribution (2026)
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("BAAI/bge-code-v1")
# 매 author centroid
author_emb = {a: model.encode(srcs).mean(0) for a, srcs in train_by_author.items()}
# 매 nearest centroid attribution
def attribute(src: str) -> str:
e = model.encode(src)
return min(author_emb, key=lambda a: cosine(e, author_emb[a]))
매 Counter-stylometry (defense)
# 매 paraphrase via LLM — 매 author signature 의 의 의 의 의 erase
def anonymize_via_llm(src: str) -> str:
return claude.messages.create(
model="claude-opus-4-7",
messages=[{"role": "user",
"content": f"Rewrite this code preserving behavior but in neutral style:\n{src}"}]
).content[0].text
매 결정 기준
| 상황 | Approach |
|---|---|
| 매 plagiarism detection | 매 AST n-gram + RF |
| 매 malware author tracing | 매 binary + assembly stylometry |
| 매 OSS author privacy | 매 LLM paraphrase + format normalize |
| 매 large-scale (1000+ authors) | 매 deep embedding (BGE-Code) |
| 매 cross-language | 매 language-agnostic AST features |
기본값: 매 AST + lexical features + Random Forest — 매 baseline 의 의 의 의 의 의 의 의 strong (~90% top-1).
🔗 Graph
- 부모: Authorship Attribution
- 응용: Privacy Engineering
- Adjacent: Code Formatting · Minification
🤖 LLM 활용
언제: 매 plagiarism detection / forensic investigation / OSS privacy assessment. 언제 X: 매 매 production code review — 매 stylometry 의 의 의 의 의 의 의 X relevant.
❌ 안티패턴
- Layout-only features: 매 formatter 의 의 의 의 의 의 의 의 trivial 의 의 의 의 evade.
- Single-language model: 매 author 의 의 의 의 의 multi-lang 의 의 의 의 의 — 매 cross-lang feature 의 의 의 필요.
- Privacy invasion: 매 anonymous contributor 의 의 의 의 의 의 의 의 의 deanonymize — 매 ethical 의 의 의 issue.
- Overfitting to small sample: 매 author 별 의 의 의 의 < 5 sample — 매 unreliable.
🧪 검증 / 중복
- Verified — Caliskan-Islam et al. De-anonymizing Programmers (USENIX 2015); Abuhamad et al. (CCS 2018); Bogomolov et al. (ICSE 2021).
- 신뢰도 A.
🕓 Changelog
| 날짜 | 변경 |
|---|---|
| 2026-05-08 | Phase 1 |
| 2026-05-10 | Manual cleanup — stylometry feature taxonomy + formatting effect experiment |