<!DOCTYPE html><html lang="zh-CN"><head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>MAYPL:超关系知识图谱结构表示学习</title>
<script src="https://cdn.tailwindcss.com"></script>
<link href="https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap" rel="stylesheet"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css"/>
<script>
tailwind.config = {
theme: {
extend: {
fontFamily: {
'serif': ['Playfair Display', 'serif'],
'sans': ['Inter', 'sans-serif'],
},
colors: {
'warm-gray': {
50: '#fafaf9',
100: '#f5f5f4',
200: '#e7e5e4',
300: '#d6d3d1',
400: '#a8a29e',
500: '#78716c',
600: '#57534e',
700: '#44403c',
800: '#292524',
900: '#1c1917',
},
'deep-blue': {
50: '#eff6ff',
100: '#dbeafe',
200: '#bfdbfe',
300: '#93c5fd',
400: '#60a5fa',
500: '#3b82f6',
600: '#2563eb',
700: '#1d4ed8',
800: '#1e40af',
900: '#1e3a8a',
},
'oxblood': {
50: '#fef2f2',
100: '#fee2e2',
200: '#fecaca',
300: '#fca5a5',
400: '#f87171',
500: '#ef4444',
600: '#dc2626',
700: '#b91c1c',
800: '#991b1b',
900: '#7f1d1d',
}
}
}
}
}
</script>
<style>
.hero-gradient {
background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 35%, #3b82f6 70%, #60a5fa 100%);
}
.text-shadow {
text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.backdrop-blur {
backdrop-filter: blur(8px);
}
.toc-fixed {
position: fixed;
top: 0;
left: 0;
height: 100vh;
width: 280px;
background: rgba(250, 250, 249, 0.95);
backdrop-filter: blur(10px);
border-right: 1px solid #e7e5e4;
z-index: 1000;
overflow-y: auto;
padding: 1.5rem;
}
.main-content {
margin-left: 280px;
min-height: 100vh;
}
.toc-link {
transition: all 0.2s ease;
}
.toc-link:hover {
color: #1d4ed8;
transform: translateX(4px);
}
.section-anchor {
scroll-margin-top: 2rem;
}
.bento-grid {
display: grid;
grid-template-columns: 2fr 1fr;
grid-template-rows: auto auto;
gap: 1.5rem;
height: 400px;
}
.bento-main {
grid-row: span 2;
}
.citation-link {
color: #2563eb;
text-decoration: none;
font-size: 0.875rem;
font-weight: 500;
transition: color 0.2s ease;
}
.citation-link:hover {
color: #1d4ed8;
text-decoration: underline;
}
#toc-backdrop {
display: none;
}
<span class="mention-invalid">@media</span> (max-width: 1024px) {
.toc-fixed {
transform: translateX(-100%);
transition: transform 0.3s ease;
}
.toc-fixed.open {
transform: translateX(0);
}
.main-content {
margin-left: 0;
}
.bento-grid {
grid-template-columns: 1fr;
height: auto;
}
.bento-main {
grid-row: span 1;
}
}
<span class="mention-invalid">@media</span> (max-width: 768px) {
.hero-gradient .container {
padding-left: 1rem;
padding-right: 1rem;
}
.bento-main h1 {
font-size: 2rem;
}
.bento-main p {
font-size: 0.9rem;
}
.bento-grid > div {
padding: 1rem;
}
}
</style>
<base target="_blank">
</head>
<body class="bg-warm-gray-50 text-warm-gray-900 font-sans overflow-x-hidden">
<!-- 固定目录 -->
<nav class="toc-fixed" id="toc">
<div class="mb-6">
<h3 class="font-serif text-lg font-semibold text-warm-gray-800 mb-4">目录</h3>
<ul class="space-y-2 text-sm">
<li>
<a href="#introduction" class="toc-link block py-1 text-warm-gray-600 hover:text-deep-blue-700">引言:核心突破</a>
</li>
<li>
<a href="#inductive-reasoning" class="toc-link block py-1 text-warm-gray-600 hover:text-deep-blue-700">归纳推理能力</a>
</li>
<li>
<a href="#learning-relations" class="toc-link block py-1 text-warm-gray-600 hover:text-deep-blue-700">学习新关系</a>
</li>
<li>
<a href="#learning-knowledge" class="toc-link block py-1 text-warm-gray-600 hover:text-deep-blue-700">学习新知识</a>
</li>
<li>
<a href="#technical-core" class="toc-link block py-1 text-warm-gray-600 hover:text-deep-blue-700">技术核心框架</a>
</li>
<li>
<a href="#message-passing" class="toc-link block py-1 text-warm-gray-600 hover:text-deep-blue-700">消息传递机制</a>
</li>
<li>
<a href="#hkg-background" class="toc-link block py-1 text-warm-gray-600 hover:text-deep-blue-700">超关系知识图谱</a>
</li>
<li>
<a href="#experiments" class="toc-link block py-1 text-warm-gray-600 hover:text-deep-blue-700">实验验证</a>
</li>
<li>
<a href="#performance" class="toc-link block py-1 text-warm-gray-600 hover:text-deep-blue-700">性能优势</a>
</li>
</ul>
</div>
<div class="border-t border-warm-gray-200 pt-4">
<p class="text-xs text-warm-gray-500">AI 论文分析</p>
<p class="text-xs text-warm-gray-400 mt-1">MAYPL: Structural Representation Learning</p>
</div>
</nav>
<!-- 移动端目录切换按钮 -->
<button class="lg:hidden fixed top-4 left-4 z-50 bg-deep-blue-600 text-white p-2 rounded-lg shadow-lg" onclick="toggleToc()">
<i class="fas fa-bars"></i>
</button>
<!-- 目录遮罩 -->
<div id="toc-backdrop" class="fixed inset-0 bg-black/50 z-40 hidden" onclick="toggleToc()"></div>
<!-- 主要内容 -->
<main class="main-content">
<!-- 核心突破章节 -->
<section id="introduction" class="section-anchor py-16 bg-white">
<div class="container mx-auto px-6 max-w-4xl">
<h2 class="font-serif text-4xl font-bold text-warm-gray-900 mb-8">核心突破:实现对新实体和新关系的归纳推理</h2>
<div class="prose prose-lg max-w-none">
<p class="text-warm-gray-700 leading-relaxed mb-6">
MAYPL(Structure Is All You Need: Structural Representation Learning on Hyper-Relational Knowledge Graphs)这篇论文在人工智能领域,特别是知识图谱(Knowledge Graph, KG)表示学习方面,取得了显著的突破性进展。其核心贡献在于提出了一种能够同时对<strong>新实体(new entities)</strong>和<strong>新关系(new relations)</strong>进行<strong>归纳推理(inductive inference)</strong>的框架。
</p>
<div class="bg-deep-blue-50 border-l-4 border-deep-blue-600 p-6 my-8 rounded-r-lg">
<h3 class="font-serif text-xl font-semibold text-deep-blue-900 mb-3">突破性意义</h3>
<p class="text-deep-blue-800">
这一能力使得MAYPL在处理动态、不断演化的知识库时,展现出远超现有方法的优越性和泛化能力。传统的知识图谱补全方法大多局限于转导式学习(transductive learning),而MAYPL通过其创新的、纯粹基于结构的学习机制,打破了这一限制。<a href="https://blog.csdn.net/Python_cocola/article/details/149338430" class="citation-link" target="_blank">[25]</a>
</p>
</div>
<blockquote class="border-l-4 border-oxblood-600 pl-6 py-4 my-8 bg-warm-gray-50 italic text-warm-gray-800">
"MAYPL是唯一一种能够处理超关系知识图谱(Hyper-relational Knowledge Graphs, HKGs)并在归纳推理场景下同时应对新实体和新关系挑战的方法。"
</blockquote>
<div class="grid md:grid-cols-2 gap-6 my-8">
<div class="bg-green-50 border border-green-200 rounded-lg p-5">
<div class="flex items-center mb-3">
<i class="fas fa-unlock text-green-600 text-xl mr-3"></i>
<h4 class="font-semibold text-green-900">开放世界适应</h4>
</div>
<p class="text-green-800 text-sm">无需针对每一个新出现的实体或关系进行耗时的重训练或微调</p>
</div>
<div class="bg-blue-50 border border-blue-200 rounded-lg p-5">
<div class="flex items-center mb-3">
<i class="fas fa-arrows-alt text-blue-600 text-xl mr-3"></i>
<h4 class="font-semibold text-blue-900">泛化能力</h4>
</div>
<p class="text-blue-800 text-sm">将从一个知识图谱中学到的模式和规则,无缝迁移到全新图谱中</p>
</div>
</div>
</div>
</div>
</section>
<!-- 归纳推理能力章节 -->
<section id="inductive-reasoning" class="section-anchor py-16 bg-warm-gray-50">
<div class="container mx-auto px-6 max-w-4xl">
<h2 class="font-serif text-4xl font-bold text-warm-gray-900 mb-8">归纳推理能力的定义与重要性</h2>
<div class="prose prose-lg max-w-none">
<p class="text-warm-gray-700 leading-relaxed mb-6">
归纳推理在知识图谱领域指的是模型在训练完成后,能够处理在训练阶段从未见过的实体或关系,并对涉及这些新元素的链接进行准确预测的能力。这与传统的转导式学习形成鲜明对比。
</p>
<div class="bg-white rounded-xl shadow-lg p-6 my-8">
<h3 class="font-serif text-xl font-semibold mb-4">关键能力体现</h3>
<div class="space-y-4">
<div class="flex items-start space-x-4">
<div class="w-8 h-8 bg-deep-blue-100 rounded-full flex items-center justify-center flex-shrink-0 mt-1">
<i class="fas fa-project-diagram text-deep-blue-600 text-sm"></i>
</div>
<div>
<h4 class="font-medium text-warm-gray-900">处理新实体</h4>
<p class="text-warm-gray-600 text-sm mt-1">动态生成全新实体的表示,无需预先训练</p>
</div>
</div>
<div class="flex items-start space-x-4">
<div class="w-8 h-8 bg-deep-blue-100 rounded-full flex items-center justify-center flex-shrink-0 mt-1">
<i class="fas fa-link text-deep-blue-600 text-sm"></i>
</div>
<div>
<h4 class="font-medium text-warm-gray-900">处理新关系</h4>
<p class="text-warm-gray-600 text-sm mt-1">基于结构角色动态理解和处理前所未见的关系</p>
</div>
</div>
<div class="flex items-start space-x-4">
<div class="w-8 h-8 bg-deep-blue-100 rounded-full flex items-center justify-center flex-shrink-0 mt-1">
<i class="fas fa-sync-alt text-deep-blue-600 text-sm"></i>
</div>
<div>
<h4 class="font-medium text-warm-gray-900">即时推理</h4>
<p class="text-warm-gray-600 text-sm mt-1">直接应用于完全不同的推理知识图谱</p>
</div>
</div>
</div>
</div>
<div class="bg-yellow-50 border-l-4 border-yellow-400 p-6 my-8">
<h3 class="font-semibold text-yellow-900 mb-2">应用场景</h3>
<ul class="text-yellow-800 space-y-2">
<li><strong>新闻事件分析:</strong>处理突发新闻中的新实体和关系,无需重新训练模型</li>
<li><strong>生物医学发现:</strong>整合新发现的基因、蛋白质和药物分子及其相互作用</li>
<li><strong>动态知识库维护:</strong>持续更新和扩展大规模知识图谱系统</li>
</ul>
</div>
<!-- 对比表格 -->
<div class="overflow-x-auto my-8">
<table class="w-full bg-white rounded-lg shadow-md overflow-hidden">
<thead class="bg-deep-blue-600 text-white">
<tr>
<th class="px-6 py-4 text-left font-semibold">特性</th>
<th class="px-6 py-4 text-left font-semibold">转导式学习</th>
<th class="px-6 py-4 text-left font-semibold">归纳式学习 (MAYPL)</th>
</tr>
</thead>
<tbody class="divide-y divide-warm-gray-200">
<tr class="hover:bg-warm-gray-50">
<td class="px-6 py-4 font-medium">核心机制</td>
<td class="px-6 py-4 text-warm-gray-600">学习特定实体和关系的固定嵌入向量</td>
<td class="px-6 py-4 text-warm-gray-600">学习通用的结构处理和消息传递规则</td>
</tr>
<tr class="hover:bg-warm-gray-50">
<td class="px-6 py-4 font-medium">处理新实体</td>
<td class="px-6 py-4 text-red-600">❌ 无法处理</td>
<td class="px-6 py-4 text-green-600">✅ 可以根据其结构角色动态生成表示</td>
</tr>
<tr class="hover:bg-warm-gray-50">
<td class="px-6 py-4 font-medium">处理新关系</td>
<td class="px-6 py-4 text-red-600">❌ 无法处理</td>
<td class="px-6 py-4 text-green-600">✅ 可以根据其结构角色动态生成表示</td>
</tr>
<tr class="hover:bg-warm-gray-50">
<td class="px-6 py-4 font-medium">泛化能力</td>
<td class="px-6 py-4 text-warm-gray-600">局限于训练数据中的特定元素</td>
<td class="px-6 py-4 text-warm-gray-600">能够泛化到包含全新元素的图结构</td>
</tr>
<tr class="hover:bg-warm-gray-50">
<td class="px-6 py-4 font-medium">知识更新</td>
<td class="px-6 py-4 text-warm-gray-600">需要重训练或微调</td>
<td class="px-6 py-4 text-warm-gray-600">无需重训练,可直接应用于新图谱</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<!-- 学习新关系章节 -->
<section id="learning-relations" class="section-anchor py-16 bg-white">
<div class="container mx-auto px-6 max-w-4xl">
<h2 class="font-serif text-4xl font-bold text-warm-gray-900 mb-8">学习新关系:处理未知或新型关系</h2>
<div class="prose prose-lg max-w-none">
<p class="text-warm-gray-700 leading-relaxed mb-6">
MAYPL在学习新关系方面的突破性进展,是其归纳推理能力的核心体现之一。传统知识图谱表示学习方法,无论是基于平移距离模型还是基于图神经网络的模型,通常都依赖于为每个关系学习一个固定的表示向量。
</p>
<div class="bg-gradient-to-r from-deep-blue-50 to-indigo-50 border border-deep-blue-200 rounded-xl p-7 my-8">
<div class="flex items-start space-x-4">
<div class="w-12 h-12 bg-deep-blue-600 rounded-full flex items-center justify-center flex-shrink-0">
<i class="fas fa-lightbulb text-white text-xl"></i>
</div>
<div>
<h3 class="font-serif text-xl font-semibold text-deep-blue-900 mb-3">核心创新</h3>
<p class="text-deep-blue-800 leading-relaxed">
MAYPL不再为关系学习一个全局的、固定的表示,而是通过分析关系在超关系知识图谱(HKG)中的局部结构角色来动态地生成其表示。<a href="https://blog.csdn.net/Python_cocola/article/details/149338430" class="citation-link" target="_blank">[25]</a>
</p>
</div>
</div>
</div>
<div class="grid md:grid-cols-2 gap-6 my-8">
<div class="bg-red-50 border border-red-200 rounded-lg p-5">
<h4 class="font-semibold text-red-900 mb-3 flex items-center">
<i class="fas fa-times-circle text-red-600 mr-2"></i>
传统方法局限
</h4>
<ul class="text-red-800 text-sm space-y-1">
<li>• 依赖固定的关系嵌入向量</li>
<li>• 无法处理训练数据中未出现的新关系</li>
<li>• 缺乏对新关系的动态适应能力</li>
</ul>
</div>
<div class="bg-green-50 border border-green-200 rounded-lg p-5">
<h4 class="font-semibold text-green-900 mb-3 flex items-center">
<i class="fas fa-check-circle text-green-600 mr-2"></i>
MAYPL优势
</h4>
<ul class="text-green-800 text-sm space-y-1">
<li>• 动态生成关系表示</li>
<li>• 根据结构角色计算关系语义</li>
<li>• 即时适应新关系类型</li>
</ul>
</div>
</div>
<div class="bg-warm-gray-100 rounded-xl p-6 my-8">
<h3 class="font-serif text-lg font-semibold text-warm-gray-900 mb-4">推理阶段处理全新关系</h3>
<p class="text-warm-gray-700 mb-4">
MAYPL在推理阶段处理全新关系的能力,是其区别于所有现有HKG处理方法的关键特征。模型在训练过程中,学习的是一种通用的"计算模式",即如何在一个给定的HKG结构上计算、传播和聚合信息。
</p>
<div class="bg-white rounded-lg p-4 border border-warm-gray-200">
<p class="text-sm text-warm-gray-600 italic">
"MAYPL是'唯一能够对新实体和新关系进行归纳推理的HKG处理方法'"<a href="https://blog.csdn.net/Python_cocola/article/details/149338430" class="citation-link ml-1" target="_blank">[25]</a>
</p>
</div>
</div>
</div>
</div>
</section>
<!-- 学习新知识章节 -->
<section id="learning-knowledge" class="section-anchor py-16 bg-warm-gray-50">
<div class="container mx-auto px-6 max-w-4xl">
<h2 class="font-serif text-4xl font-bold text-warm-gray-900 mb-8">学习新知识:整合新实体与新事实</h2>
<div class="prose prose-lg max-w-none">
<p class="text-warm-gray-700 leading-relaxed mb-6">
MAYPL在学习新知识方面的能力,主要体现在其对新实体和新事实的高效整合上。这里的"新知识"不仅指全新的实体和关系,也包括由这些新元素构成的复杂事实。
</p>
<div class="bg-white rounded-xl shadow-lg p-6 my-8">
<div class="flex items-center mb-4">
<i class="fas fa-puzzle-piece text-deep-blue-600 text-2xl mr-3"></i>
<h3 class="font-serif text-xl font-semibold text-warm-gray-900">知识整合机制</h3>
</div>
<p class="text-warm-gray-700 mb-4">
MAYPL学习的是一种通用的图结构处理算法,而不是记忆特定实体的静态属性。当一个新实体出现时,模型不会试图去"理解"它的语义,而是将其视为图中的一个新节点,并根据它与其他节点之间的连接关系来动态地构建其上下文表示。<a href="https://blog.csdn.net/Python_cocola/article/details/149338430" class="citation-link" target="_blank">[25]</a>
</p>
<div class="bg-blue-50 border-l-4 border-blue-400 p-4 rounded-r-lg">
<h4 class="font-medium text-blue-900 mb-2">示例场景</h4>
<p class="text-blue-800 text-sm">
当一个新的人物实体"X"被添加到知识图谱中,并伴随着事实"<strong>X 出生于 中国</strong>"和"<strong>X 的职业是 科学家</strong>"时,MAYPL能够立即利用这些结构信息来更新"X"的表示,并可以进一步用于预测其他缺失的链接。
</p>
</div>
</div>
<div class="grid md:grid-cols-3 gap-4 my-8">
<div class="bg-gradient-to-br from-green-50 to-emerald-50 border border-green-200 rounded-lg p-4 text-center">
<i class="fas fa-plus-circle text-green-600 text-2xl mb-2"></i>
<h4 class="font-semibold text-green-900 text-sm mb-1">新实体添加</h4>
<p class="text-green-800 text-xs">即时生成表示,无需训练</p>
</div>
<div class="bg-gradient-to-br from-blue-50 to-cyan-50 border border-blue-200 rounded-lg p-4 text-center">
<i class="fas fa-link text-blue-600 text-2xl mb-2"></i>
<h4 class="font-semibold text-blue-900 text-sm mb-1">新事实整合</h4>
<p class="text-blue-800 text-xs">通过消息传递更新相关表示</p>
</div>
<div class="bg-gradient-to-br from-purple-50 to-indigo-50 border border-purple-200 rounded-lg p-4 text-center">
<i class="fas fa-search text-purple-600 text-2xl mb-2"></i>
<h4 class="font-semibold text-purple-900 text-sm mb-1">即时推理</h4>
<p class="text-purple-800 text-xs">对新知识进行链接预测</p>
</div>
</div>
<!-- 方法对比表格 -->
<div class="overflow-x-auto my-8">
<table class="w-full bg-white rounded-lg shadow-md overflow-hidden">
<thead class="bg-oxblood-600 text-white">
<tr>
<th class="px-4 py-3 text-left font-semibold text-sm">方法</th>
<th class="px-4 py-3 text-center font-semibold text-sm">处理HKG</th>
<th class="px-4 py-3 text-center font-semibold text-sm">归纳新实体</th>
<th class="px-4 py-3 text-center font-semibold text-sm">归纳新关系</th>
</tr>
</thead>
<tbody class="divide-y divide-warm-gray-200">
<tr class="bg-green-50">
<td class="px-4 py-3 font-bold text-green-900">MAYPL</td>
<td class="px-4 py-3 text-center text-green-600">✓</td>
<td class="px-4 py-3 text-center text-green-600">✓</td>
<td class="px-4 py-3 text-center text-green-600">✓</td>
</tr>
<tr class="hover:bg-warm-gray-50">
<td class="px-4 py-3 text-warm-gray-900">StarE, HyNT, HAHE</td>
<td class="px-4 py-3 text-center text-green-600">✓</td>
<td class="px-4 py-3 text-center text-red-600">❌</td>
<td class="px-4 py-3 text-center text-red-600">❌</td>
</tr>
<tr class="hover:bg-warm-gray-50">
<td class="px-4 py-3 text-warm-gray-900">NaLP, RAM</td>
<td class="px-4 py-3 text-center text-warm-gray-600">❌ (处理NRR)</td>
<td class="px-4 py-3 text-center text-red-600">❌</td>
<td class="px-4 py-3 text-center text-red-600">❌</td>
</tr>
<tr class="hover:bg-warm-gray-50">
<td class="px-4 py-3 text-warm-gray-900">G-MPNN</td>
<td class="px-4 py-3 text-center text-warm-gray-600">❌ (处理KHG)</td>
<td class="px-4 py-3 text-center text-yellow-600">✓ (仅限一跳)</td>
<td class="px-4 py-3 text-center text-red-600">❌</td>
</tr>
<tr class="hover:bg-warm-gray-50">
<td class="px-4 py-3 text-warm-gray-900">HCNet</td>
<td class="px-4 py-3 text-center text-warm-gray-600">❌ (处理KHG)</td>
<td class="px-4 py-3 text-center text-green-600">✓</td>
<td class="px-4 py-3 text-center text-red-600">❌</td>
</tr>
<tr class="hover:bg-warm-gray-50">
<td class="px-4 py-3 text-warm-gray-900">QBLP</td>
<td class="px-4 py-3 text-center text-green-600">✓</td>
<td class="px-4 py-3 text-center text-yellow-600">✓ (依赖文本)</td>
<td class="px-4 py-3 text-center text-red-600">❌</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</section>
<!-- 技术核心章节 -->
<section id="technical-core" class="section-anchor py-16 bg-white">
<div class="container mx-auto px-6 max-w-4xl">
<h2 class="font-serif text-4xl font-bold text-warm-gray-900 mb-8">技术核心:"结构就是一切"</h2>
<div class="prose prose-lg max-w-none">
<div class="bg-deep-blue-50 border-l-4 border-deep-blue-600 p-6 my-8 rounded-r-lg">
<h3 class="font-serif text-xl font-semibold text-deep-blue-900 mb-3">核心理念</h3>
<p class="text-deep-blue-800 leading-relaxed">
MAYPL论文的核心思想可以概括为<strong>"结构就是一切"(Structure Is All You Need)</strong>,这一理念颠覆了传统知识图谱表示学习对实体和关系特定特征的依赖。<a href="https://blog.csdn.net/Python_cocola/article/details/149338430" class="citation-link" target="_blank">[25]</a>
</p>
</div>
<div class="grid md:grid-cols-2 gap-6 my-8">
<div class="bg-red-50 border border-red-200 rounded-lg p-5">
<h4 class="font-semibold text-red-900 mb-3">传统方法依赖</h4>
<ul class="text-red-800 text-sm space-y-2">
<li>• 固定的实体嵌入向量</li>
<li>• 固定的关系嵌入向量</li>
<li>• 外部文本特征</li>
<li>• 预定义的类型信息</li>
</ul>
</div>
<div class="bg-green-50 border border-green-200 rounded-lg p-5">
<h4 class="font-semibold text-green-900 mb-3">MAYPL创新</h4>
<ul class="text-green-800 text-sm space-y-2">
<li>• 纯粹基于拓扑结构</li>
<li>• 动态生成表示</li>
<li>• 位置感知聚合</li>
<li>• 上下文相关计算</li>
</ul>
</div>
</div>
<div class="bg-warm-gray-100 rounded-xl p-6 my-8">
<h3 class="font-serif text-lg font-semibold text-warm-gray-900 mb-4">纯粹结构驱动学习</h3>
<p class="text-warm-gray-700 mb-4">
MAYPL的整个学习过程,从实体和关系表示的初始化,到最终链接预测的完成,都纯粹地依赖于给定超关系知识图谱(HKG)的拓扑结构。<a href="https://blog.csdn.net/Python_cocola/article/details/149338430" class="citation-link" target="_blank">[25]</a>
</p>
<div class="grid grid-cols-2 md:grid-cols-4 gap-4 mt-4">
<div class="bg-white rounded-lg p-3 text-center border border-warm-gray-200">
<i class="fas fa-sitemap text-deep-blue-600 text-xl mb-2"></i>
<h5 class="font-medium text-warm-gray-900 text-sm">连接关系</h5>
<p class="text-warm-gray-600 text-xs">实体和关系间的连接</p>
</div>
<div class="bg-white rounded-lg p-3 text-center border border-warm-gray-200">
<i class="fas fa-map-marker-alt text-deep-blue-600 text-xl mb-2"></i>
<h5 class="font-medium text-warm-gray-900 text-sm">位置信息</h5>
<p class="text-warm-gray-600 text-xs">头实体、尾实体、限定词</p>
</div>
<div class="bg-white rounded-lg p-3 text-center border border-warm-gray-200">
<i class="fas fa-layer-group text-deep-blue-600 text-xl mb-2"></i>
<h5 class="font-medium text-warm-gray-900 text-sm">角色区分</h5>
<p class="text-warm-gray-600 text-xs">主关系 vs 限定词关系</p>
</div>
<div class="bg-white rounded-lg p-3 text-center border border-warm-gray-200">
<i class="fas fa-project-diagram text-deep-blue-600 text-xl mb-2"></i>
<h5 class="font-medium text-warm-gray-900 text-sm">共现模式</h5>
<p class="text-warm-gray-600 text-xs">实体和关系的共现关系</p>
</div>
</div>
</div>
<blockquote class="border-l-4 border-oxblood-600 pl-6 py-4 my-8 bg-warm-gray-50 italic text-warm-gray-800">
"MAYPL认为,一个实体或关系的语义信息和其在图谱中的功能角色,完全可以由其所在的图结构——即它如何与其他实体和关系相互连接、共现以及在事实中所处的位置——来唯一确定。"
</blockquote>
</div>
</div>
</section>
<!-- 消息传递机制章节 -->
<section id="message-passing" class="section-anchor py-16 bg-warm-gray-50">
<div class="container mx-auto px-6 max-w-4xl">
<h2 class="font-serif text-4xl font-bold text-warm-gray-900 mb-8">MAYPL框架:消息传递机制</h2>
<div class="prose prose-lg max-w-none">
<div class="bg-white rounded-xl shadow-lg p-7 my-8">
<div class="flex items-center mb-4">
<i class="fas fa-exchange-alt text-deep-blue-600 text-2xl mr-3"></i>
<h3 class="font-serif text-xl font-semibold text-warm-gray-900">事实级消息的计算与聚合</h3>
</div>
<p class="text-warm-gray-700 mb-4">
MAYPL框架的核心是其精心设计的消息传递机制,该机制以"事实"为基本单元进行信息传播。在超关系知识图谱(HKG)中,一个事实由一个主三元组和一组限定词组成。<a href="https://blog.csdn.net/Python_cocola/article/details/149338430" class="citation-link" target="_blank">[25]</a>
</p>
<div class="bg-blue-50 border border-blue-200 rounded-lg p-5">
<h4 class="font-semibold text-blue-900 mb-3">消息传递流程</h4>
<div class="space-y-3">
<div class="flex items-center space-x-3">
<div class="w-6 h-6 bg-blue-600 text-white rounded-full flex items-center justify-center text-xs font-bold">1</div>
<span class="text-blue-800 text-sm">计算每个事实的"事实级消息",压缩该事实的所有结构信息</span>
</div>
<div class="flex items-center space-x-3">
<div class="w-6 h-6 bg-blue-600 text-white rounded-full flex items-center justify-center text-xs font-bold">2</div>
<span class="text-blue-800 text-sm">通过注意力机制将消息聚合到实体和关系上</span>
</div>
<div class="flex items-center space-x-3">
<div class="w-6 h-6 bg-blue-600 text-white rounded-full flex items-center justify-center text-xs font-bold">3</div>
<span class="text-blue-800 text-sm">更新实体和关系的表示,融合全局结构信息</span>
</div>
</div>
</div>
</div>
<div class="grid md:grid-cols-2 gap-6 my-8">
<div class="space-y-4">
<h3 class="font-serif text-lg font-semibold text-warm-gray-900">结构驱动初始化</h3>
<div class="bg-green-50 border border-green-200 rounded-lg p-4">
<h4 class="font-medium text-green-900 mb-2">初始化器功能</h4>
<ul class="text-green-800 text-sm space-y-1">
<li>• 聚合最直接的邻居信息</li>
<li>• 区分不同结构角色(头实体、尾实体、限定词)</li>
<li>• 使用位置相关的可学习投影矩阵</li>
<li>• 精细刻画结构差异性</li>
</ul>
</div>
</div>
<div class="space-y-4">
<h3 class="font-serif text-lg font-semibold text-warm-gray-900">注意力消息传递</h3>
<div class="bg-purple-50 border border-purple-200 rounded-lg p-4">
<h4 class="font-medium text-purple-900 mb-2">传递机制</h4>
<ul class="text-purple-800 text-sm space-y-1">
<li>• 计算事实级消息</li>
<li>• 注意力权重分配</li>
<li>• 信息聚合与更新</li>
<li>• 多轮迭代优化</li>
</ul>
</div>
</div>
</div>
<div class="bg-warm-gray-100 rounded-xl p-6 my-8">
<h3 class="font-serif text-lg font-semibold text-warm-gray-900 mb-4">组件级连通性考量</h3>
<p class="text-warm-gray-700 mb-4">
除了事实级的结构信息,MAYPL的注意力神经消息传递机制还进一步考虑了"组件级"的连通性,这是其能够深刻理解HKG复杂结构的关键。<a href="https://blog.csdn.net/Python_cocola/article/details/149338430" class="citation-link" target="_blank">[25]</a>
</p>
<div class="grid grid-cols-2 md:grid-cols-3 gap-3">
<div class="bg-white rounded-lg p-3 border border-warm-gray-200">
<h5 class="font-medium text-warm-gray-900 text-sm mb-1">主三元组头实体</h5>
<p class="text-warm-gray-600 text-xs">核心关系的主体</p>
</div>
<div class="bg-white rounded-lg p-3 border border-warm-gray-200">
<h5 class="font-medium text-warm-gray-900 text-sm mb-1">主三元组尾实体</h5>
<p class="text-warm-gray-600 text-xs">核心关系的客体</p>
</div>
<div class="bg-white rounded-lg p-3 border border-warm-gray-200">
<h5 class="font-medium text-warm-gray-900 text-sm mb-1">主关系</h5>
<p class="text-warm-gray-600 text-xs">核心关系类型</p>
</div>
<div class="bg-white rounded-lg p-3 border border-warm-gray-200">
<h5 class="font-medium text-warm-gray-900 text-sm mb-1">限定词实体</h5>
<p class="text-warm-gray-600 text-xs">附加信息的值</p>
</div>
<div class="bg-white rounded-lg p-3 border border-warm-gray-200">
<h5 class="font-medium text-warm-gray-900 text-sm mb-1">限定词关系</h5>
<p class="text-warm-gray-600 text-xs">附加信息的键</p>
</div>
<div class="bg-white rounded-lg p-3 border border-warm-gray-200">
<h5 class="font-medium text-warm-gray-900 text-sm mb-1">注意力权重</h5>
<p class="text-warm-gray-600 text-xs">区分重要性</p>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- 超关系知识图谱背景章节 -->
<section id="hkg-background" class="section-anchor py-16 bg-white">
<div class="container mx-auto px-6 max-w-4xl">
<h2 class="font-serif text-4xl font-bold text-warm-gray-900 mb-8">研究背景:超关系知识图谱</h2>
<div class="prose prose-lg max-w-none">
<div class="bg-deep-blue-50 border-l-4 border-deep-blue-600 p-6 my-8 rounded-r-lg">
<h3 class="font-serif text-xl font-semibold text-deep-blue-900 mb-3">HKG定义</h3>
<p class="text-deep-blue-800 leading-relaxed">
超关系知识图谱(Hyper-relational Knowledge Graphs, HKGs)是对传统知识图谱的一种重要扩展,旨在解决传统三元组形式在表达复杂信息时的局限性。<a href="https://blog.csdn.net/Python_cocola/article/details/149338430" class="citation-link" target="_blank">[25]</a>
</p>
</div>
<div class="grid md:grid-cols-2 gap-6 my-8">
<div class="bg-red-50 border border-red-200 rounded-lg p-5">
<h4 class="font-semibold text-red-900 mb-3">传统三元组局限</h4>
<ul class="text-red-800 text-sm space-y-2">
<li>• 表达能力有限</li>
<li>• 缺乏上下文信息</li>
<li>• 无法表示复杂关系</li>
<li>• 时间空间信息缺失</li>
</ul>
</div>
<div class="bg-green-50 border border-green-200 rounded-lg p-5">
<h4 class="font-semibold text-green-900 mb-3">HKG优势</h4>
<ul class="text-green-800 text-sm space-y-2">
<li>• 主三元组+限定词结构</li>
<li>• 丰富的上下文信息</li>
<li>• 多维度知识表示</li>
<li>• 精确的时间和空间信息</li>
</ul>
</div>
</div>
<div class="bg-white rounded-xl shadow-lg p-6 my-8">
<h3 class="font-serif text-xl font-semibold text-warm-gray-900 mb-4">HKG事实结构</h3>
<div class="space-y-4">
<div class="bg-blue-50 border border-blue-200 rounded-lg p-4">
<h4 class="font-medium text-blue-900 mb-2">主三元组</h4>
<p class="text-blue-800 text-sm">(Finding Nemo, set in, Sydney)</p>
<p class="text-blue-600 text-xs mt-1">表达核心的语义关系</p>
</div>
<div class="bg-green-50 border border-green-200 rounded-lg p-4">
<h4 class="font-medium text-green-900 mb-2">限定词组</h4>
<div class="space-y-1 text-green-800 text-sm">
<p>• (country, Australia)</p>
<p>• (state, New South Wales)</p>
</div>
<p class="text-green-600 text-xs mt-1">提供额外的上下文或辅助信息</p>
</div>
</div>
</div>
<div class="bg-yellow-50 border-l-4 border-yellow-400 p-6 my-8">
<h3 class="font-semibold text-yellow-900 mb-2">现实世界应用</h3>
<p class="text-yellow-800 mb-3">
超关系知识图谱已经在现实世界的知识库中得到了广泛应用,其中最具代表性的就是<strong>Wikidata</strong>和<strong>YAGO</strong>。<a href="https://blog.csdn.net/Python_cocola/article/details/149338430" class="citation-link" target="_blank">[25]</a>
</p>
<div class="grid md:grid-cols-2 gap-4">
<div class="bg-white rounded-lg p-3 border border-yellow-200">
<h5 class="font-medium text-yellow-900 text-sm">Wikidata应用</h5>
<p class="text-yellow-700 text-xs mt-1">大量陈述包含主三元组和多个限定符,提供时间、地点、数量、来源等关键信息</p>
</div>
<div class="bg-white rounded-lg p-3 border border-yellow-200">
<h5 class="font-medium text-yellow-900 text-sm">复杂性挑战</h5>
<p class="text-yellow-700 text-xs mt-1">传统KG嵌入方法难以有效利用HKG中由限定词引入的复杂结构信息</p>
</div>
</div>
</div>
<div class="bg-warm-gray-100 rounded-xl p-6 my-8">
<h3 class="font-serif text-lg font-semibold text-warm-gray-900 mb-4">现有方法的局限性</h3>
<div class="space-y-4">
<div class="bg-white rounded-lg p-4 border border-warm-gray-200">
<h4 class="font-medium text-warm-gray-900 mb-2 flex items-center">
<i class="fas fa-exchange-alt text-red-500 mr-2"></i>
格式转换导致信息丢失
</h4>
<p class="text-warm-gray-700 text-sm">
许多现有方法将HKG转换为知识超图(KHG)或n元关系表示(NRR),导致原始HKG中部分结构信息的丢失。<a href="https://blog.csdn.net/Python_cocola/article/details/149338430" class="citation-link" target="_blank">[25]</a>
</p>
</div>
<div class="bg-white rounded-lg p-4 border border-warm-gray-200">
<h4 class="font-medium text-warm-gray-900 mb-2 flex items-center">
<i class="fas fa-lock text-red-500 mr-2"></i>
转导式学习局限
</h4>
<p class="text-warm-gray-700 text-sm">
主流方法为每个实体和关系学习唯一的、固定的嵌入向量,无法处理训练数据中未曾见过的全新元素。
</p>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- 实验验证章节 -->
<section id="experiments" class="section-anchor py-16 bg-warm-gray-50">
<div class="container mx-auto px-6 max-w-4xl">
<h2 class="font-serif text-4xl font-bold text-warm-gray-900 mb-8">实验验证与性能优势</h2>
<div class="prose prose-lg max-w-none">
<div class="bg-white rounded-xl shadow-lg p-7 my-8">
<div class="flex items-center mb-4">
<i class="fas fa-flask text-deep-blue-600 text-2xl mr-3"></i>
<h3 class="font-serif text-xl font-semibold text-warm-gray-900">实验设置与数据集</h3>
</div>
<p class="text-warm-gray-700 mb-4">
为了全面、客观地评估MAYPL的性能,论文作者在多达<strong>10个不同的基准数据集</strong>上进行了广泛的实验。<a href="https://proceedings.mlr.press/v267/lee25ah.html" class="citation-link" target="_blank">[18]</a>
</p>
<div class="grid md:grid-cols-3 gap-4">
<div class="bg-blue-50 border border-blue-200 rounded-lg p-4">
<h4 class="font-medium text-blue-900 mb-2">转导式HKG</h4>
<p class="text-blue-800 text-sm">超关系知识图谱链接预测</p>
</div>
<div class="bg-green-50 border border-green-200 rounded-lg p-4">
<h4 class="font-medium text-green-900 mb-2">归纳式KG</h4>
<p class="text-green-800 text-sm">传统知识图谱归纳推理</p>
</div>
<div class="bg-purple-50 border border-purple-200 rounded-lg p-4">
<h4 class="font-medium text-purple-900 mb-2">归纳式HKG</h4>
<p class="text-purple-800 text-sm">超关系图谱归纳推理</p>
</div>
</div>
<div class="mt-4 p-3 bg-warm-gray-100 rounded-lg">
<p class="text-warm-gray-700 text-sm">
数据集包括 <code class="bg-warm-gray-200 px-1 rounded">WD50K</code>, <code class="bg-warm-gray-200 px-1 rounded">WikiPeople</code>, <code class="bg-warm-gray-200 px-1 rounded">WD20K100v1</code>, <code class="bg-warm-gray-200 px-1 rounded">WK-50</code> 等 <a href="https://github.com/bdi-lab/MAYPL/" class="citation-link" target="_blank">[28]</a>
</p>
</div>
</div>
<div class="bg-gradient-to-r from-deep-blue-50 to-indigo-50 border border-deep-blue-200 rounded-xl p-7 my-8">
<h3 class="font-serif text-xl font-semibold text-deep-blue-900 mb-4">性能优势总结</h3>
<div class="grid md:grid-cols-2 gap-6">
<div>
<h4 class="font-semibold text-deep-blue-900 mb-3">量化成果</h4>
<ul class="text-deep-blue-800 text-sm space-y-2">
<li>• <strong>40种方法</strong>对比测试</li>
<li>• <strong>10个数据集</strong>全面验证</li>
<li>• <strong>最优性能</strong>稳定获得</li>
<li>• <strong>归纳推理</strong>显著优势</li>
</ul>
</div>
<div>
<h4 class="font-semibold text-deep-blue-900 mb-3">核心贡献</h4>
<ul class="text-deep-blue-800 text-sm space-y-2">
<li>• 首个HKG归纳推理框架</li>
<li>• 同时处理新实体和关系</li>
<li>• 纯粹基于结构的方法</li>
<li>• 实用性和扩展性强</li>
</ul>
</div>
</div>
</div>
<div class="bg-yellow-50 border-l-4 border-yellow-400 p-6 my-8 rounded-r-lg">
<h3 class="font-semibold text-yellow-900 mb-3">研究影响与未来展望</h3>
<p class="text-yellow-800 mb-3">
MAYPL的成功表明,一个纯粹基于结构的方法,足以在复杂的知识图谱任务中达到甚至超越那些依赖额外信息或更复杂模型的方法。<a href="https://bdi-lab.kaist.ac.kr/down/ICML2025_MAYPL_poster.pdf" class="citation-link" target="_blank">[27]</a>
</p>
<div class="grid md:grid-cols-3 gap-3">
<div class="bg-white rounded p-2 text-yellow-900 text-sm">
<strong>理论贡献:</strong>结构驱动学习范式
</div>
<div class="bg-white rounded p-2 text-yellow-900 text-sm">
<strong>实践价值:</strong>动态知识系统构建
</div>
<div class="bg-white rounded p-2 text-yellow-900 text-sm">
<strong>应用前景:</strong>开放域AI系统
</div>
</div>
</div>
</div>
</div>
</section>
<!-- 性能优势章节 -->
<section id="performance" class="section-anchor py-16 bg-white">
<div class="container mx-auto px-6 max-w-4xl">
<h2 class="font-serif text-4xl font-bold text-warm-gray-900 mb-8">性能优势分析</h2>
<div class="prose prose-lg max-w-none">
<div class="bg-white rounded-xl shadow-lg p-7 my-8">
<h3 class="font-serif text-xl font-semibold text-warm-gray-900 mb-4">40种方法对比测试结果</h3>
<p class="text-warm-gray-700 mb-4">
MAYPL在多达10个基准数据集上,与40种不同的知识图谱补全基线方法进行了比较,并在绝大多数情况下取得了最优性能。<a href="https://proceedings.mlr.press/v267/lee25ah.html" class="citation-link" target="_blank">[18]</a>
</p>
<div class="grid md:grid-cols-4 gap-4 my-6">
<div class="bg-green-50 border border-green-200 rounded-lg p-4 text-center">
<div class="text-2xl font-bold text-green-600 mb-1">10个</div>
<div class="text-green-800 text-sm">基准数据集</div>
</div>
<div class="bg-blue-50 border border-blue-200 rounded-lg p-4 text-center">
<div class="text-2xl font-bold text-blue-600 mb-1">40种</div>
<div class="text-blue-800 text-sm">对比方法</div>
</div>
<div class="bg-purple-50 border border-purple-200 rounded-lg p-4 text-center">
<div class="text-2xl font-bold text-purple-600 mb-1">最优</div>
<div class="text-purple-800 text-sm">性能表现</div>
</div>
<div class="bg-orange-50 border border-orange-200 rounded-lg p-4 text-center">
<div class="text-2xl font-bold text-orange-600 mb-1">HKG</div>
<div class="text-orange-800 text-sm">归纳推理</div>
</div>
</div>
</div>
<div class="grid md:grid-cols-2 gap-6 my-8">
<div class="bg-gradient-to-br from-blue-50 to-indigo-50 border border-blue-200 rounded-lg p-5">
<h4 class="font-semibold text-blue-900 mb-3 flex items-center">
<i class="fas fa-chart-line text-blue-600 mr-2"></i>
转导式任务优势
</h4>
<ul class="text-blue-800 text-sm space-y-1">
<li>• 显著优于StarE、HAHE等HKG专用模型</li>
<li>• MRR指标大幅提升</li>
<li>• Hits@N指标稳定领先</li>
<li>• 在多个数据集上表现一致优秀</li>
</ul>
</div>
<div class="bg-gradient-to-br from-green-50 to-emerald-50 border border-green-200 rounded-lg p-5">
<h4 class="font-semibold text-green-900 mb-3 flex items-center">
<i class="fas fa-rocket text-green-600 mr-2"></i>
归纳推理突破
</h4>
<ul class="text-green-800 text-sm space-y-1">
<li>• 大幅超越InGram、G-MPNN等方法</li>
<li>• WK-50数据集MRR得分远超基线</li>
<li>• WD20K(100)v2数据集表现优异</li>
<li>• 同时处理新实体和新关系的独特能力</li>
</ul>
</div>
</div>
<div class="bg-warm-gray-100 rounded-xl p-6 my-8">
<h3 class="font-serif text-lg font-semibold text-warm-gray-900 mb-4">消融研究分析</h3>
<p class="text-warm-gray-700 mb-4">
论文的消融研究进一步揭示了MAYPL在归纳推理上取得成功的关键。<a href="https://blog.csdn.net/Python_cocola/article/details/149338430" class="citation-link" target="_blank">[25]</a>
</p>
<div class="space-y-4">
<div class="bg-white rounded-lg p-4 border border-warm-gray-200">
<h4 class="font-medium text-warm-gray-900 mb-2">结构驱动初始化器</h4>
<p class="text-warm-gray-700 text-sm">
移除后,模型在归纳任务上的性能大幅下降,证明了结构驱动初始化的重要性。
</p>
</div>
<div class="bg-white rounded-lg p-4 border border-warm-gray-200">
<h4 class="font-medium text-warm-gray-900 mb-2">注意力机制</h4>
<p class="text-warm-gray-700 text-sm">
移除后,性能受到严重影响,说明注意力权重分配对模型成功至关重要。
</p>
</div>
</div>
<div class="mt-4 bg-green-50 border border-green-200 rounded-lg p-4">
<h4 class="font-medium text-green-900 mb-2">结论</h4>
<p class="text-green-800 text-sm">
正是MAYPL这种纯粹基于结构、动态计算表示的方式,赋予了其强大的归纳能力。定性分析显示,通过MAYPL的最终表示选择的相似实体或关系,比仅使用初始化器时更加相关和语义上更接近。<a href="https://blog.csdn.net/Python_cocola/article/details/149338430" class="citation-link" target="_blank">[25]</a>
</p>
</div>
</div>
<div class="bg-deep-blue-50 border-l-4 border-deep-blue-600 p-6 my-8 rounded-r-lg">
<h3 class="font-serif text-xl font-semibold text-deep-blue-900 mb-3">研究意义</h3>
<p class="text-deep-blue-800 leading-relaxed">
MAYPL的成功表明,纯粹学习和利用HKG的结构信息,是实现高效知识图谱表示学习和推理的关键。这一突破不仅解决了长期困扰知识图谱领域的一个难题,也为构建更具适应性和扩展性的智能系统开辟了新的道路。
</p>
</div>
</div>
</div>
</section>
<!-- 页脚 -->
<footer class="bg-warm-gray-800 text-warm-gray-200 py-8">
<div class="container mx-auto px-6 max-w-4xl">
<div class="border-t border-warm-gray-700 pt-6">
<div class="flex flex-col md:flex-row justify-between items-center">
<div class="mb-4 md:mb-0">
<p class="text-sm">MAYPL: Structural Representation Learning on Hyper-Relational Knowledge Graphs</p>
<p class="text-xs text-warm-gray-400 mt-1">AI Paper Analysis and Review</p>
</div>
<div class="flex space-x-4">
<a href="https://blog.csdn.net/Python_cocola/article/details/149338430" class="citation-link text-xs" target="_blank">Source [25]</a>
<a href="https://proceedings.mlr.press/v267/lee25ah.html" class="citation-link text-xs" target="_blank">Paper [18]</a>
<a href="https://github.com/bdi-lab/MAYPL/" class="citation-link text-xs" target="_blank">Code [28]</a>
<a href="https://bdi-lab.kaist.ac.kr/down/ICML2025_MAYPL_poster.pdf" class="citation-link text-xs" target="_blank">Poster [27]</a>
</div>
</div>
</div>
</div>
</footer>
</main>
<script>
// 切换目录显示
function toggleToc() {
const toc = document.getElementById('toc');
toc.classList.toggle('open');
const backdrop = document.getElementById('toc-backdrop');
backdrop.style.display = toc.classList.contains('open') ? 'block' : 'none';
}
// 点击目录链接时关闭目录
document.querySelectorAll('.toc-link').forEach(link => {
link.addEventListener('click', function() {
if (window.innerWidth <= 1024) {
toggleToc();
}
});
});
// 平滑滚动
document.querySelectorAll('.toc-link').forEach(link => {
link.addEventListener('click', function(e) {
e.preventDefault();
const targetId = this.getAttribute('href').substring(1);
const targetElement = document.getElementById(targetId);
if (targetElement) {
targetElement.scrollIntoView({
behavior: 'smooth',
block: 'start'
});
}
});
});
</script>
</body></html>