TNF and Cognitive impairment: Our key findings demonstrated that both rifaximin and lactulose significantly decreased serum and cerebrospinal fluid ammonia levels, improved cognitive deficits in MHE rats, and reduced systemic inflammation, specifically by lowering portal LPS levels and serum TNF-α and IL-1β.