File size: 4,652 Bytes
a03f5ea
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
---
library_name: pytorch
license: mit
tags:
  - protein
  - enzyme
  - protein-language-model
  - bioinformatics
  - protein-function-prediction
---

# UNKAI

UNKAI is a protein-pair classification model for predicting whether two proteins are associated with the same enzymatic reaction.

The model takes per-residue protein embeddings as input, independently pools the two proteins using attention pooling, computes the absolute difference between the resulting protein-level representations, and performs binary classification with a multilayer perceptron.

Code and inference utilities are available at:

https://github.com/ukai3313/UNKAI

## Model variants

This repository contains two pretrained UNKAI variants.

### Original

Architecture:

```text
Per-residue embeddings
        |
Attention Pooling
        |
Protein vectors v1, v2
        |
    |v1 - v2|
        |
2560 -> 1599 -> 781 -> 117 -> 1
        |
     Sigmoid
```

The original model uses:

* Input embedding dimension: 2560
* Attention pooling
* Pair representation: absolute difference `|v1 - v2|`
* MLP dimensions: `2560 -> 1599 -> 781 -> 117 -> 1`
* Dropout: `0.302766`

Checkpoint:

```text
original/model.pth
```

### Seen-unseen

The seen-unseen model is designed for evaluation where one side of a validation or test pair belongs to a protein cluster observed during training, while the other side belongs to a cluster not observed during training.

Architecture:

```text
Per-residue embeddings
        |
Attention Pooling
with attention dropout
        |
Protein vectors v1, v2
        |
    |v1 - v2|
        |
2560 -> 1408 -> 640 -> 512 -> 1
```

The model uses:

* Input embedding dimension: 2560
* Attention pooling
* Attention dropout: `0.1627294925`
* Pair representation: absolute difference `|v1 - v2|`
* MLP dimensions: `2560 -> 1408 -> 640 -> 512 -> 1`
* Classifier dropout: `0.5282298379`

Checkpoint:

```text
seen_unseen/model.pth
```

The checkpoint produces logits. A sigmoid transformation is applied during inference to obtain a probability.

## Input format

UNKAI expects one per-residue embedding file for each protein.

Expected filename:

```text
<UNIPROT_ACCESSION>_embedding.npy
```

Supported array shapes are:

```text
(L, 2560)
```

or:

```text
(1, L, 2560)
```

where `L` is the protein sequence length.

The released checkpoints were trained using 2560-dimensional per-residue protein embeddings.

## Installation

Clone the UNKAI GitHub repository:

```bash
git clone https://github.com/ukai3313/UNKAI.git
cd UNKAI
pip install -r requirements.txt
```

Add the source directory to `PYTHONPATH`:

```bash
export PYTHONPATH="$PWD/src"
```

## Inference

### Original model

```bash
python -m unkai.predict \
  --model original \
  --protein1 Q6GZV6 \
  --protein2 Q6GZN7 \
  --embeddings-dir /path/to/embeddings \
  --checkpoint /path/to/original/model.pth
```

### Seen-unseen model

```bash
python -m unkai.predict \
  --model seen_unseen \
  --protein1 Q6GZV6 \
  --protein2 Q6GZN7 \
  --embeddings-dir /path/to/embeddings \
  --checkpoint /path/to/seen_unseen/model.pth
```

Example output:

```text
Protein 1   : Q6GZV6
Protein 2   : Q6GZN7
Model       : original
Probability : 0.002518
Prediction  : 0
```

The current inference utility uses a probability threshold of `0.5`.

* `Prediction = 1`: predicted to be associated with the same enzymatic reaction.
* `Prediction = 0`: predicted not to be associated with the same enzymatic reaction.

## Files

```text
original/
└── model.pth

seen_unseen/
└── model.pth
```

## Datasets

Datasets used with UNKAI are released separately:

```text
ukaikotaro/UNKAI-dataset
```

Three dataset variants are provided:

* original
* seen_unseen
* strict

See the dataset repository for details about the splitting strategies.

## Embeddings

The pretrained UNKAI checkpoints require precomputed per-residue protein embeddings.

The embedding collection used in this project is planned to be distributed separately.

## Limitations

UNKAI predicts association between a pair of proteins with respect to enzymatic reactions and should not be interpreted as direct experimental evidence of identical biochemical function.

Performance may depend on the distribution of proteins, sequence similarity, clustering strategy, and embedding model used to construct the input representations.

The original and seen-unseen checkpoints were trained using different dataset splitting strategies and should therefore not be directly compared without considering the evaluation setting.

## Citation

Citation information for the associated publication will be added here.

## License

MIT License.