Comments (2)
感谢关注哈,前段时间忙发现这个issue,不知道是否已有同学回复了。我来简单解答一下问题:
1 在设计 KE loss 的时候是怎样考虑的?当时在实验的时候,KE loss 的表现又是如何?
答:设计KE主要为了隐式建立实体和关系间的一种关联,原理和之前一些知识增强提示学习的**是类似的,我们的确参考了transe。KE loss是有超参数控制的起到一种类似正则的作用,对模型影响较大的是同时学习verbalizer和prompt的embedding这一过程。对于少样本实验,方差会较大,需要run多次进行调参。
2负样本的选取中,是在 max_token_length 长度上选取的,必定也会包含 prompt 部分和 句子后面 padding 部分的 token,这个当时有没有考虑呢?
答: 这部分未做特殊处理,不过个人经验padding部分影响不大。
3 负样本的计算为什么会选用 real_relation_embedding,而不是选择模型的输出呢?
答:模型设计是为了学习更好的prompt 和verbalizer,这里real_relation_embedding表示了可学习的verbalizer,而且这个emb是有初始化向量的(关系标签词),用模型输出开始学习的时候很难保证能采样到符合要求语义的样本。
from knowprompt.
但是直接使用
$(s + r - o)$ 的方式,感觉是有点简单粗暴了哈~
这部分我后来做了些功课,这里计算使用的
https://github.com/thunlp/KB2E/blob/master/TransE/Test_TransE.cpp#L98-L108
Translating Embeddings for Modeling Multi-relational Data
from knowprompt.
Related Issues (20)
- 关于预训练语言模型选择的问题 HOT 2
- paper中虚拟的type word是每个relation都一样吗? HOT 2
- experiment result HOT 1
- ValueError: too many values to unpack (expected 4) HOT 1
- Missing weighted average function for virtual answer word HOT 4
- 效果复现 HOT 2
- 运行报错 HOT 13
- Hi! How to run this code with BART model? Would you give an example of parameters setting? Thank you so much!! HOT 4
- 有关virtual type words的embedding的初始化问题 HOT 10
- 关于two-stage中的第一个阶段,论文中的描述是否和代码不一致 HOT 1
- pytorch_lightning.utilities.exceptions.MisconfigurationException: No `test_dataloader()` method defined to run `Trainer.test`. HOT 1
- code HOT 8
- configure_optimizers def HOT 1
- chinese fields HOT 15
- 跑代码报错:ValueError: Connection error, and we cannot find the requested files in the cached path. Please try again or make sure your Internet connection is on. HOT 3
- 下载模型到本地后代码仍然报错:在main.py中更改了地址,仍然报错 HOT 2
- compute micro F1 in code and replicate the results in paper HOT 2
- python3.8 version is not compatible with pytorch1.8.1+cu111 HOT 2
- .ckpt FileNotFoundError HOT 7
- what is the difference between virtual type words and soft prompt HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from knowprompt.