当前位置:网站首页>OpenHGNN发布0.3版本
OpenHGNN发布0.3版本
2022-06-27 12:44:00 【智源社区】
GAMMA Lab于今日正式发布OpenHGNN第三个版本,大家可以从github、启智社区或者通过pip下载最新的OpenHGNN。新版本包含如下新功能:更新异质图相关模型、提供API调用方式、简化定制数据集和模型流程、提供异质图统计信息可视化工具等。
一、更新异质图模型
OpenHGNN第三版本修改和新增了一些异质图模型。
新增节点间含有多类型边的异质图嵌入模型:GATNE(KDD 2019) 新增知识图谱嵌入模型:TransE(NeurIPS 2013) TransH(AAAI 2014) TransR(AAAI 2015) TransD(ACL 2015)
我们利用DGL v0.8新提供的API——TypedLinear和HeteroLinear,新增和修改了下列注意力网络模型。
修改:
异质图结合Transformer的注意力网络:HGT(WWW 2020) 简易的异质图注意力网络:SimpleHGN(KDD 2021)
新增:
异质结构学习的注意力网络:HetSANN(AAAI 2020) 可解释的,高效的异质图注意力网络:ieHGCN(TKDE 2021)
二、新的使用方式
在一行命令运行实验的基础上,我们提供了Experiment接口给用户提供了在既有的模型和数据集下设置参数和运行实验的另一选项。用户可以用简单的代码,通过自定义实验参数来运行一个实验,以及通过自定义参数搜索空间来进行超参数优化。
运行实验
experiment = Experiment(model='RGCN', dataset='acm4GTN', task='node_classification',
gpu=0, max_epoch=50, lr=0.01, hidden_dim=64, dropout=0.2, n_layers=2)
experiment.run()
超参数优化
def search_space(trial):
return {
"lr": trial.suggest_categorical("lr", [1e-3, 5e-3, 1e-2]),
"hidden_dim": trial.suggest_categorical("hidden_dim", [32, 64]),
"dropout": trial.suggest_uniform("dropout", 0.0, 0.5),
'n_layers': trial.suggest_int('n_layers', 2, 3)
}
experiment = Experiment(model='RGCN', dataset='acm4GTN', task='node_classification', gpu=0,
hpo_search_space=search_space, hpo_trials=20)
experiment.run()
三、简化定制数据集和模型流程
我们支持用户通过简单的代码自定义数据集和模型,并基于OpenHGNN构建实验。
定制数据集
受DGL v0.8中Dataset Adapter启发,我们提供了异质图数据集适配器,通过调整用户提供的DGLDataset来运行OpenHGNN当中的节点分类和链路预测任务。
对于节点分类任务,用户可以仅通过提供一个含有节点标签的异质图数据集,指定目标节点类型和划分比例,将自己的数据集应用到OpenHGNN的节点分类任务中。
对于链路预测任务,用户提供原始的异质图、预测边类型和划分比例,数据集适配器会自动做数据集划分以及测试集和验证集上的负边采样,使用户数据集能够运行OpenHGNN的链路预测任务。
定制模型
多数异质图神经网络模型遵循消息传递范式,前向传播的过程中把图结构和节点初始特征作为输入,输出经过邻居聚合的中心节点表征。用户可以自行开发遵循统一前向传播格式的HGNN模型,将其应用到OpenHGNN的训练流程当中。
详细内容和示例代码可参考:https://github.com/BUPT-GAMMA/OpenHGNN/tree/main/examples/customization
四、异质图统计信息可视化工具
我们提供了三个异质图统计信息可视化的API,分别对节点比例、节点度分布、元路径数量进行了统计和可视化,便于研究人员对异质图的结构信息进行直观的展示。下图展示了IMDB数据集中不同类型节点度分布的信息。

五、开源社区
随着新功能的发布,我们逐步收集到了社区用户的一些反馈信息,让我们看到了用户的需求和用户视角中OpenHGNN的缺陷不足,也为我们提供了未来开发演进的思路。我们欢迎大家使用OpenHGNN的新版本,也欢迎提出任何问题和建议。
边栏推荐
- Custom multithreading base class threading Event
- First encounter with dynamic programming
- convn-N 维卷积
- Viewpager2 usage record
- Introduce you to ldbc SNB, a powerful tool for database performance and scenario testing
- Record number of visits yesterday
- Neo4j: basic introduction (I) installation and use
- Uni app develops wechat applet to dynamically render pages and dynamically change the order of page component modules
- 清楚的自我定位
- [dynamic programming] - Knapsack Problem
猜你喜欢

Record number of visits yesterday

Sword finger offer 04 Find in 2D array

Uniapp drop-down layer selection box effect demo (sorting)

Industry insight - how should brand e-commerce reshape growth under the new retail format?

Bluetooth health management device based on stm32

On the complexity of software development and the way to improve its efficiency

Database Series: MySQL index optimization and performance improvement summary (comprehensive version)

全球最快下载工具 XDM

zabbix支持钉钉报警

xxl-job学习梳理
随机推荐
Review summary of database
关闭windows defender安全中心的方法
To understand again is the person in the song
Deeply convinced plan X - system foundation summary
Hue new account error reporting solution
Database Series: MySQL index optimization and performance improvement summary (comprehensive version)
硬件开发笔记(七): 硬件开发基本流程,制作一个USB转RS232的模块(六):创建0603封装并关联原理图元器件
Differences in perspectives of thinking
Details of istio micro service governance grid traffic management core resource controller
全球最快下载工具 XDM
浅谈软件研发的复杂性与效能提升之道
【动态规划】—— 背包问题
The browser enters the URL address, and what happens to the page rendering
创建Deployment后,无法创建Pod问题处理
Clear self orientation
隐私计算FATE-离线预测
How to modify a node_ Files in modules
Principle of printf indefinite length parameter
外包2年的我终于上岸了!记录我的字节跳动3轮面试,希望帮助到大家!
数字化新星何为低代码?何为无代码