[論文レビュー] Can an LLM Detect Instances of Microservice Infrastructure Patterns?
本論文は、自然言語パターン記述を用いて複数言語のマイクロサービスインフラパターンを検出するLLMベースのツール MicroPAD を提案。GPT-5 Nano を用いて190リポジトリで評価。
Architectural patterns are frequently found in various software artifacts. The wide variety of patterns and their implementations makes detection challenging with current tools, especially since they often only support detecting patterns in artifacts written in a single language. Large Language Models (LLMs), trained on a diverse range of software artifacts and knowledge, might overcome the limitations of existing approaches. However, their true effectiveness and the factors influencing their performance have not yet been thoroughly examined. To better understand this, we developed MicroPAD. This tool utilizes GPT 5 nano to identify architectural patterns in software artifacts written in any language, based on natural-language pattern descriptions. We used MicroPAD to evaluate an LLM's ability to detect instances of architectural patterns, particularly infrastructure-related microservice patterns. To accomplish this, we selected a set of GitHub repositories and contacted their top contributors to create a new, human-annotated dataset of 190 repositories containing microservice architectural patterns. The results show that MicroPAD was capable of detecting pattern instances across multiple languages and artifact types. The detection performance varied across patterns (F1 scores ranging from 0.09 to 0.70), specifically in relation to their prevalence and the distinctiveness of the artifacts through which they manifest. We also found that patterns associated with recognizable, dominant artifacts were detected more reliably. Whether these findings generalize to other LLMs and tools is a promising direction for future research.
研究の動機と目的
- 複数言語アーティファクトにわたる言語非依存のアーキテクチャパターン検出の必要性を動機づける。
- 言語特有のパーサを用いずにマイクロサービスインフラパターンを検出するLLMベースのパイプライン MicroPAD を提案する。
- 評価のために Richardson のマイクロサービスパターンでラベル付けされた人手注釈付きリポジトリデータセットを作成する。
- パターンごとの検出性能を評価し、アーティファクトの普及性や識別性など成功に影響を与える要因を分析する。
提案手法
- 自然言語パターン記述と例のインスタンスからパターンプロファイルを作成する。
- LLM推論トレースを用いたマルチフェーズパイプライン(Pattern Profile 作成、ファイルパスの決定、パターン検出)を用いる。
- 埋め込みとキーワードマッチングを用いて大規模コードベースの分析優先度を設定する。
- リポジトリの主要貢献者へのアンケート調査でグラウンドトゥルースを取得し、精度、再現率、正確度、F1を算出する。
- 検出性能に対するアーティファクトの影響を分析するための File Dominance Index (FDI) を導入する。
- 混同行列と9つの Richardson パターンにわたるパターン別指標を報告する。
実験結果
リサーチクエスチョン
- RQ1RQ1: 言語非依存のLLMベースアプローチがソフトウェアアーティファクト内のマイクロサービスインフラパターンのインスタンスを検出する性能はどの程度か。
- RQ2RQ2: ソフトウェアリポジトリ内のアーティファクトはLLMベースのアプローチがマイクロサービスインフラパターンのインスタンスを検出する能力にどのような影響を与えるか。
主な発見
| Predicted Positive | Predicted Negative | Actual Positive | Actual Negative |
|---|---|---|---|
| 114 (TP) | 234 (FN) | - | - |
| 116 (FP) | 1,246 (TN) | - | - |
- MicroPADは9つのパターンで精度79.5%、適合率49.6%、再現率32.8%、F1スコア39.5%を達成。
- F1スコアは0.70(Service Instance Per Container)から0.09(3rd Party Registration)まで幅がある。
- パターンの普及性とF1スコアの間に強い正の相関(r = 0.74)が存在。
- 支配的なアーティファクトを含むパターン(例:Docker、Terraform、Kubernetes関連)は検出性能が高く、FDIと相関を持つ。
- パターンごとにトップ分析アーティファクトが異なり、支配的なファイルが欠如するパターンはF1が低い(例:Service Registry)。
- F1スコアとパターンごとの最大FDIとの間に強い正の相関(r = 0.83)が存在。
より良い研究を、今すぐ始めましょう
論文設計から論文執筆まで、研究時間を劇的に削減しましょう。
クレジットカード登録不要
このレビューはAIが作成し、人間の編集者が確認しました。