Pseudo-projector
Implementation of the pseudo projector proposed by Vitaly Bulgakov during his work applying transformers to medical records at Mass General Brigham Hospital
Install
$ pip install pseudo-projector
Usage
import torch
from pseudo_projector import PseudoProjector
proj = PseudoProjector(dim = 64, dim_lowrank = 16)
feats = torch.randn(1, 8, 1024, 64) # any number of preceding dimensions
out = proj(feats)
assert feats.shape == out.shape
With the learned blending of original features with the coarsened ones
import torch
from pseudo_projector import PseudoProjectorWithResidual
proj = PseudoProjectorWithResidual(dim = 64, dim_lowrank = 16, learned_alpha = True)
feats = torch.randn(1, 8, 1024, 64) # any number of preceding dimensions
out = proj(feats)
assert feats.shape == out.shape
Citations
@misc{bulgakov2026correctiontransformerbasedmodelssmoothing,
title = {Correction of Transformer-Based Models with Smoothing Pseudo-Projector},
author = {Vitaly Bulgakov},
year = {2026},
eprint = {2603.09815},
archivePrefix = {arXiv},
primaryClass = {cs.LG},
url = {https://arxiv.org/abs/2603.09815},
}
Metadata
Release files for pseudo-projector 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pseudo_projector-0.0.4.tar.gz | 5.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pseudo_projector-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.2 kB
Release files / pseudo_projector-0.0.4.tar.gz
| Download URL | pseudo_projector-0.0.4.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
51442166dbcad2a89fabf6897e0f181799f298243fb812d7372a65682e8aec4e
|
|
BLAKE2b-256 checksum How to use checksums |
88ae5936e1b64b0d24c35ace8083c964ad62e11908078b6a6430c1eb3c2b93a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.13
|
Release files / pseudo_projector-0.0.4-py3-none-any.whl
| Download URL | pseudo_projector-0.0.4-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d60e30656cf894282cf50a892fa00fcfd9f28bd45983072e5bc31d727d65b973
|
|
BLAKE2b-256 checksum How to use checksums |
88d6cf8fcfd50d1b0e466da72ccb77f4006e480527cd04b9aa6aead40479b48a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.13
|