Skip to content

Commit 583f652

Browse files
committed
Update Fiction
1 parent ee73039 commit 583f652

15 files changed

Lines changed: 1685 additions & 699 deletions

‎.codex‎

Whitespace-only changes.

‎package-lock.json‎

Lines changed: 559 additions & 374 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎source/_posts/Intro-to-Data-Mining.md‎

Lines changed: 484 additions & 4 deletions
Large diffs are not rendered by default.

‎source/_posts/Knowledge-Engineering-and-Semantic-Web-Technology.md‎

Lines changed: 215 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,220 @@ excerpt: 南京大学2026春,知识工程及语义网技术笔记。
2323
- 知识问答
2424
- 大语言模型
2525

26-
# 1 经典知识工程简介
26+
感觉可以直接懒完,研讨、报告按自己和 AI 的来就行,极致水课。
2727

28-
数据 -> 信息 -> 知识 -> 智慧
28+
## Paper Note: Improving Distantly-Supervised Relation Extraction with Joint Label Embedding
2929

30-
# 2 万维网、语义网、本体工程
30+
> 这篇论文是你小组报告最可能用到的那篇。它的核心不是“再做一个 relation extractor”,而是想办法把 **relation label 的结构信息** 利用起来,减少 distant supervision 里的噪声。
31+
32+
### 1. Problem Setup
33+
34+
**Task: Distantly-Supervised Relation Extraction (DSRE)**
35+
36+
Given an entity pair $(e_1, e_2)$, collect all sentences mentioning this pair as a **bag**. The bag is assigned a distant supervision label from a knowledge base if $(e_1, e_2)$ is linked by a relation in the KB.
37+
38+
> 问题是:一个 entity pair 对应的 bag 里,只有少数句子真的表达了这个关系,大量句子其实是噪声。
39+
> 所以 DSRE 的核心困难不是“有没有标签”,而是“标签很 noisy”。
40+
41+
### 2. Why Existing Methods Are Not Enough
42+
43+
Common DSRE models usually use sentence-level attention or bag-level attention to select useful instances, but they still treat relation labels as simple class IDs.
44+
45+
This paper argues that relation labels have **semantic structure**:
46+
47+
- some relations are semantically close
48+
- some relations are inverse or correlated
49+
- KB facts and textual descriptions can provide extra supervision
50+
51+
> 也就是说,relation label 不是一个纯离散编号。
52+
> 它本身可以嵌入到向量空间里,和句子表示一起做匹配。
53+
54+
### 3. Main Idea
55+
56+
The paper proposes **joint label embedding**.
57+
58+
The model uses two kinds of label information:
59+
60+
1. **Knowledge graph information**
61+
- relation embeddings learned from triples
62+
2. **Textual label description information**
63+
- relation descriptions encoded from text
64+
65+
Then these two sources are fused into a **joint label representation**.
66+
67+
> 直觉上:
68+
> - KG gives structural semantics
69+
> - description gives textual semantics
70+
> - joint embedding gives a richer label space for attention and classification
71+
72+
### 4. Model Understanding
73+
74+
#### 4.1 Label Embedding
75+
76+
The paper learns a label vector for each relation.
77+
78+
One way to understand it:
79+
80+
- each relation has a KG-based embedding
81+
- each relation also has a description-based embedding
82+
- the model combines them into a final relation embedding
83+
84+
> 这一步的意义是:让 label 之间“有距离感”。
85+
> 比如两个相近关系在向量空间里也应该更接近,而不是完全独立的 one-hot 类别。
86+
87+
#### 4.2 Label-Driven Attention
88+
89+
The label embedding is then used to guide attention over sentences in a bag.
90+
91+
For a bag of sentences:
92+
93+
- encode each sentence into a vector
94+
- compare each sentence vector with the relation label embedding
95+
- give higher attention to sentences more compatible with the label
96+
97+
> 这比普通 bag attention 更强的地方在于:
98+
> attention 的依据不只是“句子本身像不像中心语义”,还包括“它像不像当前关系标签”。
99+
100+
#### 4.3 Joint Use of KG and Description
101+
102+
The paper’s key trick is to combine:
103+
104+
- structural relation semantics from KG
105+
- textual relation semantics from descriptions
106+
107+
This helps when either source alone is incomplete.
108+
109+
> KG 里有结构,但不一定有充分的文本解释。
110+
> 描述有语义,但可能不够精确。
111+
> 联合起来更稳。
112+
113+
### 5. Why It Helps in DSRE
114+
115+
DSRE has two noise sources:
116+
117+
1. **instance noise**
118+
- many sentences in a bag do not express the target relation
119+
2. **label noise / ambiguity**
120+
- distant supervision labels are only weakly aligned with sentence semantics
121+
122+
Joint label embedding helps both:
123+
124+
- better label representation reduces label ambiguity
125+
- label-guided attention reduces instance noise
126+
127+
> 所以它不是只改 encoder,而是在“标签侧”也做了建模。
128+
> 这是这篇论文最值得讲的点。
129+
130+
### 6. What to Emphasize in Group Report
131+
132+
If you present this paper, the most important storyline is:
133+
134+
1. DSRE is noisy because labels come from KB alignment, not manual annotation
135+
2. Standard attention only filters sentence noise, but ignores label semantics
136+
3. This paper builds a richer label space using KG and descriptions
137+
4. Joint label embeddings are then used to guide instance selection and classification
138+
5. The final effect is cleaner attention and better relation extraction
139+
140+
### 7. My Reading Notes
141+
142+
- **`distant supervision`** means labels are weak and noisy
143+
- **`bag`** means one entity pair with multiple sentences
144+
- **`joint label embedding`** means label semantics from multiple sources are fused
145+
- **`attention`** is used to select sentences that are more likely to express the target relation
146+
- The paper is useful for a report because it shows how **knowledge graph information can improve text mining**
147+
148+
### 8. Discussion
149+
150+
**1. Why does distant supervision introduce noise?**
151+
152+
> Because the KB relation is assigned to all sentences mentioning the entity pair, even though only some of them actually express that relation.
153+
154+
中文说明:
155+
156+
这是 DSRE 的根本问题。实体对有某个关系,不代表每一句提到这对实体的句子都真的在表达这个关系。
157+
158+
**2. What is the benefit of joint label embedding?**
159+
160+
> It captures semantic similarity between relations and provides richer supervision than a one-hot label id.
161+
162+
中文说明:
163+
164+
one-hot 标签是“互相独立”的;joint label embedding 会把标签放进向量空间,表达相似关系之间的结构。
165+
166+
**3. Why use both KG and textual descriptions?**
167+
168+
> They are complementary. KG gives structural relation knowledge, while descriptions give textual semantics. Combining them makes the label representation more complete.
169+
170+
中文说明:
171+
172+
结构知识和文本知识互补。单看 KG 可能稀疏,单看描述可能不精确,合起来更稳。
173+
174+
**4. What is the key difference between sentence-level attention and label-guided attention?**
175+
176+
> Sentence-level attention focuses on selecting useful instances in a bag, while label-guided attention additionally uses label semantics to decide which sentence best matches the target relation.
177+
178+
中文说明:
179+
180+
普通 attention 更像“找代表句”;label-guided attention 更像“找最像当前标签的句子”。
181+
182+
**5. One-sentence summary**
183+
184+
> This paper improves distant supervision relation extraction by learning joint embeddings for relation labels from KG and descriptions, and then using them to guide attention and reduce noise.
185+
186+
### 9. Group Report Outline
187+
188+
If you present this paper as a group report, a clean structure is:
189+
190+
1. **Title and task definition**
191+
- Introduce distant supervision relation extraction
192+
- Explain what a bag is
193+
- State the main noise problem
194+
195+
2. **Motivation**
196+
- Why DSRE is noisy
197+
- Why sentence-level attention is not enough
198+
- Why label semantics should matter
199+
200+
3. **Related work**
201+
- Early DSRE with distant supervision
202+
- Multi-instance learning methods
203+
- Neural attention-based methods
204+
- Methods using external information such as KG or descriptions
205+
206+
4. **Core idea of the paper**
207+
- Relation labels are not just IDs
208+
- Learn joint label embeddings from KG and descriptions
209+
- Use label embeddings to guide attention
210+
211+
5. **Model overview**
212+
- Sentence encoder
213+
- Label embedding construction
214+
- Label-guided attention
215+
- Joint representation for classification
216+
217+
6. **Why it works**
218+
- Better label semantics
219+
- Cleaner sentence selection
220+
- Less instance noise and label ambiguity
221+
222+
7. **Experiments**
223+
- Compare with CNN+ATT, APCNN+D, JointD+KATT, RESIDE
224+
- Show that RELE performs better
225+
- Mention that the improvement comes from stronger label embedding and better attention
226+
227+
8. **Takeaway**
228+
- The main contribution is not only a better encoder, but a better way to use label information
229+
- This is a useful idea for combining knowledge graph information and text mining
230+
231+
### Report Speaking Order
232+
233+
If you need a simple speaking script, use this order:
234+
235+
1. What is DSRE?
236+
2. Why is DSRE hard?
237+
3. What do existing methods do?
238+
4. What do they miss?
239+
5. What does this paper propose?
240+
6. How does the model work?
241+
7. Why is it better?
242+
8. What is the final takeaway?
Lines changed: 110 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,118 @@
11
---
22
title: 生死逆转 <Life and Death Reversal>
3-
date: 2024-04-19 00:00:00
3+
date: 2026-04-19 00:00:00
44
categories: "Fictions"
55
tags:
6-
- Birthday Gift
7-
- Fiction
6+
- Birthday Gift
7+
- Fiction
88
excerpt: 谨以此文,献给所有在生死边缘,和觉得自己在生死边缘奋力奔走之人,献给在当下努力奔走的自己。
99
---
1010

11-
纯种鸽子。
11+
萤:
1212

13-
绝赞创作中,预期作为2026年自生贺掉落。
13+
上次写信的时候,雪还没有下得这么早,海也还没有结得这么厚。极北的冬天总是来得很快,像一扇门被忽然关上,只留下一点余光和一点回声。
14+
这里的人都很少说话。不是因为冷,而是因为太安静了,安静到每个人一开口,反而会把自己心里的东西漏出来。我有时候会觉得,这种地方很适合藏一些不想被别人看见的事情。比如旧伤、比如秘密、比如一个人明明已经习惯了孤独,却还是会在夜里下意识等谁回来。
15+
你上次说,想看看极光。我想了很久,还是觉得,能让你来,大概是我做过最对的事。这里会把很多东西都留下,脚印会被雪盖住,声音会被海风吹散,连人也一样。
16+
他们都不理解我的新术式,也不太愿意听我解释。可是没关系,反正我本来也不擅长说清楚。只是有的时候,我会想,为什么明明已经把手伸出去那么多次了,还是会有东西离开呢...是我的问题吗?
17+
前几天又看见了极光。那时候天上亮得很轻,像一条慢慢流动的海。风把雪卷起来,打在窗子上,像有谁在外面轻轻敲门。
18+
你要来的话,我就去车站接你...!记得带帽子,最好还是带那种能盖住耳朵的。还有,不要穿太轻薄的衣服。
19+
20+
零
21+
22+
---
23+
24+
25+
零:
26+
27+
我收到你的信了。看到你的信,我总是忍不住笑出来。你明明总像没睡醒的样子,写起字来却比谁都认真,连雪都像被你写得安静了。
28+
你说那里很安静,我倒觉得这正好。安静一点的话,很多平时听不见的东西都会冒出来,比如脚步声、炉火声,还有某个人在夜里翻身时衣料摩擦的声音。
29+
我会去的。不是“如果有空”的那种会去,是一定会去。你说极光像海,我就更想看了。我想看看那种会在天上发光的水,想看看你住的地方到底是什么样子,也想看看,你是不是又把自己裹在那件看起来像睡衣一样的衣服里。
30+
你要真的来接我,就别站得离我太远。我认路不差,但我不太认得你写在信里的样子。我想知道,站在车站的人,是不是会和字迹一样安静。
31+
如果你真的像信里说的那样去过很多地方,那就再多来一点吧。那边一定很大吧,海也很大,我也想留在那边很久。等我到了,我们一起去看雪、看海、看极光。你想说的话,就等我过去...
32+
33+
萤
34+
35+
---
36+
37+
在列车上摇晃了很久,萤总算是来到了信上提到的地方。
38+
一片冰天雪地,就像是童话故事里的小镇一样,房子只用简单明亮的色彩装饰,屋顶上和脚下永远是皑皑白雪,见不到高楼,好似是从绘本里跳脱出来的。
39+
零穿着信里说过的装束。白灰带着暗红花边的下摆很长的睡衣,玫瑰红的发圈圈住了白色末梢染点蓝的头发,很细的黑方框眼镜后面是粉的发紫的眼瞳,一个小小的水蓝色挎包,和小吊坠。看上去就是一副无精打采的样子,像是天天熬夜,对什么事情都提不起兴趣。
40+
萤尝试着向着零挥了挥手,零好似慢了半拍,才反应过来。
41+
“...不...冷吗?”
42+
“真是穿睡衣啊。”
43+
两人同时发声,完全没什么问候语,好像根本不是第一次见面。零从挎包里拿了些刻有取暖术式的魔法石,被“我之前来过北方的啦,有好好保暖”说过去了,倒是零反问“上哪去找毛绒绒的、带毛绒绒兜帽的连衣裙?”让萤哭笑不得。这家伙真是奇怪啊。
44+
当地因严寒,故对取暖一类的魔术需求很高,取自死火山的、带取暖术式的魔法石效果极好,其和大量的冰水晶一并作为出口商品。那些暖石回到了挎包里,零那指尖有一下没一下地在包带上敲打着。
45+
这里,世界的至北方,缺少阳光使得零皮肤雪白。萤不自觉地抓起了那娇小的手,暖和的很。
46+
“我们接下来去哪?”
47+
一小段的沉默,总不能说其实还没想好吧,于是零用很小声的“你想去哪...”打算拖一下时间想想,毕竟虽然才下午两三点,但是在这个阳光稀缺的地方,已经是极夜了。
48+
“温泉!好不好!早就想来了!”
49+
“...好,走吧。”
50+
零慢吞吞地在前头带路,脚下松软的新雪发出“嘎吱嘎吱”的轻响。萤跟在后面,好奇地打量着这个静谧得如同 沉睡的童话小镇。周围的木屋窗户里透出暖黄色的灯光,与冰蓝色的雪地形成温柔的对比。
51+
“不远了,”零的声音带着点慵懒的尾调,混在清冷的空气里,“那家旅馆...临海...我常去,有这里最好的温泉...而且...晚上能看到极光。”
52+
“极光?”萤的眼睛亮了起来。
53+
“嗯,如果运气好的话。不过...”
54+
“不过什么?”
55+
“没关系,你迟早会看到的。
56+
“永远永远看到......”
57+
58+
温泉的老板似乎和零很熟,零只是随便和他打了个招呼。泡完温泉出来,天空已经只剩下最后一抹夕阳。带着橙色微光的小水珠翻越在零的白色短发,和萤的金黄长发上。
59+
“更北的地方...我住在那片岛上。
60+
“现在那里应该是是极夜...去看极光吧。”
61+
小小的手,慢慢地蹭过来,零把身子完全靠在了萤身上,刚出浴的两人之间若隐若现的热气带着一丝甜味,化作水汽四散开来。
62+
“好噢!”
63+
零取走了旅馆门前置物架上的一柄扫把。看来她来时的东西就寄在放这。萤抱住了零,而零对于两个人的体重明显有些不熟练,正在笨拙的维持着飞行魔术,也还好是维持住了平衡。
64+
65+
安稳到了。
66+
“给你这个。在这片地区活动还是带着这个比较好。”
67+
萤小心地接过来,是护身符形状的吊坠,上面刻着萤完全没见过暗红色水母状的图案,里面的术式也看不懂。
68+
”有什么特别的用处嘛?我没见过这种术式...“
69+
”大概我也不太懂,但是能让你精神稳定一些吧。”零笑了一下,谁知道她真的懂不懂呢。“好好带着吧,和我的这个是一对呢。”
70+
零指了指自己戴着的,上面刻印的是白色倒水母状的图案。细细看了看,好像这个吊坠并不会对自己有害,于是也戴上了,和零一边往岛中央走去。这座岛上的居民也并不多,慢慢的才看见住所,以及居民。在这个极北之地,萤见到大家穿的都是橙红色的衣服,用以显目标识,有一搭没一搭地和零说着话,零也只是点点头,好像已经很熟了。
71+
“为什么你的衣服还是白色的呢...?”
72+
零沉默了一会,“因为只有我...”,说的很小声,几乎听不清后面的内容,然后突然地转过来抱住,“不要离开我...”
73+
抱的越来越紧了,零的头深深地埋在萤的胸里,头发散乱无章地披着,萤也只好顺着抱住。
74+
“嗯。
75+
“我来一直陪你吧。”
76+
77+
和零紧紧攥着手,一路走到了零的家。简单吃过后,被零抱了好久。
78+
“最近几天的夜晚都很晴朗噢...这几天都有极光的说
79+
“一起看啦...”
80+
零宝真的好粘人...萤大概这么想着,任由她在自己怀里撒娇。
81+
依偎在一起的两人就这样在烤着火的炉子旁有一搭没一搭地说着话。火苗温柔地跳动着,毕毕剥剥地映出二人的侧脸,直到时间来到晚上。
82+
窗外的夜色像一整块沉静的黑绸,压得很低,几乎要贴到海面上。远处的冰原没有声音,连风都像被冻住了。
83+
起初只是很淡的一线青白。接着,那道光慢慢地、慢慢地舒展开来,变成了纤细的帷幕。帷幕一层层落下,边缘泛着幽蓝和浅紫,像雪化成了光,带着一种近乎不真实的柔软。
84+
光并不刺眼,却足够让整片天空都活过来。它在遥远的天顶上缓慢地流动、翻卷、折叠,像海潮,又像某种正在苏醒的生物。偶尔有一两缕更亮的绿色从深处浮起,穿过冰冷的夜空,落在窗棂上,落在零的睫毛上,也落在萤的眼睛里。那一刻,世界像被浸进了一汪发光的静水之中。
85+
86+
“看到了嘛...”
87+
萤没有立刻回答,只是抬着头,任由那片极光一点点铺满视野。明明周围还是那么冷,那么寂静,可胸口却忽然涨起一种说不清的暖意,像有什么被很轻很轻地放了进去。
88+
“真漂亮。”
89+
零靠在她怀里,也望着那片不断变幻的天幕,眼神安静得近乎虔诚。
90+
极光在天上无声地燃烧着,像一场从不落地的火。那焰一会儿蓝,一会儿绿,一会儿又淡得像要融进夜里,仿佛连时间都被它拖慢了脚步,只剩下这一刻,静静停驻在这个寒冷而温柔的地方。
91+
92+
悉悉簌簌地,零在包里翻找着什么东西。猝不及防地,在旁别紧靠着肩膀的零转过头,亲了上来。只是震惊了一下,就闭上了双眼,任由那柔软的小嘴和自己的贴在一起,以及肆意地推倒自己,接受着对方娇小的身躯和滚烫的体温,十指相扣。然后,十分突兀地,感受到零的舌尖,将什么东西送了进来。
93+
挣扎着睁开眼睛,对上的是零那充满偏爱的双眼,像是玩具必须永远给主人玩一样。本能地想去确认嘴里的是什么东西,却被零拼尽了全力压在身子下,堵住嘴。感受到附在外层的东西正在以极快的速度溶化,然后——一股苦杏仁味在口腔里弥漫开来。
94+
零松开了嘴巴,然后死死地抱住萤,“对不起......
95+
“因为只有我...一个人...住在这里啊...
96+
“你说过的...要来一直陪我啊...”
97+
98+
---
99+
100+
生死逆转术式
101+
术式呈泛红光黑色水母样。其解除术式呈泛蓝光白色倒水母样。
102+
令作用对象的精神受干涉,分别对于:
103+
104+
- 仍有具体轮廓的生物尸体:见到其存活时的幻象。
105+
- 濒死的生物:距离死亡越近,见到其越清晰的幻象。
106+
- 存活的生物:不可见。
107+
108+
精神干涉系术式理应受到严格管控,对其的使用(如审讯)需上报批准。
109+
110+
---
111+
112+
后记
113+
114+
- Ω(Unicode:U+2126)代表“死(Death)”。
115+
- ℧(Unicode:U+2127)代表“生(Life)”。
116+
灵感来自于[生死逆转](https://isaac.huijiwiki.com/wiki/C711),离上一篇自生贺也有三年了,只是中间断断续续地打磨这个想法就花掉了快两年。
117+
这三年也发生了很多事吧,以前是想写给自己的,但是现在也不知道了。完全不明白,也什么都不想知道...
118+
要和我紧紧抱住噢...[NamelessYing](https://www.namelessying.xin/)...
1.78 MB
Binary file not shown.
1.99 MB
Binary file not shown.
2.43 MB
Binary file not shown.

‎source/imgs/Data-Mining/2_Data.pdf‎

668 KB
Binary file not shown.
2.43 MB
Binary file not shown.

0 commit comments

Comments
 (0)