Copanlisib Hydrochloride and Nivolumab in Treating Patients With Recurrent or Refractory Diffuse Large B-cell Lymphoma or Primary Mediastinal Large B-cell Lymphoma

This phase II trial studies how well copanlisib hydrochloride and nivolumab work in treating patients with diffuse large B-cell lymphoma or primary mediastinal large B-cell lymphoma that has come back (recurrent) or does not responded to the treatment (refractory). Copanlisib hydrochloride may stop the growth of tumor cells by blocking some of the enzymes needed for cell growth. Immunotherapy with monoclonal antibodies, such as nivolumab, may help the body's immune system attack the cancer, and may interfere with the ability of tumor cells to grow and spread. Giving copanlisib hydrochloride and nivolumab may work better in treating patients with diffuse large B-cell lymphoma or primary mediastinal large B-cell lymphoma compared to standard of care.

PRIMARY OBJECTIVE:

I. To assess overall response rate (ORR) defined as complete response rate (CR) plus partial response rate (PR) (ORR = CR + PR) of the combination of copanlisib hydrochloride (copanlisib) and nivolumab in patients with relapsed/refractory diffuse large B-cell lymphoma (DLBCL) and primary mediastinal large B-cell lymphoma (PMBCL).

SECONDARY OBJECTIVES:

I. To evaluate the safety of the combination of nivolumab and copanlisib in patients with relapsed/refractory DLBCL and PMBCL.

II. To determine the progression free survival, duration of response, complete response rate and overall survival of the combination of copanlisib and nivolumab in patients with relapsed or refractory DLBCL and PMBCL.

CORRELATIVE STUDY OBJECTIVES:

I. To characterize the effects of the copanlisib and nivolumab combination regimen on tumor cells, tumor microenvironment and the immune response in relapsed/refractory DLBCL and PMBCL.

II. To assess predictors of response of the combination in relapsed/refractory DLBCL and PMBCL.

OUTLINE:

Patients receive copanlisib hydrochloride intravenously (IV) over 1 hour on days 1, 8 and 15 of cycles 1-8 and days 1 and 15 of subsequent cycles. Patients also receive nivolumab IV over 30 minutes on days 1 and 15 of cycles 1-8 and on day 1 of subsequent cycles. Cycles repeat every 28 days for up to 2 years in the absence of disease progression or unacceptable toxicity.

After completion of study treatment, patients are followed up for up to 100 days.

Eligibility Criteria:
Inclusion Criteria:

* Patients must have a histopathologically confirmed diagnosis of diffuse large B-cell lymphoma (DBLCL) or primary mediastinal large B-cell lymphoma
* Patients must have measurable disease, defined as at least one lesion that is \>= 15 mm (\>= 1.5 cm) in the longest axis on cross-sectional imaging and measurable in two perpendicular dimensions per spiral computed tomography (CT) scan or positron-emission tomography (PET)-CT scan
* Patients must have disease that is recurrent or refractory to standard therapy; patients must have failed front-line therapy and declined or are not candidates for autologous stem cell transplant (ASCT) or have failed prior ASCT
* Eastern Cooperative Oncology Group (ECOG) performance status of 0, 1 or 2
* Life expectancy of greater than 12 weeks
* White blood cell (WBC) \>= 2000/mm\^3
* Absolute neutrophil count (ANC) \>= 1000/mm\^3
* Platelet count \>= 100,000/mm\^3
* Hemoglobin \> 9.0 g/dL
* Total bilirubin =\< 1.5 x upper limit of normal (ULN) (except patients with Gilbert syndrome, who can have total bilirubin \< 3.0 mg/dL)
* Aspartate transaminase (AST) =\< 2.5 x ULN
* Serum creatinine =\< 2.0 mg/dL OR calculated creatinine clearance (CrCl) \>= 30 mL/min (if using the Cockcroft-Gault formula)
* Negative urine or serum pregnancy test for females of child bearing potential within 7 days prior to registration

  * The effects of copanlisib and nivolumab on the developing human fetus are unknown; for this reason, and because the study drugs used in this trial are known to be teratogenic, females of child-bearing potential must agree to use adequate contraception (hormonal or barrier method of birth control; abstinence) prior to study entry, for the duration of study participation and for 5 months after the last dose of study drug; males who are the sexual partners of a female of child-bearing potential must use any contraceptive method with a failure rate of less than 1% per year for the duration of study participation and for a period of 7 months after the last dose of study drug; these periods of required use of contraception have been calculated using the upper limit of the half-life for nivolumab (25 days) and are based on the protocol requirement that females of child-bearing potential use contraception for 5 months and males who are the sexual partners of females of child-bearing potential use contraception for 7 months
  * Females must not be breast-feeding for 1 month after last dose
  * Females of child bearing potential must have a negative serum or urine pregnancy test (minimum sensitivity 25 IU/L or equivalent units of human chorionic gonadotropin \[HCG\]) within 24 hours prior to the start of nivolumab
  * A female of child-bearing potential is defined as any female who has experienced menarche and who has not undergone surgical sterilization (hysterectomy or bilateral oophorectomy) or who is not postmenopausal; menopause is defined clinically as 12 months of amenorrhea in a female over 45 in the absence of other biological or physiological causes; in addition, females under the age of 55 must have a documented serum follicle stimulating hormone (FSH) level less than 40 mIU/mL
  * Females who are not of childbearing potential (i.e., who are postmenopausal or surgically sterile) and azoospermic males do not require contraception
  * Should a female of child-bearing potential become pregnant or suspect she is pregnant while she or her partner is participating in this study, she (or the participating partner) should inform the treating physician immediately
* Ability to understand and the willingness to sign a written informed consent document

Exclusion Criteria:

* Any high grade B-cell lymphoma
* Patients who have had chemotherapy within 2 weeks (6 weeks for nitrosoureas or mitomycin C), anticancer antibodies within 4 weeks, radio or toxin immunoconjugates within 2 weeks, radiation therapy within 3 weeks or major surgery within 2 weeks prior to entering the study

  * Palliative (limited-field) radiation therapy is permitted if the patient has additional measurable lesions to assess response of therapy
* Patients who have not recovered to grade 1 or less from any adverse events due to agents administered more than 4 weeks earlier (excluding alopecia)
* Patients who are receiving any other investigational agents
* Patients should be excluded if they have had prior treatment with a Pi3 kinase inhibitor, anti-PD-1, anti-PD-L1, anti-PD-L2, anti-CTLA-4 antibody, or any other antibody or drug specifically targeting T-cell co-stimulation or immune checkpoint pathways; Note: Patients who previously received CART therapy and progressed will be eligible
* Patients who have received autologous stem cell transplant (ASCT) =\< 8 weeks prior to the first dose of study drug or no adequate count recovery
* Patients with a prior history of allogeneic stem cell or solid organ transplantation
* Patients with evidence of active disease in the central nervous system (CNS) defined as either the presence of active lesions on magnetic resonance imaging (MRI) obtained within 4 weeks of registration or progressive neurological decline; patients with primary central nervous system (CNS) lymphoma who develop systemic recurrence following standard therapy may be included as long as no active CNS disease is present at the time or enrollment; similarly, patients with secondary involvement of the CNS from a systemic lymphoma may be included as long as the CNS disease has been optimally treated and they demonstrate no evidence of active CNS disease
* History of allergic reactions attributed to compounds of similar chemical or biologic composition to copanlisib and/or nivolumab
* History of severe hypersensitivity reaction to any monoclonal antibody
* Co-morbid systemic illnesses or other severe concurrent disease which, in the judgment of the investigator, would make the patient inappropriate for entry into this study or interfere significantly with the proper assessment of safety and toxicity of the prescribed regimens
* Uncontrolled intercurrent illness including, but not limited to, ongoing or active infection, non-healing wound or ulcer, or bone fracture, symptomatic congestive heart failure, unstable angina pectoris, cardiac arrhythmia, known history of atrial fibrillation except those with 1 event that has resolved more than 1 year ago without recurrence, or psychiatric illness/social situations that would limit compliance with study requirements
* Pregnant women are excluded from this study because copanlisib and nivolumab are agents 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 copanlisib or nivolumab, breastfeeding should be discontinued for 1 month after last dose if the mother is treated with copanlisib or nivolumab
* Patients with human immunodeficiency virus (HIV):

  * Patients with HIV are eligible for the study provided they meet the other protocol criteria in addition to the following:

    * Undetectable HIV load by standard polymerase chain reaction (PCR) clinical assay
    * Absolute CD4 count of \>= 200 mm\^3
    * Willing to maintain adherence to combination antiretroviral therapy
    * No history of acquired immunodeficiency syndrome (AIDS) defining condition (other than lymphoma or CD4 cell count \< 200 mm\^3)
    * Likely to have near normal lifespan if not for the presence of relapsed/refractory lymphoma
  * The patients with evidence of hepatitis B virus (HBV) are eligible provided there is minimal hepatic injury and the patient has undetectable HBV on suppressive HBV therapy; patient must be willing to maintain adherence to HBV therapy
  * Patients with previously treated and eradicated hepatitis C virus (HCV) who have minimal hepatic injury are eligible
* Patients with active autoimmune disease or history of autoimmune disease that might recur, which may affect vital organ function or require immune suppressive treatment including systemic corticosteroids, should be excluded; these include but are not limited to patients with a history of immune related neurologic disease, multiple sclerosis, autoimmune (demyelinating) neuropathy, Guillain-Barre syndrome, myasthenia gravis; systemic autoimmune disease such as systemic lupus erythematosus (SLE), connective tissue diseases, scleroderma, inflammatory bowel disease (IBD), Crohn's, ulcerative colitis, hepatitis; and patients with a history of toxic epidermal necrolysis (TEN), Stevens-Johnson syndrome, or phospholipid syndrome should be excluded because of the risk of recurrence or exacerbation of disease; patients with vitiligo, endocrine deficiencies including thyroiditis managed with replacement hormones including physiologic corticosteroids are eligible; patients with rheumatoid arthritis and other arthropathies, Sjogren's syndrome and psoriasis controlled with topical medication and patients with positive serology, such as antinuclear antibodies (ANA), anti-thyroid antibodies should be evaluated for the presence of target organ involvement and potential need for systemic treatment but should otherwise be eligible
* Patients are permitted to enroll if they have vitiligo, type 1 diabetes mellitus, residual hypothyroidism due to autoimmune condition only requiring hormone replacement, psoriasis not requiring systemic treatment, or conditions not expected to recur in the absence of an external trigger (precipitating event); however, patients with uncontrolled type I or II diabetes mellitus will be excluded; uncontrolled diabetes is defined as hemoglobin A1c (HbA1c) \> 8.5%
* Patients should be excluded if they have a condition requiring systemic treatment with either corticosteroids (\> 10 mg daily prednisone equivalents) or other immunosuppressive medications within 14 days of study drug administration; inhaled or topical steroids and adrenal replacement doses =\< 10 mg daily prednisone equivalents are permitted in the absence of active autoimmune disease; patients are permitted to use topical, ocular, intra-articular, intranasal, and inhalational corticosteroids (with minimal systemic absorption); physiologic replacement doses of systemic corticosteroids are permitted, even if =\< 10 mg/day prednisone equivalents; a brief course of corticosteroids for prophylaxis (e.g., contrast dye allergy) or for treatment of non-autoimmune conditions (e.g., delayed-type hypersensitivity reaction caused by contact allergen) is permitted
* Patients who have had evidence of active or acute diverticulitis, intra-abdominal abscess, and gastrointestinal (GI) obstruction which are known risk factors for bowel perforation should be evaluated for the potential need for additional treatment before coming on study
* Patients with other active malignancy =\< 3 years prior to registration for which active treatment is required must be excluded; patients with composite lymphomas that have a non-B-cell component must be excluded

  * EXCEPTIONS: Non-melanotic skin cancers or carcinoma-in-situ of the cervix
* Copanlisib is primarily metabolized by CYP3A4; therefore, the concomitant use of strong inhibitors of CYP3A4 (e.g., ketoconazole, itraconazole, clarithromycin, ritonavir, indinavir, nelfinavir and saquinavir), and strong inducers of CYP3A4 (e.g. rifampin, phenytoin, carbamazepine, phenobarbital, St. John's Wort) are not permitted from 14 days prior to enrollment until the end of the study

  * Note: Because the lists of these agents are constantly changing, it is important to regularly consult a frequently-updated medical reference; as part of the enrollment/informed consent procedures, the patient will be counseled on the risk of interactions with other agents, and what to do if new medications need to be prescribed or if the patient is considering a new over-the-counter medicine or herbal product; other medications that are prohibited while on copanlisib treatment:

    * Herbal medications/preparations (except for vitamins)
    * Anti-arrhythmic therapy other than beta blockers or digoxin