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 PseudoProjector

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.2.tar.gz (5.3 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.2-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pseudo_projector-0.0.2.tar.gz
Algorithm Hash digest
SHA256 ce473af0a16e4c074cb57a77bb2a1f95ccfd5540a5bd14c09b95c89d61366991
MD5 35d7c05d63103eec9d446206265de44c
BLAKE2b-256 693baf87c2bf928d1e8e7e8ae2825eb757e0f9e802e56e0d4de153c29cd2cfa0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pseudo_projector-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5b1a8b134a93fd570fbc7bf454b5aa2830271ae9b69bd2f784b60a3f349d74d3
MD5 acfa10ea52c653766490a00b064e1e21
BLAKE2b-256 d8f266a53079cde5b7f997a8f084114b9a72381fb1b227d6e14a560942132166

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