Skip to main content

Implementation of the Pseudo-Projector, application of multigrid methods to deep neural networks, by Vitaly Bulgakov

Project description

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},
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pseudo_projector-0.0.3.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pseudo_projector-0.0.3-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file pseudo_projector-0.0.3.tar.gz.

File metadata

  • Download URL: pseudo_projector-0.0.3.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.13

File hashes

Hashes for pseudo_projector-0.0.3.tar.gz
Algorithm Hash digest
SHA256 3f24f82e82891385bca13dc4898bd90d44ca970277d285addee404dc78e0739f
MD5 257d865c14fc95fc9a1c761ab0d2d2e1
BLAKE2b-256 feb9fa82073d775f82e8e6529b29225b0003d0bb956e3bcd9307c4d4384b3bde

See more details on using hashes here.

File details

Details for the file pseudo_projector-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pseudo_projector-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2b8b6252f3c9e02597108cd4fb0337d4f24f4d75c31f00e1ebb84b74d9e70957
MD5 6c88796be3c5e0e0d91d4d85d04bab45
BLAKE2b-256 d0db3e4fd4e262b4015fbf5bb11c544bab6353971778896bec46baf768a86770

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page