Testing the Combination of Two Experimental Drugs MK-3475 (Pembrolizumab) and Interferon-gamma for the Treatment of Mycosis Fungoides and Sézary Syndrome and Advanced Synovial Sarcoma

This phase II trial studies how well pembrolizumab and interferon gamma-1b work in treating patients with stage IB-IVB mycosis fungoides and Sezary syndrome that has come back (relapsed) or has not responded to previous treatment (refractory). Immunotherapy with monoclonal antibodies, such as pembrolizumab, may help the body's immune system attack the cancer, and may interfere with the ability of tumor cells to grow and spread. Interferon gamma-1b may boost the immune system activity. Giving pembrolizumab and interferon gamma-1b together may work better in treating patients with stage IB-IVB mycosis fungoides and Sezary syndrome.

PRIMARY OBJECTIVES:

I. To assess the overall response rate (ORR) of MK-3475 (pembrolizumab) and interferon gamma-1b (IFN-G) (Actimmune) combination immunotherapy in subjects with previously treated mycosis fungoides or Sezary syndrome. (Treatment Group 1) II. To determine whether the combination of interferon gamma-1b (ACTIMMUNE) and MK-3475 (pembrolizumab) improves the ORR of pembrolizumab in patients with unresectable or metastatic synovial sarcoma. (Treatment Group 2)

SECONDARY OBJECTIVES:

I. To explore the safety/tolerability and clinical activity of MK-3475 (pembrolizumab) and IFN-G (Actimmune) in subjects with previously treated mycosis fungoides or Sezary syndrome with respect to (Treatment Group 1):

Ia. Safety and tolerability. Ib. Time to response (TTR). Ic. Duration of response (DOR). Id. Progression-free survival (PFS). Ie. Event-free survival (EFS). If. Percentage of all patients who have a response duration of at least 12 months (ORR12).

II. To determine the progression-free survival (PFS) and overall survival (OS) for patients with advanced synovial sarcoma receiving interferon gamma-1b and MK-3475 (pembrolizumab). (Treatment Group 2) III. To determine the tolerability of the combination of interferon gamma-1b and MK-3475 (pembrolizumab) based on Common Terminology Criteria for Adverse Events (CTCAE) version 5.0. (Treatment Group 2)

EXPLORATORY OBJECTIVES:

I. To investigate the relationship between the following putative biomarkers for combination immunotherapy of MK-3475 pembrolizumab) and IFN-gamma (Actimmune) and clinical outcomes (as measured by safety/tolerability and ORR, DOR, PFS, EFS) in subjects with previously treated mycosis fungoides or Sezary syndrome, including tumor/microenvironment (PD-1/PD-L1/PD-L2 expression, cytotoxic T lymphocyte \[CTL\]s, regulatory T cell \[Treg\]s, macrophages, dendritic cell \[DC\]s; nanostring gene expression profile), systemic immune response (flow cytometry, mass cytometry \[CyTOF\], Luminex multiplexed cytokine profile), and molecular/genomic immune correlates (exome sequencing, high throughput sequencing \[HTS\] for T cell receptor \[TCR\]). (Treatment Group 1)

II. To investigate paired, serial biopsy specimens from pre-treatment and 8-12 weeks after starting treatment for the following (Treatment Group 2):

IIa. MHC class I expression (scored by pathologist). IIb. Number of infiltrating T cells per mm\^2. IIc. Tumor associated macrophage number and phenotype using multiplex immunohistochemistry.

IId. T cell clonality. IIe. Gene expression profiling.

III. To investigate peripheral blood samples from patients to determine (Treatment Group 2):

IIIa. The number and phenotype of T cells specific for computed tomography (CT) antigens and potential neo-antigens.

IIb. The phenotype and activation state of circulating monocytes and peripheral blood mononuclear cell (PBMC).

IIc. Cytokines associated with response.

OUTLINE: Patients are assigned to 1 of 2 groups.

GROUP I: Patients with Mycosis Fungoides and Sezary Syndrome receive pembrolizumab intravenously (IV) over 30 minutes on day 1. Cycles repeat every 3 weeks for up to 2 years in the absence of disease progression or unexpected toxicity. Patients also receive interferon gamma-1b subcutaneously (SC) 3 times per week for 12 weeks, and then follow 3 weeks on and 3 weeks off schedule for up to 2 years in the absence of disease progression or unexpected toxicity.

GROUP II: Patients with advanced synovial sarcoma receive pembrolizumab IV over 30 minutes on day 1 and interferon gamma-1b SC once a week. Cycles repeat every 3 weeks for up to 2 years in the absence of disease progression or unexpected toxicity.

After completion of study treatment, patients are followed up for 30 days and then every 12 weeks for up to 1 year.

Eligibility Criteria:
Inclusion Criteria:

* MYCOSIS FUNGOIDES /SEZARY SYNDROME (TREATMENT GROUP I)
* Stage IB-IVB Mycosis Fungoides or Sezary syndrome, and who have relapsed, are refractory, or progressed after at least one standard systemic therapy; maximal stage since diagnosis will determine eligibility; current disease stage at time of entry will also be documented but will not be used for eligibility
* Subjects must have the following minimum wash-out from previous treatments and without treatment between documentation of relapse/progression and enrollment:

  * \>= 2 weeks for local radiation therapy
  * \>= 8 weeks for low dose (12 Gy or less) Total Skin Electron Beam Therapy (TSEBT)
  * \>= 4 weeks for systemic cytotoxic anticancer agents, anticancer investigational agents that are not defined as immunotherapy, or for tumor-targeting monoclonal antibodies (mAbs) with the exception of alemtuzumab for which the washout is at least 16 weeks
  * \>= 15 weeks for anti-CD137 or anti-CTLA-4 (including ipilimumab or any other antibody or drug specifically targeting T-cell co-stimulation or checkpoint pathways)
  * \>= 2 weeks from resolution (i.e., \< grade 1 or at baseline) from adverse event (AE)s due to procedures performed or therapeutic agents administered
  * \>= 2 weeks for retinoids, interferons, vorinostat, romidepsin and denileukin diftitox
  * \>= 4 weeks for doses of systemic corticosteroids greater than 10 mg/day of prednisone or equivalent; patients who are on physiologic doses of corticosteroids (prednisone equivalent 10 mg/day or less) may participate, however, they must be on a stable dose for at least 4 weeks before enrollment; patients who are on low or moderate potency topical corticosteroids may participate if they are on a stable dose for at least 4 weeks before enrollment; inhaled corticosteroids are acceptable; local injections of corticosteroids are acceptable; all corticosteroids will be reported as concomitant medications
  * \>= 2 weeks for phototherapy
  * \>= 1 week for topical therapy (including retinoid, nitrogen mustard, or imiquimod)
* Patients with prior treatment with IFN-gamma will be eligible, if they previously tolerated IFN-gamma, however patients must be off of IFN-gamma for at least three weeks before initiation of therapy on this trial
* Age \>= 18 years
* Have measurable disease based on modified severity-weighted assessment tool (mSWAT); tumor lesions situated in a previously irradiated area are considered measurable if progression has been demonstrated in such lesions
* Have a performance status of 0 or 1 on the Eastern Cooperative Oncology Group (ECOG) performance scale
* Absolute neutrophil count (ANC) \>= 1500/mcL (performed within 10 days of treatment initiation)
* Platelets \>= 100000/mcL (performed within 10 days of treatment initiation)
* Hemoglobin \>= 9 g/dL or \>= 5.6 mmol/L (performed within 10 days of treatment initiation)
* Creatinine =\< 1.5 x upper limit normal (ULN) (performed within 10 days of treatment initiation) OR
* Measured or calculated creatinine clearance \>= 60 mL/min for patient with creatinine levels \> 1.5 x institutional ULN (performed within 10 days of treatment initiation)

  * Creatinine clearance (CrCl) should be calculated per institutional standard; glomerular filtration rate (GFR) can also be used in place of creatinine or CrCl
* Total bilirubin =\< 1.5 x ULN OR direct bilirubin =\< ULN for patients with total bilirubin levels \> 1.5 x ULN (performed within 10 days of treatment initiation)
* Aspartate aminotransferase (AST) (serum glutamic-oxaloacetic transaminase \[SGOT\]) and alanine aminotransferase (ALT) (serum glutamate pyruvate transaminase \[SGPT\]) =\< 2.5 x ULN OR =\< 5 x ULN for patients with liver metastases (performed within 10 days of treatment initiation)
* The effects of MK-3475 (pembrolizumab) and interferon-gamma on the developing human fetus are unknown; for this reason and because anti-PD-1 agents and interferons may be teratogenic, women of child-bearing potential and men must agree to use adequate contraception (hormonal or barrier method of birth control; abstinence) before to study entry and for the duration of study participation
* Female patients of childbearing potential must have a negative urine or serum pregnancy test within 72 hours before receiving the first dose of study medication; if the urine test is positive or cannot be confirmed as negative, a serum pregnancy test will be required
* Female patients of childbearing potential must be willing to use an adequate method of contraception for the course of the study through 120 days after the last dose of study medication; Note: abstinence is acceptable if this is the usual lifestyle and preferred contraception for the patient
* Male patients of reproductive potential must agree to use an adequate method of contraception starting with the first dose of study therapy through 120 days after the last dose of study therapy; Note: abstinence is acceptable if this is the usual lifestyle and preferred contraception for the patient
* Should a woman become pregnant or suspect she is pregnant while she or her partner is participating in this study, she should inform her treating physician immediately; men treated or enrolled on this protocol must also agree to use adequate contraception before the study, for the duration of study participation, and 4 months after completion of MK-3475 (pembrolizumab) and interferon-gamma administration
* Ability to understand and the willingness to sign a written informed consent document
* SYNOVIAL SARCOMA (TREATMENT GROUP II)
* Diagnosis of translocation associated sarcoma that generally expresses NY-ESO-1 (e.g., synovial sarcoma or myxoid/round cell liposarcoma); tumor must have been reviewed by a bone and soft tissue pathologist; patient must have metastatic or unresectable disease
* At least one prior line of chemotherapy
* Age \>= 12 years; patients \>= 18 years of age must be able and willing to provide informed consent; patients under 18 years of age must have a parent or guardian willing and able to provide consent
* Eastern Cooperative Oncology Group (ECOG) performance status of 0, 1 or 2
* Life expectancy greater than or equal to (\>=) 12 weeks
* Measurable disease, as defined by Response Evaluation Criteria in Solid Tumors (RECIST) version 1.1
* Tumor safely accessible for biopsy
* Adequate hematologic and end organ function
* For female participants of childbearing potential and male participants with partners of childbearing potential, agreement (by participant and/or partner) to use highly effective form(s) of contraception

Exclusion Criteria:

* MYCOSIS FUNGOIDES /SEZARY SYNDROME (TREATMENT GROUP I):
* Has disease that is suitable for local therapy administered with curative intent
* Patients who have had chemotherapy or targeted small molecule therapy within 4 weeks (6 weeks for nitrosoureas or mitomycin C) before entering the study
* Patients who have had an allogeneic stem cell transplant are excluded because such transplants disrupt the normal immune response to a very substantial degree; in addition, emerging data suggests exacerbation of lethal graft versus host disease (GVHD) may occur in such patients when treated post allotransplant with PD-1 blockade
* Has received prior therapy with an anti-PD-1, anti-PD-L1, or anti-PD-L2
* Patients who have received an investigational agent or have used an investigational device within 4 weeks of the first dose of study drug
* Has a history of a well-characterized and defined immune deficiency before the diagnosis of mycosis fungoides or Sezary syndrome or is receiving systemic steroid therapy greater than 10 mg/day of prednisone or equivalent within 4 weeks or any other form of immunosuppressive therapy within 7 days before the first dose of trial treatment
* Has had a prior monoclonal antibody within 4 weeks before study day 1 or who has not recovered (i.e., =\< grade 1 or at baseline) from AEs due to agents administered more than 4 weeks earlier

  * Note: the following will not be exclusionary: patients may have any grade alopecia or lymphopenia and still participate if other inclusion/exclusion criteria are met; patients may have grade 1 or 2 neuropathy at baseline and still participate if other inclusion/exclusion criteria are met
* Has a known additional malignancy that is progressing or requires active treatment; exceptions include basal cell carcinoma of the skin, squamous cell carcinoma of the skin that has undergone potentially curative therapy, or in situ cervical cancer
* Patients with known brain metastases should be excluded from this clinical trial because of their poor prognosis and because they often develop progressive neurologic dysfunction that would confound the evaluation of neurologic and other adverse events; patients with carcinomatous meningitis should also be excluded; patients with previously treated brain metastases may participate provided they are stable (without evidence of progression by imaging using the identical imaging modality for each assessment, either magnetic resonance imaging \[MRI\] or computed tomography \[CT\] scan, for at least 4 weeks before the first dose of trial treatment and any neurologic symptoms have returned to baseline), have no evidence of new or enlarging brain metastases, and are not using steroids for at least 7 days before trial treatment
* History of allergic reactions attributed to compounds of similar chemical or biologic composition to MK-3475 (pembrolizumab) and interferon-gamma; patients who are hypersensitive to Escherichia (E). coli are also excluded
* Has an active autoimmune disease that has required systemic treatment in the past 2 years (i.e., with use of disease modifying agents, corticosteroids, or immunosuppressive drugs); replacement therapy (e.g., thyroxine, insulin, or physiologic corticosteroid replacement therapy for adrenal or pituitary insufficiency, etc.) is not considered a form of systemic treatment
* Has a history of (non-infectious) pneumonitis that required steroids or current pneumonitis
* Has a history or current evidence of any condition, therapy, or laboratory abnormality that might confound the results of the trial, interfere with the patient's participation for the full duration of the trial, or is not in the best interest of the patient to participate, in the opinion of the treating investigator
* Uncontrolled intercurrent illness including, but not limited to, ongoing or active infection, interstitial lung disease or active, non-infectious pneumonitis, congestive heart failure New York Heart Association (NYHA) grade \>= 3, unstable angina pectoris, cardiac arrhythmia, or psychiatric illness/social situations that would limit compliance with study requirements
* Pregnant women are excluded from this study because MK-3475 (pembrolizumab) is an agent with the potential for teratogenic or abortifacient effects; because there is an unknown but potential risk for adverse events in nursing infants secondary to treatment of the mother with MK-3475 (pembrolizumab), breastfeeding should be discontinued if the mother is treated with MK-3475 (pembrolizumab); these potential risks may also apply to Interferon-gamma; MK-3475 (pembrolizumab) and Interferon-gamma may have adverse effects on a fetus in utero; furthermore, it is not known if MK-3475 (pembrolizumab) or Interferon-gamma have transient adverse effects on the composition of sperm; patients are excluded from this study if pregnant or breastfeeding, or expecting to conceive or father children within the projected duration of the trial, starting with the screening visit through 120 days after the last dose of trial treatment
* Patients who are human immunodeficiency virus (HIV) positive may participate IF they meet the following eligibility requirements:

  * They must be stable on their anti-retroviral regimen, and they must be healthy from an HIV perspective
  * They must have a CD4 count of greater than 250 cells/mcL
  * They must not be receiving prophylactic therapy for an opportunistic infection
  * Must be on antiretroviral therapy and there must be minimal interactions or overlapping toxicity of the antiretroviral therapy with the experimental cancer treatment
  * HIV viral load must be \< 200 copies/ mm\^3 by standard clinical assays
* Has known active hepatitis B (e.g., hepatitis B virus surface antigen \[HBsAg\] reactive) or hepatitis C (e.g., hepatitis C virus \[HCV\] ribonucleic acid \[RNA\] \[qualitative\] is detected)

  * Note: the following will not be exclusionary:

    * A positive hepatitis B serology indicative of previous immunization (i.e., HBsAb positive and hepatitis B virus core antibody \[HBcAb\] negative), or a fully resolved acute hepatitis B virus (HBV) infection
    * Patients with chronic HBV suppressed by appropriate antiretroviral therapy with activity against HBV, as outlined in Department of Health and Human Services (DHHS) guidelines
    * Positive HCV serology but no detectable HCV RNA, indicative of spontaneously cleared HCV infection
    * Patients who have been successfully treated for HCV as long as therapy for HCV has been completed
* Has received a live vaccine within 30 days before to the first dose of trial treatment; examples of live vaccines include, but are not limited to, the following: measles, mumps, rubella, chicken pox, yellow fever, seasonal flu (some), H1N1 flu, rabies, Bacille Calmette-Guerin (BCG), and typhoid vaccine; seasonal flu vaccines that do not contain live virus are permitted
* Has known psychiatric or substance abuse disorders that would interfere with cooperation with the requirements of the trial
* SYNOVIAL SARCOMA (TREATMENT GROUP II):
* Any approved or investigational anti-cancer therapy within 14 days prior to initiation of study treatment.

  * Note: Prior treatment with anti-programmed death-1 (anti-PD-1) or anti-programmed death-ligand 1 (anti-PD-L1) therapeutic antibodies is allowed as is prior therapy with other immunotherapies
* Active or untreated central nervous system (CNS) metastases as determined by computed tomography (CT) or magnetic resonance imaging (MRI) evaluation during screening and prior radiographic assessments; patients with prior brain metastases or CNS disease are permitted, but must have completed treatment and either (1) have no evidence of active CNS disease for at least 4 weeks prior to the first dose OR (2) have stable CNS lesions, or be at least 2 weeks past radiation or gamma-knife therapy; patients with past CNS disease must also have a screening head CT or MRI demonstrating stable disease compared to their most recent CNS evaluation
* Active therapy for malignancies other than sarcoma
* Pregnant and lactating women
* New York Heart Association (NYHA) class 3 or 4 or clinically symptomatic cardiovascular disease
* Severe infections requiring intravenous antibiotic treatment within 2 weeks prior to initiation of treatment
* Major surgical procedure other than for diagnosis within 4 weeks prior to initiation of treatment
* Active autoimmune disease requiring systemic treatment with steroids greater than 10 mg/day of prednisone or who have required steroids with a dose of 40 mg/day for the treatment of their autoimmune disease more than twice over the past year; patients with an autoimmune disease who are on active therapy with a drug targeting TNF alpha
* Prior allogeneic stem cell or solid organ transplant
* History of idiopathic pulmonary fibrosis, organizing pneumonia, drug-induced pneumonitis, idiopathic pneumonitis, or evidence of active pneumonitis on screening chest CT scan
* Active tuberculosis
* HIV on effective antiretroviral therapy will not be excluded
* Uncontrolled HBV infection, defined as plasma HBV DNA detectable by polymerase chain reaction (PCR)

  * Note: the following will NOT be exclusionary:

    * A positive hepatitis B serology indicative of previous immunization (i.e., HBsAb positive and HBcAb negative), or a fully resolved acute HBV infection
    * Patients with chronic HBV suppressed by appropriate antiretroviral therapy with activity against HBV, as outlined in DHHS guidelines
* Uncontrolled HCV infection, defined as plasma HCV RNA detectable by PCR.

  * Note: the following will NOT be exclusionary:

    * Positive HCV serology but no detectable HCV RNA, indicative of spontaneously cleared HCV infection
    * Patients who have been successfully treated for HCV as long as therapy for HCV has been completed